Skip to content

Commit bc03348

Browse files
committed
test(master-detail): fixing faulty test
1 parent 5a54c3d commit bc03348

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid.master-detail.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewChild, OnInit, DebugElement, QueryList, TemplateRef } from '@angular/core';
1+
import { Component, ViewChild, OnInit, DebugElement, QueryList, TemplateRef, ContentChild, ViewChildren } from '@angular/core';
22
import { TestBed, ComponentFixture, fakeAsync, tick, waitForAsync } from '@angular/core/testing';
33
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44
import { By } from '@angular/platform-browser';
@@ -366,7 +366,7 @@ describe('IgxGrid Master Detail #grid', () => {
366366
grid.toggleRow(fix.componentInstance.data[0].ID);
367367
fix.detectChanges();
368368
expect(grid.unpinnedColumns.map(c => c.field)).toEqual(['ContactName', 'CompanyName']);
369-
expect(fix.componentInstance.childGrid.unpinnedColumns.map(c => c.field)).toEqual(['ColA', 'ColB']);
369+
expect(fix.componentInstance.childGrid.first.unpinnedColumns.map(c => c.field)).toEqual(['ColA', 'ColB']);
370370
});
371371
});
372372

@@ -1311,7 +1311,7 @@ export class DefaultGridMasterDetailComponent {
13111311
@ViewChild('gridTemplate', { read: TemplateRef, static: true })
13121312
public gridTemplate: TemplateRef<any>;
13131313

1314-
@ViewChild('childGrid', { read: IgxGridComponent, static: true })
1314+
@ViewChildren('childGrid', { read: IgxGridComponent })
13151315
public childGrid: IgxGridComponent;
13161316

13171317
public width = '800px';

0 commit comments

Comments
 (0)