diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-09-16 16:15:39 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-10-17 18:12:18 -0200 |
commit | da07c2e4d3d382c05ec287ee60f639b870074fe7 (patch) | |
tree | f6ffa7fd29fe177d4d78c0e043a1fdcff5b6eba4 /spec/features/projects/features_visibility_spec.rb | |
parent | c49e152605ad1fe77bea6414c383cf70669ca110 (diff) | |
download | gitlab-ce-da07c2e4d3d382c05ec287ee60f639b870074fe7.tar.gz |
Add visibility level to project repositoryissue_19734_2
Diffstat (limited to 'spec/features/projects/features_visibility_spec.rb')
-rw-r--r-- | spec/features/projects/features_visibility_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb index 9b487e350f2..1d4484a9edd 100644 --- a/spec/features/projects/features_visibility_spec.rb +++ b/spec/features/projects/features_visibility_spec.rb @@ -2,8 +2,11 @@ require 'spec_helper' include WaitForAjax describe 'Edit Project Settings', feature: true do + include WaitForAjax + let(:member) { create(:user) } let!(:project) { create(:project, :public, path: 'gitlab', name: 'sample') } + let!(:issue) { create(:issue, project: project) } let(:non_member) { create(:user) } describe 'project features visibility selectors', js: true do @@ -119,4 +122,31 @@ describe 'Edit Project Settings', feature: true do end end end + + describe 'repository visibility', js: true do + before do + project.team << [member, :master] + login_as(member) + visit edit_namespace_project_path(project.namespace, project) + end + + it "disables repository related features" do + select "Disabled", from: "project_project_feature_attributes_repository_access_level" + + expect(find(".edit-project")).to have_selector("select.disabled", count: 2) + end + + it "shows empty features project homepage" do + select "Disabled", from: "project_project_feature_attributes_repository_access_level" + select "Disabled", from: "project_project_feature_attributes_issues_access_level" + select "Disabled", from: "project_project_feature_attributes_wiki_access_level" + + click_button "Save changes" + wait_for_ajax + + visit namespace_project_path(project.namespace, project) + + expect(page).to have_content "Customize your workflow!" + end + end end |