diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-11 19:42:20 +0300 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-11 19:42:20 +0300 |
commit | 2205ed4f07265a43d2561ab2657557e317e7b9c0 (patch) | |
tree | 08e8373f874b59e78d97dd87b1c687d3458823d9 /spec/features/projects/clusters | |
parent | 3a3f4a348be936abde6881fc3909026932bf97ab (diff) | |
parent | f4e234d92a2ff31dc681d56b52e9fbbbe3f931b1 (diff) |
Merge remote-tracking branch 'origin/master' into 38759-fetch-available-parameters-directly-from-gke-when-creating-a-cluster
Diffstat (limited to 'spec/features/projects/clusters')
-rw-r--r-- | spec/features/projects/clusters/gcp_spec.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index ae05356a71e..90760c6e814 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -146,4 +146,44 @@ feature 'Gcp Cluster', :js do expect(page).to have_css('.signin-with-google') end end + + context 'when user has not dismissed GCP signup offer' do + before do + visit project_clusters_path(project) + end + + it 'user sees offer on cluster index page' do + expect(page).to have_css('.gcp-signup-offer') + end + + it 'user sees offer on cluster create page' do + click_link 'Add Kubernetes cluster' + + expect(page).to have_css('.gcp-signup-offer') + end + + it 'user sees offer on cluster GCP login page' do + click_link 'Add Kubernetes cluster' + click_link 'Create on Google Kubernetes Engine' + + expect(page).to have_css('.gcp-signup-offer') + end + end + + context 'when user has dismissed GCP signup offer' do + before do + visit project_clusters_path(project) + end + + it 'user does not see offer after dismissing' do + expect(page).to have_css('.gcp-signup-offer') + + find('.gcp-signup-offer .close').click + wait_for_requests + + click_link 'Add Kubernetes cluster' + + expect(page).not_to have_css('.gcp-signup-offer') + end + end end |