diff options
Diffstat (limited to 'spec/frontend/read_more_spec.js')
-rw-r--r-- | spec/frontend/read_more_spec.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/frontend/read_more_spec.js b/spec/frontend/read_more_spec.js index 9eddc50d50a..5f7bd32e231 100644 --- a/spec/frontend/read_more_spec.js +++ b/spec/frontend/read_more_spec.js @@ -1,9 +1,8 @@ -import { loadHTMLFixture, resetHTMLFixture, setHTMLFixture } from 'helpers/fixtures'; +import htmlProjectsOverview from 'test_fixtures/projects/overview.html'; +import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import initReadMore from '~/read_more'; describe('Read more click-to-expand functionality', () => { - const fixtureName = 'projects/overview.html'; - const findTrigger = () => document.querySelector('.js-read-more-trigger'); afterEach(() => { @@ -12,7 +11,7 @@ describe('Read more click-to-expand functionality', () => { describe('expands target element', () => { beforeEach(() => { - loadHTMLFixture(fixtureName); + setHTMLFixture(htmlProjectsOverview); }); it('adds "is-expanded" class to target element', () => { @@ -42,7 +41,7 @@ describe('Read more click-to-expand functionality', () => { nestedElement.click(); }); - it('removes the trigger element', async () => { + it('removes the trigger element', () => { expect(findTrigger()).toBe(null); }); }); |