Skip to content

Commit b87c4ad

Browse files
committed
chore(tests): update failinf filtering test
1 parent 85f6767 commit b87c4ad

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import {
4646
import { HelperUtils } from '../../test-utils/helper-utils.spec';
4747
import { GridSelectionMode, FilterMode } from '../common/enums';
4848

49+
const DEBOUNCETIME = 30;
4950
const FILTER_UI_ROW = 'igx-grid-filtering-row';
5051
const FILTER_UI_CELL = 'igx-grid-filtering-cell';
5152
const FILTER_UI_SCROLL_START_CLASS = '.igx-grid__filtering-row-scroll-start';
@@ -2864,9 +2865,9 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28642865
expect(GridFunctions.getCurrentCellFromGrid(grid, 1, 1).value).toBe('Ignite UI for Angular');
28652866
}));
28662867

2867-
it('Verify filter cell chip is scrolled into view on click.', fakeAsync(() => {
2868+
it('Verify filter cell chip is scrolled into view on click.', async () => {
28682869
grid.width = '470px';
2869-
tick(100);
2870+
await wait(DEBOUNCETIME);
28702871
fix.detectChanges();
28712872

28722873
// Verify 'ReleaseDate' filter chip is not fully visible.
@@ -2877,11 +2878,11 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28772878
'chip should not be fully visible and thus not within grid');
28782879

28792880
GridFunctions.clickFilterCellChip(fix, 'ReleaseDate');
2880-
tick(100);
2881+
await wait(DEBOUNCETIME);
28812882
fix.detectChanges();
28822883

2883-
GridFunctions.closeFilterRow(fix);
2884-
tick(100);
2884+
grid.filteringRow.close();
2885+
await wait();
28852886
fix.detectChanges();
28862887

28872888
// Verify 'ReleaseDate' filter chip is fully visible.
@@ -2890,7 +2891,7 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
28902891
gridRect = grid.nativeElement.getBoundingClientRect();
28912892
expect(chipRect.left > gridRect.left && chipRect.right < gridRect.right).toBe(true,
28922893
'chip should be fully visible and within grid');
2893-
}));
2894+
});
28942895

28952896
it('Verify condition chips are scrolled into/(out of) view by using arrow buttons.', (async () => {
28962897
grid.width = '700px';

0 commit comments

Comments
 (0)