diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-02 21:08:48 +0300 |
commit | fa06c9a675d9c028905276e7d0a11aacc9f8f8ac (patch) | |
tree | e84c88aa04b4a94a144cd2d3b4d1a6fd632828b7 /spec/frontend/clusters | |
parent | 6f998d352988f93f875db862353e814e95db1fe3 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/clusters')
-rw-r--r-- | spec/frontend/clusters/clusters_bundle_spec.js | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/frontend/clusters/clusters_bundle_spec.js b/spec/frontend/clusters/clusters_bundle_spec.js index 42990334f0a..2a0610b1b0a 100644 --- a/spec/frontend/clusters/clusters_bundle_spec.js +++ b/spec/frontend/clusters/clusters_bundle_spec.js @@ -1,5 +1,6 @@ import MockAdapter from 'axios-mock-adapter'; import { loadHTMLFixture } from 'helpers/fixtures'; +import { useMockLocationHelper } from 'helpers/mock_window_location_helper'; import { setTestTimeout } from 'helpers/timeout'; import Clusters from '~/clusters/clusters_bundle'; import axios from '~/lib/utils/axios_utils'; @@ -8,6 +9,8 @@ import initProjectSelectDropdown from '~/project_select'; jest.mock('~/lib/utils/poll'); jest.mock('~/project_select'); +useMockLocationHelper(); + describe('Clusters', () => { setTestTimeout(1000); @@ -55,20 +58,6 @@ describe('Clusters', () => { }); describe('updateContainer', () => { - const { location } = window; - - beforeEach(() => { - delete window.location; - window.location = { - reload: jest.fn(), - hash: location.hash, - }; - }); - - afterEach(() => { - window.location = location; - }); - describe('when creating cluster', () => { it('should show the creating container', () => { cluster.updateContainer(null, 'creating'); |