Skip to content

Commit bf0800c

Browse files
authored
test: add back fixture.whenStable for patch branch (#30923)
#30878 cleaned up usages of `whenStable` that were no longer needed. However, the change that makes them unneeded (#30703) is not on the patch branch, so this PR reverts the tests to their original form on the patch branch.
1 parent 0509a99 commit bf0800c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cdk/overlay/overlay.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import {Direction, Directionality} from '../bidi';
2-
import {CdkPortal, ComponentPortal, TemplatePortal} from '../portal';
31
import {Location} from '@angular/common';
42
import {SpyLocation} from '@angular/common/testing';
53
import {
@@ -21,6 +19,8 @@ import {
2119
waitForAsync,
2220
} from '@angular/core/testing';
2321
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
22+
import {Direction, Directionality} from '../bidi';
23+
import {CdkPortal, ComponentPortal, TemplatePortal} from '../portal';
2424
import {dispatchFakeEvent} from '../testing/private';
2525
import {
2626
Overlay,
@@ -950,6 +950,7 @@ describe('Overlay', () => {
950950
const overlayRef = overlay.create(config);
951951

952952
overlayRef.attach(componentPortal);
953+
await viewContainerFixture.whenStable();
953954

954955
const pane = overlayContainerElement.querySelector('.cdk-overlay-pane') as HTMLElement;
955956
expect(pane.classList)
@@ -960,6 +961,7 @@ describe('Overlay', () => {
960961
expect(pane.classList)
961962
.withContext('Expected class not to be removed immediately')
962963
.toContain('custom-panel-class');
964+
await viewContainerFixture.whenStable();
963965

964966
expect(pane.classList)
965967
.not.withContext('Expected class to be removed on stable')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy