Skip to content

Commit 49b8f00

Browse files
authored
fix(ESF): Fixed a test in ESF search component. (#16409)
1 parent 75a87dc commit 49b8f00

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

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

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6580,27 +6580,24 @@ describe('IgxGrid - Filtering actions - Excel style filtering #grid', () => {
65806580

65816581
// Scroll the search list to the bottom.
65826582
let scrollbar = GridFunctions.getExcelStyleSearchComponentScrollbar(fix);
6583+
expect(scrollbar.scrollTop).toBe(0);
6584+
let listItems = GridFunctions.getExcelStyleSearchComponentListItems(fix);
6585+
expect(listItems[0].innerText).toBe('Select All');
6586+
65836587
scrollbar.scrollTop = 3000;
65846588
await wait();
65856589
fix.detectChanges();
6590+
expect(listItems[0].innerText).not.toBe('Select All');
6591+
expect(scrollbar.scrollTop).toBeGreaterThan(300);
65866592

65876593
// Select another column
65886594
GridFunctions.clickExcelFilterIcon(fix, 'Downloads');
65896595
await wait();
65906596
fix.detectChanges();
65916597

65926598
// Update scrollbar
6593-
const searchComponent = GridFunctions.getExcelStyleSearchComponent(fix);
65946599
scrollbar = GridFunctions.getExcelStyleSearchComponentScrollbar(fix);
6595-
await wait();
6596-
fix.detectChanges();
6597-
6598-
// Get the display container and its parent and verify that the display container is at start
6599-
const displayContainer = searchComponent.querySelector('igx-display-container');
6600-
const displayContainerRect = displayContainer.getBoundingClientRect();
6601-
const parentContainerRect = displayContainer.parentElement.getBoundingClientRect();
6602-
6603-
expect(displayContainerRect.top - parentContainerRect.top <= 1).toBe(true, 'search scrollbar did not reset');
6600+
expect(scrollbar.scrollTop).toBe(0, 'search scrollbar did not reset');
66046601
});
66056602
});
66066603

0 commit comments

Comments
 (0)