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
1 change: 1 addition & 0 deletions src/cdk/a11y/aria-describer/aria-describer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe('AriaDescriber', () => {
fixture = TestBed.createComponent(TestApp);
component = fixture.componentInstance;
ariaDescriber = component.ariaDescriber;
fixture.detectChanges();
});

afterEach(() => {
Expand Down
6 changes: 3 additions & 3 deletions src/cdk/portal/portal.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ class ArbitraryViewContainerRefComponent {
})
class PortalTestApp {
@ViewChildren(CdkPortal) portals: QueryList<CdkPortal>;
@ViewChild(CdkPortalOutlet) portalOutlet: CdkPortalOutlet;
@ViewChild('templateRef', { read: TemplateRef }) templateRef: TemplateRef<any>;
@ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet;
@ViewChild('templateRef', { read: TemplateRef , static: true}) templateRef: TemplateRef<any>;

selectedPortal: Portal<any>|undefined;
fruit: string = 'Banana';
Expand Down Expand Up @@ -600,7 +600,7 @@ class PortalTestApp {
`,
})
class UnboundPortalTestApp {
@ViewChild(CdkPortalOutlet) portalOutlet: CdkPortalOutlet;
@ViewChild(CdkPortalOutlet, {static: true}) portalOutlet: CdkPortalOutlet;
}

// Create a real (non-test) NgModule as a workaround for
Expand Down
6 changes: 3 additions & 3 deletions src/cdk/text-field/autofill.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ describe('cdkAutofill', () => {
})
class Inputs {
// Cast to `any` so we can stub out some methods in the tests.
@ViewChild('input1') input1: ElementRef<any>;
@ViewChild('input2') input2: ElementRef<any>;
@ViewChild('input3') input3: ElementRef<any>;
@ViewChild('input1', {static: true}) input1: ElementRef<any>;
@ViewChild('input2', {static: true}) input2: ElementRef<any>;
@ViewChild('input3', {static: true}) input3: ElementRef<any>;
}

@Component({
Expand Down
2 changes: 1 addition & 1 deletion src/lib/autocomplete/autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2288,7 +2288,7 @@ class SimpleAutocomplete implements OnDestroy {
openedSpy = jasmine.createSpy('autocomplete opened spy');
closedSpy = jasmine.createSpy('autocomplete closed spy');

@ViewChild(MatAutocompleteTrigger) trigger: MatAutocompleteTrigger;
@ViewChild(MatAutocompleteTrigger, {static: true}) trigger: MatAutocompleteTrigger;
@ViewChild(MatAutocomplete) panel: MatAutocomplete;
@ViewChild(MatFormField) formField: MatFormField;
@ViewChildren(MatOption) options: QueryList<MatOption>;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bottom-sheet/bottom-sheet-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class MatBottomSheetContainer extends BasePortalOutlet implements OnDestr
private _breakpointSubscription: Subscription;

/** The portal outlet inside of this container into which the content will be loaded. */
@ViewChild(CdkPortalOutlet) _portalOutlet: CdkPortalOutlet;
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;

/** The state of the bottom sheet animations. */
_animationState: 'void' | 'visible' | 'hidden' = 'void';
Expand Down
2 changes: 2 additions & 0 deletions src/lib/sidenav/drawer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ describe('MatDrawer', () => {
let fixture = TestBed.createComponent(BasicTestApp);
let drawer: MatDrawer = fixture.debugElement
.query(By.directive(MatDrawer)).componentInstance;
fixture.detectChanges();

let openButton = fixture.componentInstance.openButton.nativeElement;
let closeButton = fixture.componentInstance.closeButton.nativeElement;

Expand Down