Skip to content

Commit 6f23df6

Browse files
committed
test(grid): setting rowSelectable on row island #4726
1 parent 052c9d5 commit 6f23df6

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

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

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { IgxStringFilteringOperand, IgxNumberFilteringOperand } from '../../data
1111
import { configureTestSuite } from '../../test-utils/configure-suite';
1212
import { ScrollsComponent, GridWithPrimaryKeyComponent, SelectionComponent } from '../../test-utils/grid-samples.spec';
1313
import { SampleTestData } from '../../test-utils/sample-test-data.spec';
14+
import { IgxHierarchicalGridMultiLayoutComponent } from '../hierarchical-grid/hierarchical-grid.spec';
15+
import { IgxHierarchicalGridModule } from '../hierarchical-grid/hierarchical-grid.module';
1416

1517
describe('IgxGrid - Row Selection', () => {
1618
configureTestSuite();
@@ -25,11 +27,13 @@ describe('IgxGrid - Row Selection', () => {
2527
ScrollsComponent,
2628
GridSummaryComponent,
2729
GridCancelableComponent,
28-
GridFeaturesComponent
30+
GridFeaturesComponent,
31+
HierarchicalGridRowSelectableIsland
2932
],
3033
imports: [
3134
NoopAnimationsModule,
32-
IgxGridModule
35+
IgxGridModule,
36+
IgxHierarchicalGridModule
3337
]
3438
})
3539
.compileComponents();
@@ -962,6 +966,13 @@ describe('IgxGrid - Row Selection', () => {
962966
expect(rowCheck).toBeDefined();
963967
}));
964968

969+
it('Set rowSelectable on HGrid row island', fakeAsync(() => {
970+
expect(() => {
971+
const fix = TestBed.createComponent(HierarchicalGridRowSelectableIsland);
972+
fix.detectChanges();
973+
}).not.toThrow();
974+
}));
975+
965976
});
966977

967978
@Component({
@@ -1125,3 +1136,21 @@ export class GridFeaturesComponent {
11251136
column.resizable = true;
11261137
}
11271138
}
1139+
1140+
@Component({
1141+
template: `
1142+
<igx-hierarchical-grid #grid1 [data]="data" [autoGenerate]="false" [height]="'400px'" [width]="'500px'" #hierarchicalGrid>
1143+
<igx-column field="ID"></igx-column>
1144+
<igx-column field="ProductName"></igx-column>
1145+
<igx-row-island [key]="'childData'" [autoGenerate]="false" [height]="height" #rowIsland1 [rowSelectable]="true">
1146+
<igx-column field="ID"></igx-column>
1147+
<igx-column field="ProductName"></igx-column>
1148+
</igx-row-island>
1149+
<igx-row-island [key]="'childData2'" [autoGenerate]="false" [height]="height" #rowIsland2 [rowSelectable]="true">
1150+
<igx-column field="Col1"></igx-column>
1151+
<igx-column field="Col2"></igx-column>
1152+
<igx-column field="Col3"></igx-column>
1153+
</igx-row-island>
1154+
</igx-hierarchical-grid>`
1155+
})
1156+
export class HierarchicalGridRowSelectableIsland extends IgxHierarchicalGridMultiLayoutComponent { }

0 commit comments

Comments
 (0)