diff options
Diffstat (limited to 'spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js')
-rw-r--r-- | spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js b/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js index 809da3f9088..016ecfb35b8 100644 --- a/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js +++ b/spec/javascripts/create_cluster/gke_cluster/components/gke_project_id_dropdown_spec.js @@ -4,6 +4,7 @@ import { createStore } from '~/create_cluster/gke_cluster/store'; import { SET_PROJECTS } from '~/create_cluster/gke_cluster/store/mutation_types'; import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { emptyProjectMock, selectedProjectMock } from '../mock_data'; +import { gapi } from '../helpers'; const componentConfig = { docsUrl: 'https://console.cloud.google.com/home/dashboard', @@ -32,6 +33,16 @@ describe('GkeProjectIdDropdown', () => { let vm; let store; + let originalGapi; + beforeAll(() => { + originalGapi = window.gapi; + window.gapi = gapi(); + }); + + afterAll(() => { + window.gapi = originalGapi; + }); + beforeEach(() => { store = createStore(); vm = createComponent(store); |