diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-02 00:06:43 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-02 00:06:43 +0300 |
commit | 9c4066878fe309781bbadd20f87c223c12dc60f6 (patch) | |
tree | b5a5adefc861696c4ebb75d937fe70b9241d5bdc /spec/features | |
parent | 77a73903aa803869d0ab7fe544cc2d8b1a6aa1e0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/clusters/eks_spec.rb | 29 | ||||
-rw-r--r-- | spec/features/groups/clusters/eks_spec.rb | 35 | ||||
-rw-r--r-- | spec/features/projects/clusters/eks_spec.rb | 2 |
3 files changed, 65 insertions, 1 deletions
diff --git a/spec/features/admin/clusters/eks_spec.rb b/spec/features/admin/clusters/eks_spec.rb new file mode 100644 index 00000000000..b262db1ad7c --- /dev/null +++ b/spec/features/admin/clusters/eks_spec.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'Instance-level AWS EKS Cluster', :js do + let(:user) { create(:admin) } + + before do + sign_in(user) + end + + context 'when user does not have a cluster and visits group clusters page' do + before do + visit admin_clusters_path + + 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_content('Create new Cluster on EKS') + end + end + end +end diff --git a/spec/features/groups/clusters/eks_spec.rb b/spec/features/groups/clusters/eks_spec.rb new file mode 100644 index 00000000000..b6942304c22 --- /dev/null +++ b/spec/features/groups/clusters/eks_spec.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe 'Group AWS EKS Cluster', :js do + let(:group) { create(:group) } + let(:user) { create(:user) } + + before do + group.add_maintainer(user) + gitlab_sign_in(user) + + allow(Groups::ClustersController).to receive(:STATUS_POLLING_INTERVAL) { 100 } + allow_any_instance_of(Clusters::Kubernetes::CreateOrUpdateNamespaceService).to receive(:execute) + allow_any_instance_of(Clusters::Cluster).to receive(:retrieve_connection_status).and_return(:connected) + end + + context 'when user does not have a cluster and visits group clusters page' do + before do + visit group_clusters_path(group) + + 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_content('Create new Cluster on EKS') + end + end + end +end diff --git a/spec/features/projects/clusters/eks_spec.rb b/spec/features/projects/clusters/eks_spec.rb index 758dccd6e49..9cb989b8004 100644 --- a/spec/features/projects/clusters/eks_spec.rb +++ b/spec/features/projects/clusters/eks_spec.rb @@ -27,7 +27,7 @@ describe 'AWS EKS Cluster', :js do end it 'user sees a form to create an EKS cluster' do - expect(page).to have_selector(:css, '.js-create-eks-cluster') + expect(page).to have_content('Create new Cluster on EKS') end end end |