Skip to content

Commit f2f3ba3

Browse files
committed
chore(*): update failing tests
1 parent ea218e3 commit f2f3ba3

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

projects/igniteui-angular/src/lib/grids/grid/grid-mrl-keyboard-nav.spec.ts

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,17 +1585,19 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => {
15851585
expect(fix.componentInstance.selectedCell.column.field).toMatch('ContactTitle');
15861586

15871587
GridFunctions.simulateGridContentKeydown(fix, 'ArrowDown', false, false, true);
1588-
zone.simulateOnStable();
1588+
fix.detectChanges();
15891589
await wait(DEBOUNCETIME);
1590+
zone.simulateOnStable();
15901591
fix.detectChanges();
15911592

15921593
expect(fix.componentInstance.selectedCell.value)
15931594
.toEqual(fix.componentInstance.data[fix.componentInstance.data.length - 1].ContactTitle);
15941595
expect(fix.componentInstance.selectedCell.column.field).toMatch('ContactTitle');
15951596

15961597
GridFunctions.simulateGridContentKeydown(fix, 'ArrowUp', false, false, true);
1597-
zone.simulateOnStable();
1598+
fix.detectChanges();
15981599
await wait(DEBOUNCETIME);
1600+
zone.simulateOnStable();
15991601
fix.detectChanges();
16001602

16011603
expect(fix.componentInstance.selectedCell.value).toEqual(fix.componentInstance.data[0].ContactTitle);
@@ -1718,17 +1720,19 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => {
17181720
]
17191721
}];
17201722
fix.detectChanges();
1723+
17211724
const firstCell = fix.debugElement.queryAll(By.css(CELL_CSS_CLASS))[0];
17221725

17231726
UIInteractions.simulateClickAndSelectCellEvent(firstCell);
17241727
fix.detectChanges();
17251728

17261729
GridFunctions.simulateGridContentKeydown(fix, 'end', false, false, true);
1727-
await wait(DEBOUNCETIME * 2);
1730+
fix.detectChanges();
1731+
await wait(DEBOUNCETIME);
17281732
zone.simulateOnStable();
17291733
fix.detectChanges();
17301734

1731-
await wait(DEBOUNCETIME * 2);
1735+
await wait(DEBOUNCETIME);
17321736
zone.simulateOnStable();
17331737
fix.detectChanges();
17341738

@@ -1737,12 +1741,13 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => {
17371741
expect(fix.componentInstance.selectedCell.column.field).toMatch('Fax');
17381742

17391743
GridFunctions.simulateGridContentKeydown(fix, 'home', false, false, true);
1740-
await wait(DEBOUNCETIME * 2);
1744+
fix.detectChanges();
17411745
zone.simulateOnStable();
1746+
await wait(DEBOUNCETIME * 2);
17421747
fix.detectChanges();
17431748

1744-
await wait(DEBOUNCETIME * 2);
17451749
zone.simulateOnStable();
1750+
await wait(DEBOUNCETIME * 2);
17461751
fix.detectChanges();
17471752

17481753
expect(fix.componentInstance.selectedCell.value).toEqual(fix.componentInstance.data[0].CompanyName);
@@ -1875,25 +1880,27 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => {
18751880
fix.detectChanges();
18761881

18771882
GridFunctions.simulateGridContentKeydown(fix, 'end', false, false, true);
1878-
await wait(DEBOUNCETIME * 2);
1883+
fix.detectChanges();
18791884
zone.simulateOnStable();
1885+
await wait(DEBOUNCETIME * 2);
18801886
fix.detectChanges();
18811887

1882-
await wait(DEBOUNCETIME * 2);
18831888
zone.simulateOnStable();
1889+
await wait(DEBOUNCETIME * 2);
18841890
fix.detectChanges();
18851891

18861892
expect(fix.componentInstance.selectedCell.value)
18871893
.toEqual(fix.componentInstance.data[fix.componentInstance.data.length - 1].Fax);
18881894
expect(fix.componentInstance.selectedCell.column.field).toMatch('Fax');
18891895

18901896
GridFunctions.simulateGridContentKeydown(fix, 'home', false, false, true);
1891-
await wait(DEBOUNCETIME * 2);
1897+
fix.detectChanges();
18921898
zone.simulateOnStable();
1899+
await wait(DEBOUNCETIME * 2);
18931900
fix.detectChanges();
18941901

1895-
await wait(DEBOUNCETIME * 2);
18961902
zone.simulateOnStable();
1903+
await wait(DEBOUNCETIME * 2);
18971904
fix.detectChanges();
18981905

18991906
expect(fix.componentInstance.selectedCell.value).toEqual(fix.componentInstance.data[0].CompanyName);

0 commit comments

Comments
 (0)