diff options
Diffstat (limited to 'spec/frontend/header_spec.js')
-rw-r--r-- | spec/frontend/header_spec.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/frontend/header_spec.js b/spec/frontend/header_spec.js index 937bc9aa478..19849fba63c 100644 --- a/spec/frontend/header_spec.js +++ b/spec/frontend/header_spec.js @@ -1,6 +1,7 @@ import $ from 'jquery'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; import initTodoToggle, { initNavUserDropdownTracking } from '~/header'; +import { loadHTMLFixture, setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; describe('Header', () => { describe('Todos notification', () => { @@ -17,7 +18,11 @@ describe('Header', () => { beforeEach(() => { initTodoToggle(); - loadFixtures(fixtureTemplate); + loadHTMLFixture(fixtureTemplate); + }); + + afterEach(() => { + resetHTMLFixture(); }); it('should update todos-count after receiving the todo:toggle event', () => { @@ -57,7 +62,7 @@ describe('Header', () => { let trackingSpy; beforeEach(() => { - setFixtures(` + setHTMLFixture(` <li class="js-nav-user-dropdown"> <a class="js-buy-pipeline-minutes-link" data-track-action="click_buy_ci_minutes" data-track-label="free" data-track-property="user_dropdown">Buy Pipeline minutes</a> </li>`); @@ -70,6 +75,7 @@ describe('Header', () => { afterEach(() => { unmockTracking(); + resetHTMLFixture(); }); it('sends a tracking event when the dropdown is opened and contains Buy Pipeline minutes link', () => { |