Skip to content

Commit e9a9c92

Browse files
committed
chore(*): fix more test specs
1 parent 31ba540 commit e9a9c92

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,10 @@ describe('Row Pinning #grid', () => {
558558
beforeEach(fakeAsync(() => {
559559
fix = TestBed.createComponent(GridRowPinningComponent);
560560
fix.componentInstance.createSimpleData(12);
561+
fix.detectChanges();
561562
grid = fix.componentInstance.instance;
562-
grid.paging = true;
563+
fix.componentInstance.paging = true;
564+
fix.detectChanges();
563565
grid.perPage = 5;
564566

565567
fix.detectChanges();
@@ -1270,12 +1272,14 @@ describe('Row Pinning #grid', () => {
12701272
[height]='"500px"'
12711273
[data]="data"
12721274
[autoGenerate]="true">
1275+
<igx-paginator *ngIf="paging"></igx-paginator>
12731276
</igx-grid>
12741277
`
12751278
})
12761279
export class GridRowPinningComponent {
12771280
@ViewChild(IgxGridComponent, { read: IgxGridComponent, static: true })
12781281
public instance: IgxGridComponent;
1282+
public paging = false;
12791283

12801284
public data: any[] = SampleTestData.contactInfoDataFull();
12811285
public pinningConfig: IPinningConfig = { columns: ColumnPinningPosition.Start, rows: RowPinningPosition.Top };

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ describe('IgxGrid - Row Selection #grid', () => {
14631463
}));
14641464

14651465
it('Paging: Should persist through paging', () => {
1466-
grid.paging = true;
1466+
fix.componentInstance.paging = true;
14671467
fix.detectChanges();
14681468

14691469
const firstRow = grid.gridAPI.get_row_by_index(0);
@@ -1472,13 +1472,14 @@ describe('IgxGrid - Row Selection #grid', () => {
14721472

14731473
secondRow.onRowSelectorClick(UIInteractions.getMouseEvent('click'));
14741474
middleRow.onRowSelectorClick(UIInteractions.getMouseEvent('click'));
1475+
grid.notifyChanges(true);
14751476
fix.detectChanges();
14761477

14771478
GridSelectionFunctions.verifyRowSelected(secondRow);
14781479
GridSelectionFunctions.verifyRowSelected(middleRow);
14791480
GridSelectionFunctions.verifyHeaderRowCheckboxState(fix, false, true);
14801481

1481-
grid.nextPage();
1482+
grid.paginator.nextPage();
14821483
fix.detectChanges();
14831484

14841485
GridSelectionFunctions.verifyRowSelected(secondRow, false);
@@ -1503,7 +1504,7 @@ describe('IgxGrid - Row Selection #grid', () => {
15031504
});
15041505

15051506
it('Paging: Should persist all rows selection through paging', () => {
1506-
grid.paging = true;
1507+
fix.componentInstance.paging = true;
15071508
fix.detectChanges();
15081509

15091510
const secondRow = grid.gridAPI.get_row_by_index(1);
@@ -1533,7 +1534,7 @@ describe('IgxGrid - Row Selection #grid', () => {
15331534
});
15341535

15351536
it('Paging: Should be able to select rows with Shift and Click', () => {
1536-
grid.paging = true;
1537+
fix.componentInstance.paging = true;
15371538
fix.detectChanges();
15381539

15391540
const firstRow = grid.gridAPI.get_row_by_index(0);

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -2109,7 +2109,8 @@ describe('IgxGrid - Summaries #grid', () => {
21092109
});
21102110

21112111
it('Paging: should render correct summaries when paging is enable and position is buttom', fakeAsync(() => {
2112-
grid.paging = true;
2112+
fix.componentInstance.paging = true;
2113+
fix.detectChanges();
21132114
grid.perPage = 3;
21142115
fix.detectChanges();
21152116
tick(16);
@@ -2146,7 +2147,8 @@ describe('IgxGrid - Summaries #grid', () => {
21462147
}));
21472148

21482149
it('Paging: should render correct summaries when paging is enable and position is top', fakeAsync(() => {
2149-
grid.paging = true;
2150+
fix.componentInstance.paging = true;
2151+
fix.detectChanges();
21502152
grid.perPage = 3;
21512153
grid.summaryPosition = 'top';
21522154
fix.detectChanges();

0 commit comments

Comments
 (0)