Skip to content

Commit

Permalink
Add resize test
Browse files Browse the repository at this point in the history
  • Loading branch information
jadu-pulsar committed Aug 13, 2018
1 parent 8dffae3 commit a2234ad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/js/web/NavMainComponentTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ describe('NavMainComponent', function () {
});
});

describe('when the window is resized, the initial tabindex should be changed to -1', function () {
beforeEach(function () {
this.navMainComponent.init();
this.window.matchMedia.returns({matches: false});
this.navMainComponent.manageTabIndexes();
this.$window.trigger('resize');
});

it('should maintain the initial tabindex', function () {
expect(this.$linkOne.attr('tabindex')).to.equal('-1');
});
});

describe('When mobile menu button is clicked', function () {
beforeEach(function () {
this.navMainComponent.init();
Expand Down

0 comments on commit a2234ad

Please sign in to comment.