Skip to content

Commit

Permalink
test(grid): Adding a selection test #4998
Browse files Browse the repository at this point in the history
  • Loading branch information
dafo committed Aug 29, 2019
1 parent 1a5a00c commit b254d1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,11 @@ describe('IgxGrid - Row Selection #grid', () => {
});

fit('Should have correct indices on all pages', () => {
// TODO
grid.nextPage();
fix.detectChanges();

const firstRootRow = grid.getRowByIndex(0);
expect(firstRootRow.nativeElement.querySelector('.rowNumber').textContent).toEqual('15');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -1172,13 +1172,14 @@ export class DynamicColumnsComponent extends GridWithSizeComponent {

@Component({
template: `
<igx-grid #gridCustomSelectors [data]="data" [rowSelection]="'multiple'" [autoGenerate]="false">
<igx-grid #gridCustomSelectors [data]="data" [paging]="true" [rowSelection]="'multiple'" [autoGenerate]="false">
<igx-column width="100px" [field]="'ID'" [header]="'ID'"></igx-column>
<igx-column width="100px" [field]="'CompanyName'"></igx-column>
<igx-column width="100px" [field]="'ContactName'" dataType="number"></igx-column>
<igx-column width="100px" [field]="'ContactTitle'" dataType="string"></igx-column>
<igx-column width="100px" [field]="'Address'" dataType="string"></igx-column>
<ng-template igxRowSelector let-rowContext>
<span class="rowNumber">{{ rowContext.index }}</span>
<igx-checkbox [checked]="rowContext.selected" (click)="onRowCheckboxClick($event, rowContext)"></igx-checkbox>
</ng-template>
<ng-template igxHeadSelector let-headContext>
Expand Down

0 comments on commit b254d1c

Please sign in to comment.