Skip to content

Commit 12ffcac

Browse files
committed
chore(*): fix test for filter ui row
1 parent 533fbbf commit 12ffcac

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

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

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,10 +1641,11 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
16411641
expect(conditionChips.length).toBe(0);
16421642
}));
16431643

1644-
it('Should open filterRow for respective column when pressing \'ctrl + shift + l\' on its filterCell chip.',
1644+
fit('Should open/close filterRow for respective column when pressing \'ctrl + shift + l\' on its filterCell chip.',
16451645
fakeAsync(() => {
16461646
// Verify filterRow is not opened.
1647-
expect(fix.debugElement.query(By.css(FILTER_UI_ROW))).toBeNull();
1647+
let filterUIRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
1648+
expect(filterUIRow).toBeNull();
16481649

16491650
const releaseDateColumn = GridFunctions.getColumnHeader('ReleaseDate', fix);
16501651
UIInteractions.simulateClickAndSelectEvent(releaseDateColumn);
@@ -1655,12 +1656,20 @@ describe('IgxGrid - Filtering Row UI actions #grid', () => {
16551656
fix.detectChanges();
16561657

16571658
// Verify filterRow is opened for the 'ReleaseDate' column.
1658-
expect(fix.debugElement.query(By.css(FILTER_UI_ROW))).not.toBeNull();
1659+
filterUIRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
1660+
expect(filterUIRow).not.toBeNull();
16591661
const headerGroups = fix.debugElement.queryAll(By.directive(IgxGridHeaderGroupComponent));
16601662
const headerGroupsFiltering = headerGroups.filter(
16611663
(hg) => hg.nativeElement.classList.contains('igx-grid__th--filtering'));
16621664
expect(headerGroupsFiltering.length).toBe(1);
16631665
expect(headerGroupsFiltering[0].componentInstance.column.field).toBe('ReleaseDate');
1666+
1667+
UIInteractions.triggerKeyDownEvtUponElem('l', filterUIRow.nativeElement, true, false, true, true);
1668+
tick(200);
1669+
fix.detectChanges();
1670+
1671+
filterUIRow = fix.debugElement.query(By.css(FILTER_UI_ROW));
1672+
expect(filterUIRow).toBeNull();
16641673
}));
16651674

16661675
it('Should navigate to first cell of grid when pressing \'Tab\' on the last filterCell chip.', fakeAsync(() => {

0 commit comments

Comments
 (0)