Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/clusters/clusters_bundle_spec.js')
-rw-r--r--spec/frontend/clusters/clusters_bundle_spec.js17
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');