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/profile | |
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/profile')
-rw-r--r-- | spec/frontend/profile/preferences/components/profile_preferences_spec.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/frontend/profile/preferences/components/profile_preferences_spec.js b/spec/frontend/profile/preferences/components/profile_preferences_spec.js index f1172a73d36..4d2dcf83d3b 100644 --- a/spec/frontend/profile/preferences/components/profile_preferences_spec.js +++ b/spec/frontend/profile/preferences/components/profile_preferences_spec.js @@ -1,6 +1,7 @@ import { GlButton } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { nextTick } from 'vue'; +import { useMockLocationHelper } from 'helpers/mock_window_location_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import createFlash from '~/flash'; import IntegrationView from '~/profile/preferences/components/integration_view.vue'; @@ -19,6 +20,8 @@ import { jest.mock('~/flash'); const expectedUrl = '/foo'; +useMockLocationHelper(); + describe('ProfilePreferences component', () => { let wrapper; const defaultProvide = { @@ -174,8 +177,6 @@ describe('ProfilePreferences component', () => { }); describe('theme changes', () => { - const { location } = window; - let themeInput; let form; @@ -197,18 +198,6 @@ describe('ProfilePreferences component', () => { form.dispatchEvent(successEvent); } - beforeAll(() => { - delete window.location; - window.location = { - ...location, - reload: jest.fn(), - }; - }); - - afterAll(() => { - window.location = location; - }); - beforeEach(() => { setupBody(); themeInput = createThemeInput(); |