Skip to content

test: add back fixture.whenStable for patch branch #30923

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

Merged
merged 1 commit into from
Apr 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/cdk/overlay/overlay.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import {Direction, Directionality} from '../bidi';
import {CdkPortal, ComponentPortal, TemplatePortal} from '../portal';
import {Location} from '@angular/common';
import {SpyLocation} from '@angular/common/testing';
import {
Expand All @@ -21,6 +19,8 @@ import {
waitForAsync,
} from '@angular/core/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {Direction, Directionality} from '../bidi';
import {CdkPortal, ComponentPortal, TemplatePortal} from '../portal';
import {dispatchFakeEvent} from '../testing/private';
import {
Overlay,
Expand Down Expand Up @@ -950,6 +950,7 @@ describe('Overlay', () => {
const overlayRef = overlay.create(config);

overlayRef.attach(componentPortal);
await viewContainerFixture.whenStable();

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

expect(pane.classList)
.not.withContext('Expected class to be removed on stable')
Expand Down
Loading