Skip to content

Commit

Permalink
test(igx-tabs): Adjust some of the tests, #3269
Browse files Browse the repository at this point in the history
  • Loading branch information
sstoyanovIG committed Jan 8, 2019
1 parent 61f3b22 commit 363dbc5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/igniteui-angular/src/lib/tabs/tabs.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ describe('IgxTabs', () => {
tick(100);
fixture.detectChanges();

fixture.componentInstance.wrapperDiv.nativeElement.style.width = '400px';
fixture.componentInstance.wrapperDiv.nativeElement.style.width = '200px';
tick(100);
fixture.detectChanges();

const rightScrollButton = tabs.headerContainer.nativeElement.children[2];
window.dispatchEvent(new Event('resize'));
rightScrollButton.dispatchEvent(new Event('click', { bubbles: true }));

tick(500);
tick(100);
fixture.detectChanges();
expect(tabs.offset).toBeGreaterThan(0);

Expand Down Expand Up @@ -322,13 +322,13 @@ describe('IgxTabs', () => {
fixture.detectChanges();
expect(tabs.selectedIndex).toBe(2);

tick(100);
tick();
fixture.detectChanges();
expect(tabs.groups.toArray()[2].isSelected).toBeTruthy();

tick(100);
tick();
fixture.detectChanges();
expect(tabs.selectedIndicator.nativeElement.style.transform).toBe('translate(320px)');
expect(tabs.selectedIndicator.nativeElement.style.transform).toBe('translate(180px)');
}));
});

Expand Down

0 comments on commit 363dbc5

Please sign in to comment.