Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/cdk/overlay/fullscreen-overlay-container.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe('FullscreenOverlayContainer', () => {
providers: [Overlay],
})
class TestComponentWithTemplatePortals {
@ViewChild(CdkPortal) templatePortal: CdkPortal;
@ViewChild(CdkPortal, {static: true}) templatePortal: CdkPortal;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should put in detectChanges calls instead? My guess here is that the first test used static queries and then we ended up copying it everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to use static for this one since it keeps the test as running just one change detection, even though it's largely trivial.


constructor(public viewContainerRef: ViewContainerRef) { }
}
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/overlay/overlay-container.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('OverlayContainer', () => {
providers: [Overlay],
})
class TestComponentWithTemplatePortals {
@ViewChild(CdkPortal) templatePortal: CdkPortal;
@ViewChild(CdkPortal, {static: true}) templatePortal: CdkPortal;

constructor(public viewContainerRef: ViewContainerRef) { }
}
Expand Down