diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-28 18:53:57 +0300 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-28 18:53:57 +0300 |
commit | f7efc5f8b7e0d8fd77f53de2f1c70863f866aa6f (patch) | |
tree | e1e719a02fa43e5239fced39336bfeaecd768e1f /spec/javascripts/projects | |
parent | 2e4bea09a6e7758764f4a180fdf4e78333cfe897 (diff) |
update tests
Diffstat (limited to 'spec/javascripts/projects')
-rw-r--r-- | spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js | 2 | ||||
-rw-r--r-- | spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js | 23 |
2 files changed, 22 insertions, 3 deletions
diff --git a/spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js b/spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js index d13d92c94e5..d4fcb2dc8ff 100644 --- a/spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js +++ b/spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js @@ -47,7 +47,7 @@ describe('GkeProjectIdDropdown', () => { }); it('returns project billing validation text', () => { - vm.isValidatingProjectBilling = true; + vm.setIsValidatingProjectBilling(true); expect(vm.toggleText).toBe(LABELS.VALIDATING_PROJECT_BILLING); }); diff --git a/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js b/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js index 46085fe97aa..9d892b8185b 100644 --- a/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js +++ b/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js @@ -50,6 +50,19 @@ describe('GCP Cluster Dropdown Store Actions', () => { }); }); + describe('setIsValidatingProjectBilling', () => { + it('should set machine type', done => { + testAction( + actions.setIsValidatingProjectBilling, + true, + { isValidatingProjectBilling: null }, + [{ type: 'SET_IS_VALIDATING_PROJECT_BILLING', payload: true }], + [], + done, + ); + }); + }); + describe('async fetch methods', () => { window.gapi = gapi(); @@ -74,10 +87,16 @@ describe('GCP Cluster Dropdown Store Actions', () => { true, { selectedProject: selectedProjectMock, + selectedZone: '', + selectedMachineType: '', projectHasBillingEnabled: null, }, - [{ type: 'SET_PROJECT_BILLING_STATUS', payload: true }], - [], + [ + { type: 'SET_ZONE', payload: '' }, + { type: 'SET_MACHINE_TYPE', payload: '' }, + { type: 'SET_PROJECT_BILLING_STATUS', payload: true }, + ], + [{ type: 'setIsValidatingProjectBilling', payload: false }], done, ); }); |