diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /spec/frontend/diffs/components/compare_versions_spec.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'spec/frontend/diffs/components/compare_versions_spec.js')
-rw-r--r-- | spec/frontend/diffs/components/compare_versions_spec.js | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/spec/frontend/diffs/components/compare_versions_spec.js b/spec/frontend/diffs/components/compare_versions_spec.js index 80a51ee137a..1c0cb1193fa 100644 --- a/spec/frontend/diffs/components/compare_versions_spec.js +++ b/spec/frontend/diffs/components/compare_versions_spec.js @@ -1,5 +1,6 @@ import { mount, createLocalVue } from '@vue/test-utils'; import Vuex from 'vuex'; +import setWindowLocation from 'helpers/set_window_location_helper'; import { TEST_HOST } from 'helpers/test_constants'; import { trimText } from 'helpers/text_helper'; import CompareVersionsComponent from '~/diffs/components/compare_versions.vue'; @@ -13,6 +14,10 @@ localVue.use(Vuex); const NEXT_COMMIT_URL = `${TEST_HOST}/?commit_id=next`; const PREV_COMMIT_URL = `${TEST_HOST}/?commit_id=prev`; +beforeEach(() => { + setWindowLocation(TEST_HOST); +}); + describe('CompareVersions', () => { let wrapper; let store; @@ -215,15 +220,7 @@ describe('CompareVersions', () => { describe('prev commit', () => { beforeAll(() => { - global.jsdom.reconfigure({ - url: `${TEST_HOST}?commit_id=${mrCommit.id}`, - }); - }); - - afterAll(() => { - global.jsdom.reconfigure({ - url: TEST_HOST, - }); + setWindowLocation(`?commit_id=${mrCommit.id}`); }); beforeEach(() => { @@ -258,15 +255,7 @@ describe('CompareVersions', () => { describe('next commit', () => { beforeAll(() => { - global.jsdom.reconfigure({ - url: `${TEST_HOST}?commit_id=${mrCommit.id}`, - }); - }); - - afterAll(() => { - global.jsdom.reconfigure({ - url: TEST_HOST, - }); + setWindowLocation(`?commit_id=${mrCommit.id}`); }); beforeEach(() => { |