Skip to content

Commit

Permalink
fix(ESF): #4765 Updated hiding test.
Browse files Browse the repository at this point in the history
  • Loading branch information
gedinakova committed May 15, 2019
1 parent 50d8bf5 commit bd9f03d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
UIInteractions.clearOverlay();
});

it('Should sorts the grid properly, when clicking Ascending/Descending buttons.', fakeAsync(() => {
it('Should sort the grid properly, when clicking Ascending/Descending buttons.', fakeAsync(() => {

grid.columns[2].sortable = true;
fix.detectChanges();
Expand Down Expand Up @@ -3072,17 +3072,18 @@ describe('IgxGrid - Filtering actions - Excel style filtering', () => {
it('Should hide column when click on button.', fakeAsync(() => {
const headers: DebugElement[] = fix.debugElement.queryAll(By.directive(IgxGridHeaderGroupComponent));
const headerResArea = headers[2].children[0].nativeElement;

const filterIcon = headerResArea.querySelector('.igx-excel-filter__icon');
filterIcon.click();
fix.detectChanges();

const excelMenu = grid.nativeElement.querySelector('.igx-excel-filter__menu');
const hideComponent = excelMenu.querySelector('.igx-excel-filter__actions-hide');

spyOn(grid.onColumnVisibilityChanged, 'emit');
hideComponent.click();
fix.detectChanges();

expect(grid.onColumnVisibilityChanged.emit).toHaveBeenCalledTimes(1);
expect(grid.columns[2].hidden).toBeTruthy();
}));

Expand Down

0 comments on commit bd9f03d

Please sign in to comment.