diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 03:07:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-18 03:07:45 +0300 |
commit | 7c077d960393e14b56d43cceaa7f609c703ac55f (patch) | |
tree | c3a5d79554b9be1d7434c8e9a8fcae35ab64af32 /spec/features/projects | |
parent | da35510cdad8f8d3cb6c119682dc2735531983cd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/clusters/eks_spec.rb | 34 | ||||
-rw-r--r-- | spec/features/projects/clusters/gcp_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/clusters_spec.rb | 2 |
3 files changed, 37 insertions, 1 deletions
diff --git a/spec/features/projects/clusters/eks_spec.rb b/spec/features/projects/clusters/eks_spec.rb new file mode 100644 index 00000000000..758dccd6e49 --- /dev/null +++ b/spec/features/projects/clusters/eks_spec.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'AWS EKS Cluster', :js do + let(:project) { create(:project) } + let(:user) { create(:user) } + + before do + project.add_maintainer(user) + gitlab_sign_in(user) + allow(Projects::ClustersController).to receive(:STATUS_POLLING_INTERVAL) { 100 } + end + + context 'when user does not have a cluster and visits cluster index page' do + let(:project_id) { 'test-project-1234' } + + before do + visit project_clusters_path(project) + + click_link 'Add Kubernetes cluster' + end + + context 'when user creates a cluster on AWS EKS' do + before do + click_link 'Amazon EKS' + end + + it 'user sees a form to create an EKS cluster' do + expect(page).to have_selector(:css, '.js-create-eks-cluster') + end + end + end +end diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb index a11237db508..b5ab9faa14b 100644 --- a/spec/features/projects/clusters/gcp_spec.rb +++ b/spec/features/projects/clusters/gcp_spec.rb @@ -177,6 +177,7 @@ describe 'Gcp Cluster', :js do context 'when user has not dismissed GCP signup offer' do before do + stub_feature_flags(create_eks_clusters: false) visit project_clusters_path(project) end @@ -200,6 +201,7 @@ describe 'Gcp Cluster', :js do context 'when user has dismissed GCP signup offer' do before do + stub_feature_flags(create_eks_clusters: false) visit project_clusters_path(project) end diff --git a/spec/features/projects/clusters_spec.rb b/spec/features/projects/clusters_spec.rb index d1cd19dff2d..67d14d0a58a 100644 --- a/spec/features/projects/clusters_spec.rb +++ b/spec/features/projects/clusters_spec.rb @@ -74,7 +74,7 @@ describe 'Clusters', :js do visit project_clusters_path(project) click_link 'Add Kubernetes cluster' - click_link 'Create new Cluster on GKE' + click_link 'Create new Cluster' end it 'user sees a link to create a GKE cluster' do |