Skip to content

Commit f851246

Browse files
karajosephperrott
authored andcommitted
chore(ivy): fix static query stragglers that were not marked static query (#15267)
1 parent 660431b commit f851246

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
@@ -2137,7 +2137,7 @@ class WrapperCdkTableApp<T> implements AfterContentInit {
21372137
@ContentChild(CdkHeaderRowDef) headerRowDef: CdkHeaderRowDef;
21382138
@ContentChildren(CdkRowDef) rowDefs: QueryList<CdkRowDef<T>>;
21392139

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

21422142
@Input() columns: string[];
21432143
@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
@@ -394,6 +394,8 @@ describe('MatSlideToggle without forms', () => {
394394
]
395395
});
396396
const fixture = TestBed.createComponent(SlideToggleBasic);
397+
fixture.detectChanges();
398+
397399
const testComponent = fixture.debugElement.componentInstance;
398400
const slideToggleDebug = fixture.debugElement.query(By.css('mat-slide-toggle'));
399401

0 commit comments

Comments
 (0)