Skip to content

Commit ea7b7f2

Browse files
karajelbourn
authored andcommitted
chore(ivy): fix static query stragglers that were not marked static query (#15267)
1 parent 576abc5 commit ea7b7f2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/cdk/table/table.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ class WrapperCdkTableApp<T> implements AfterContentInit {
21082108
@ContentChild(CdkHeaderRowDef) headerRowDef: CdkHeaderRowDef;
21092109
@ContentChildren(CdkRowDef) rowDefs: QueryList<CdkRowDef<T>>;
21102110

2111-
@ViewChild(CdkTable) table: CdkTable<T>;
2111+
@ViewChild(CdkTable, {static: true}) table: CdkTable<T>;
21122112

21132113
@Input() columns: string[];
21142114
@Input() dataSource: DataSource<T>;

src/lib/paginator/paginator.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ describe('MatPaginator', () => {
3232

3333
beforeEach(() => {
3434
fixture = TestBed.createComponent(MatPaginatorApp);
35+
fixture.detectChanges();
36+
3537
component = fixture.componentInstance;
3638
paginator = component.paginator;
37-
38-
fixture.detectChanges();
3939
});
4040

4141
describe('with the default internationalization provider', () => {
@@ -368,10 +368,9 @@ describe('MatPaginator', () => {
368368

369369
it('should handle the number inputs being passed in as strings', () => {
370370
const withStringFixture = TestBed.createComponent(MatPaginatorWithStringValues);
371-
const withStringPaginator = withStringFixture.componentInstance.paginator;
372-
373371
withStringFixture.detectChanges();
374372

373+
const withStringPaginator = withStringFixture.componentInstance.paginator;
375374
expect(withStringPaginator.pageIndex).toEqual(0);
376375
expect(withStringPaginator.length).toEqual(100);
377376
expect(withStringPaginator.pageSize).toEqual(10);

src/lib/slide-toggle/slide-toggle.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ describe('MatSlideToggle without forms', () => {
390390
]
391391
});
392392
const fixture = TestBed.createComponent(SlideToggleBasic);
393+
fixture.detectChanges();
394+
393395
const testComponent = fixture.debugElement.componentInstance;
394396
const slideToggleDebug = fixture.debugElement.query(By.css('mat-slide-toggle'));
395397

0 commit comments

Comments
 (0)