diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-03-14 18:46:43 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-03-14 18:46:43 +0300 |
commit | 4891e8a540313745c8fc1a2a1bdb951be9843fba (patch) | |
tree | cff8b8d3d3552bbaaf3a222b7eaea5b3872a9c62 /spec/features | |
parent | 92b1f1c276f38e3621d42a8c913a51d9391e6d5b (diff) | |
parent | b1318cd18873971041a8fa0ec52cfbdc420a007f (diff) |
Merge branch '56833-project-improve-empty-repository-state-ui-fe' into 'master'
Resolve "Project: Improve empty repository state UI [FE]"
Closes #56833
See merge request gitlab-org/gitlab-ce!26024
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/projects/show/user_sees_git_instructions_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb | 58 |
2 files changed, 10 insertions, 50 deletions
diff --git a/spec/features/projects/show/user_sees_git_instructions_spec.rb b/spec/features/projects/show/user_sees_git_instructions_spec.rb index ffa80235083..0d59ef4a727 100644 --- a/spec/features/projects/show/user_sees_git_instructions_spec.rb +++ b/spec/features/projects/show/user_sees_git_instructions_spec.rb @@ -13,7 +13,7 @@ describe 'Projects > Show > User sees Git instructions' do it 'shows Git command line instructions' do click_link 'Create empty repository' - page.within '.empty_wrapper' do + page.within '.empty-wrapper' do expect(page).to have_content('Command line instructions') end end diff --git a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb index dcca1d388c7..58bd20d7551 100644 --- a/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb +++ b/spec/features/projects/show/user_sees_setup_shortcut_buttons_spec.rb @@ -20,18 +20,18 @@ describe 'Projects > Show > User sees setup shortcut buttons' do visit project_path(project) end - it 'no Auto DevOps button if can not manage pipelines' do - page.within('.project-buttons') do - expect(page).not_to have_link('Enable Auto DevOps') - expect(page).not_to have_link('Auto DevOps enabled') - end - end - - it '"Auto DevOps enabled" button not linked' do + it 'Project buttons are not visible' do visit project_path(project) page.within('.project-buttons') do - expect(page).to have_text('Auto DevOps enabled') + expect(page).not_to have_link('New file') + expect(page).not_to have_link('Add README') + expect(page).not_to have_link('Add CHANGELOG') + expect(page).not_to have_link('Add CONTRIBUTING') + expect(page).not_to have_link('Enable Auto DevOps') + expect(page).not_to have_link('Auto DevOps enabled') + expect(page).not_to have_link('Add Kubernetes cluster') + expect(page).not_to have_link('Kubernetes configured') end end end @@ -61,46 +61,6 @@ describe 'Projects > Show > User sees setup shortcut buttons' do expect(page).to have_link('Add license', href: presenter.add_license_path) end end - - describe 'Auto DevOps button' do - context 'when Auto DevOps is enabled' do - it '"Auto DevOps enabled" anchor linked to settings page' do - visit project_path(project) - - page.within('.project-buttons') do - expect(page).to have_link('Auto DevOps enabled', href: project_settings_ci_cd_path(project, anchor: 'autodevops-settings')) - end - end - end - - context 'when Auto DevOps is not enabled' do - let(:project) { create(:project, :public, :empty_repo, auto_devops_attributes: { enabled: false }) } - - it '"Enable Auto DevOps" button linked to settings page' do - page.within('.project-buttons') do - expect(page).to have_link('Enable Auto DevOps', href: project_settings_ci_cd_path(project, anchor: 'autodevops-settings')) - end - end - end - end - - describe 'Kubernetes cluster button' do - it '"Add Kubernetes cluster" button linked to clusters page' do - page.within('.project-buttons') do - expect(page).to have_link('Add Kubernetes cluster', href: new_project_cluster_path(project)) - end - end - - it '"Kubernetes cluster" anchor linked to cluster page' do - cluster = create(:cluster, :provided_by_gcp, projects: [project]) - - visit project_path(project) - - page.within('.project-buttons') do - expect(page).to have_link('Kubernetes configured', href: project_cluster_path(project, cluster)) - end - end - end end end |