Skip to content

Commit

Permalink
test(esf): test for 'false' value in search #5520
Browse files Browse the repository at this point in the history
  • Loading branch information
tachojelev committed Jul 26, 2019
1 parent 1d45e7f commit 6171432
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4420,6 +4420,26 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
fix.detectChanges();
}));

it('Should include \'false\' value in results when searching.', fakeAsync(() => {
// Open excel style custom filtering dialog.
GridFunctions.clickExcelFilterIcon(fix, 'Released');
fix.detectChanges();

// Type string in search box.
const searchComponent = GridFunctions.getExcelStyleSearchComponent(fix);
const inputNativeElement = searchComponent.querySelector('.igx-input-group__input');
sendInputNativeElement(inputNativeElement, 'false', fix);
tick(100);
fix.detectChanges();

// Verify that the first item is 'Select All' and the second item is 'false'.
const listItems = GridFunctions.sortNativeElementsVertically(
Array.from(searchComponent.querySelectorAll('igx-list-item')));
expect(listItems.length).toBe(2, 'incorrect rendered list items count');
expect(listItems[0].innerText).toBe('Select All');
expect(listItems[1].innerText).toBe('false');
}));

it('should scroll items in search list correctly', (async () => {
// Add additional rows as prerequisite for the test
for (let index = 0; index < 30; index++) {
Expand Down

0 comments on commit 6171432

Please sign in to comment.