summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-11-01 18:37:25 +0000
committerFatih Acet <acetfatih@gmail.com>2016-11-01 18:37:25 +0000
commitbd0bd8ccdcd9b0def1094d998f9575430f8bbdb3 (patch)
tree8dae48b34543e22d2c117c0819b16f42e3a64144 /spec/features
parent7ac414693b7bcedad23a7c45738da44f1fe7675e (diff)
parente765299fa91013ede9312c3eb0437ba627610a97 (diff)
downloadgitlab-ce-bd0bd8ccdcd9b0def1094d998f9575430f8bbdb3.tar.gz
Merge branch 'project-activity-tabs-hide' into 'master'
Hide project activity tabs when features are disabled ## What does this MR do? When features are disabled in project settings, the activity tabs are now correctly hidden. ## Screenshots (if relevant) ![Screen_Shot_2016-10-21_at_12.15.27](/uploads/3d85c027aa05487001c8abd624a99be0/Screen_Shot_2016-10-21_at_12.15.27.png) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/19734#note_17224181 See merge request !7038
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/features_visibility_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/projects/features_visibility_spec.rb b/spec/features/projects/features_visibility_spec.rb
index d25cf7fb353..e796ee570b7 100644
--- a/spec/features/projects/features_visibility_spec.rb
+++ b/spec/features/projects/features_visibility_spec.rb
@@ -164,5 +164,23 @@ describe 'Edit Project Settings', feature: true do
expect(page).to have_content "Customize your workflow!"
end
+
+ it "hides project activity tabs" 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 activity_namespace_project_path(project.namespace, project)
+
+ page.within(".event-filter") do
+ expect(page).to have_selector("a", count: 2)
+ expect(page).not_to have_content("Push events")
+ expect(page).not_to have_content("Merge events")
+ expect(page).not_to have_content("Comments")
+ end
+ end
end
end