diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 00:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-20 00:09:06 +0300 |
commit | a7d1db72c912ef512c25724392f1c903e8d3bd7e (patch) | |
tree | 15c9ca0c24a94aff8ca33cdd2212f9a2997d5571 /spec/javascripts | |
parent | 33795139ea8e72756bee3675b4e16387425e6ab1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/create_cluster/gke_cluster/stores/mutations_spec.js | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/spec/javascripts/create_cluster/gke_cluster/stores/mutations_spec.js b/spec/javascripts/create_cluster/gke_cluster/stores/mutations_spec.js deleted file mode 100644 index 7ee6ff436e2..00000000000 --- a/spec/javascripts/create_cluster/gke_cluster/stores/mutations_spec.js +++ /dev/null @@ -1,87 +0,0 @@ -import { createStore } from '~/create_cluster/gke_cluster/store'; -import * as types from '~/create_cluster/gke_cluster/store/mutation_types'; -import { - selectedProjectMock, - selectedZoneMock, - selectedMachineTypeMock, - gapiProjectsResponseMock, - gapiZonesResponseMock, - gapiMachineTypesResponseMock, -} from '../mock_data'; - -describe('GCP Cluster Dropdown Store Mutations', () => { - let store; - - beforeEach(() => { - store = createStore(); - }); - - describe('SET_PROJECT', () => { - it('should set GCP project as selectedProject', () => { - const projectToSelect = gapiProjectsResponseMock.projects[0]; - - store.commit(types.SET_PROJECT, projectToSelect); - - expect(store.state.selectedProject.projectId).toEqual(selectedProjectMock.projectId); - expect(store.state.selectedProject.name).toEqual(selectedProjectMock.name); - }); - }); - - describe('SET_PROJECT_BILLING_STATUS', () => { - it('should set project billing status', () => { - store.commit(types.SET_PROJECT_BILLING_STATUS, true); - - expect(store.state.projectHasBillingEnabled).toBeTruthy(); - }); - }); - - describe('SET_ZONE', () => { - it('should set GCP zone as selectedZone', () => { - const zoneToSelect = gapiZonesResponseMock.items[0].name; - - store.commit(types.SET_ZONE, zoneToSelect); - - expect(store.state.selectedZone).toEqual(selectedZoneMock); - }); - }); - - describe('SET_MACHINE_TYPE', () => { - it('should set GCP machine type as selectedMachineType', () => { - const machineTypeToSelect = gapiMachineTypesResponseMock.items[0].name; - - store.commit(types.SET_MACHINE_TYPE, machineTypeToSelect); - - expect(store.state.selectedMachineType).toEqual(selectedMachineTypeMock); - }); - }); - - describe('SET_PROJECTS', () => { - it('should set Google API Projects response as projects', () => { - expect(store.state.projects.length).toEqual(0); - - store.commit(types.SET_PROJECTS, gapiProjectsResponseMock.projects); - - expect(store.state.projects.length).toEqual(gapiProjectsResponseMock.projects.length); - }); - }); - - describe('SET_ZONES', () => { - it('should set Google API Zones response as zones', () => { - expect(store.state.zones.length).toEqual(0); - - store.commit(types.SET_ZONES, gapiZonesResponseMock.items); - - expect(store.state.zones.length).toEqual(gapiZonesResponseMock.items.length); - }); - }); - - describe('SET_MACHINE_TYPES', () => { - it('should set Google API Machine Types response as machineTypes', () => { - expect(store.state.machineTypes.length).toEqual(0); - - store.commit(types.SET_MACHINE_TYPES, gapiMachineTypesResponseMock.items); - - expect(store.state.machineTypes.length).toEqual(gapiMachineTypesResponseMock.items.length); - }); - }); -}); |