diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-31 12:28:48 +0300 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-31 12:28:48 +0300 |
commit | d363014c36708864df09f39cb64415073a1430a0 (patch) | |
tree | fbd3332dcf41a518c390b07d3bdcc7bef2cfdbec /spec/features/projects/clusters | |
parent | b4308842deb79c1364302188a41c6e37c14b62ec (diff) | |
parent | 5b9edea9f16d57ef82f4a69eacd91c13d068583d (diff) |
Merge remote-tracking branch 'origin/master' into 43446-new-cluster-page-tabs
# Conflicts:
# app/controllers/projects/clusters/gcp_controller.rb
# app/views/projects/clusters/gcp/_form.html.haml
# app/views/projects/clusters/gcp/login.html.haml
Diffstat (limited to 'spec/features/projects/clusters')
-rw-r--r-- | spec/features/projects/clusters/gcp_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index 2eb79c9b282..0ebe3459a65 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -31,6 +31,8 @@ feature 'Gcp Cluster', :js do end context 'when user filled form with valid parameters' do + subject { click_button 'Create Kubernetes cluster' } + before do allow_any_instance_of(GoogleApi::CloudPlatform::Client) .to receive(:projects_zones_clusters_create) do @@ -52,10 +54,15 @@ feature 'Gcp Cluster', :js do fill_in 'cluster[provider_gcp_attributes][gcp_project_id]', with: 'gcp-project-123' fill_in 'cluster[provider_gcp_attributes][zone]', with: 'us-central1-a' fill_in 'cluster[provider_gcp_attributes][machine_type]', with: 'n1-standard-2' - click_button 'Create Kubernetes cluster' + end + + it 'users sees a form with the GCP token' do + expect(page).to have_selector(:css, 'form[data-token="token"]') end it 'user sees a cluster details page and creation status' do + subject + expect(page).to have_content('Kubernetes cluster is being created on Google Kubernetes Engine...') Clusters::Cluster.last.provider.make_created! @@ -64,6 +71,8 @@ feature 'Gcp Cluster', :js do end it 'user sees a error if something wrong during creation' do + subject + expect(page).to have_content('Kubernetes cluster is being created on Google Kubernetes Engine...') Clusters::Cluster.last.provider.make_errored!('Something wrong!') |