-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(overlay): remove overlay container on destroy #5378
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
overlayRef.attach(fixture.componentInstance.templatePortal); | ||
fixture.detectChanges(); | ||
|
||
expect(document.body.querySelector('.cdk-overlay-container')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this pass? I know that when I did the cleanup last time, there were still some divs left over between tests because the overlay container didn't have any cleanup logic.
// injectable in a unit test. | ||
overlayContainer.ngOnDestroy(); | ||
|
||
expect(document.body.querySelector('.cdk-overlay-container')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be just document.querySelector(...)
.
4422c0f
to
1dccf5a
Compare
@crisbeto passed everywhere except browserstack. I changed the test to ensure that all overlay containers are remove with a |
needs rebase |
1dccf5a
to
d1727da
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.