From fe13f110412d85c05dc68e5ee1db499f681bf722 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 29 Jun 2017 12:06:35 -0500 Subject: Create and use project path helpers that only need a project, no namespace --- spec/features/admin/admin_disables_git_access_protocol_spec.rb | 2 +- spec/features/admin/admin_projects_spec.rb | 8 ++++---- spec/features/admin/admin_uses_repository_checks_spec.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/features/admin') diff --git a/spec/features/admin/admin_disables_git_access_protocol_spec.rb b/spec/features/admin/admin_disables_git_access_protocol_spec.rb index 679bf63e0fd..063d54270bd 100644 --- a/spec/features/admin/admin_disables_git_access_protocol_spec.rb +++ b/spec/features/admin/admin_disables_git_access_protocol_spec.rb @@ -51,7 +51,7 @@ feature 'Admin disables Git access protocol', feature: true do end def visit_project - visit namespace_project_path(project.namespace, project) + visit project_path(project) end def disable_http_protocol diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index a4ce3e1d5ee..c6488cea798 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -42,7 +42,7 @@ describe "Admin::Projects", feature: true do end it do - expect(current_path).to eq admin_namespace_project_path(project.namespace, project) + expect(current_path).to eq admin_project_path(project) end it "has project info" do @@ -62,7 +62,7 @@ describe "Admin::Projects", feature: true do end it 'transfers project to group web', js: true do - visit admin_namespace_project_path(project.namespace, project) + visit admin_project_path(project) click_button 'Search for Namespace' click_link 'group: web' @@ -79,7 +79,7 @@ describe "Admin::Projects", feature: true do end it 'adds admin a to a project as developer', js: true do - visit namespace_project_project_members_path(project.namespace, project) + visit project_project_members_path(project) page.within '.users-project-form' do select2(current_user.id, from: '#user_ids', multiple: true) @@ -102,7 +102,7 @@ describe "Admin::Projects", feature: true do end it 'removes admin from the project' do - visit namespace_project_project_members_path(project.namespace, project) + visit project_project_members_path(project) page.within '.content-list' do expect(page).to have_content(current_user.name) diff --git a/spec/features/admin/admin_uses_repository_checks_spec.rb b/spec/features/admin/admin_uses_repository_checks_spec.rb index 91d70435db8..5be0e2b2f17 100644 --- a/spec/features/admin/admin_uses_repository_checks_spec.rb +++ b/spec/features/admin/admin_uses_repository_checks_spec.rb @@ -43,6 +43,6 @@ feature 'Admin uses repository checks', feature: true do end def visit_admin_project_page(project) - visit admin_namespace_project_path(project.namespace, project) + visit admin_project_path(project) end end -- cgit v1.2.1 From 197a5df42aa65821aaa8fa628244e27ee8e1b016 Mon Sep 17 00:00:00 2001 From: Tiago Botelho Date: Wed, 5 Jul 2017 11:45:58 +0100 Subject: Allow admin to disable all restricted visibility levels --- spec/features/admin/admin_settings_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec/features/admin') diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 2d6565e6d3b..59a50ff9264 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -16,6 +16,19 @@ feature 'Admin updates settings', feature: true do expect(page).to have_content "Application settings saved successfully" end + scenario 'Uncheck all restricted visibility levels' do + find('#application_setting_visibility_level_0').set(false) + find('#application_setting_visibility_level_10').set(false) + find('#application_setting_visibility_level_20').set(false) + + click_button 'Save' + + expect(page).to have_content "Application settings saved successfully" + expect(find('#application_setting_visibility_level_0')).not_to be_checked + expect(find('#application_setting_visibility_level_10')).not_to be_checked + expect(find('#application_setting_visibility_level_20')).not_to be_checked + end + scenario 'Change application settings' do uncheck 'Gravatar enabled' fill_in 'Home page URL', with: 'https://about.gitlab.com/' -- cgit v1.2.1