diff options
Diffstat (limited to 'spec/frontend/new_branch_spec.js')
-rw-r--r-- | spec/frontend/new_branch_spec.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/frontend/new_branch_spec.js b/spec/frontend/new_branch_spec.js index 5a09598059d..baff5ebfdb8 100644 --- a/spec/frontend/new_branch_spec.js +++ b/spec/frontend/new_branch_spec.js @@ -1,4 +1,5 @@ -import { loadHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; +import htmlBranchesNewBranch from 'test_fixtures/branches/new_branch.html'; +import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import NewBranchForm from '~/new_branch_form'; describe('Branch', () => { @@ -11,7 +12,7 @@ describe('Branch', () => { describe('create a new branch', () => { function fillNameWith(value) { document.querySelector('.js-branch-name').value = value; - const event = new CustomEvent('blur'); + const event = new CustomEvent('change'); document.querySelector('.js-branch-name').dispatchEvent(event); } @@ -20,7 +21,7 @@ describe('Branch', () => { } beforeEach(() => { - loadHTMLFixture('branches/new_branch.html'); + setHTMLFixture(htmlBranchesNewBranch); document.querySelector('form').addEventListener('submit', (e) => e.preventDefault()); testContext.form = new NewBranchForm(document.querySelector('.js-create-branch-form'), []); }); |