summaryrefslogtreecommitdiff
path: root/spec/features/explore
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-06-08 00:37:45 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-06-08 00:37:45 +0200
commit39d976cf5881c947eefeb45a2f8fe2922923eac6 (patch)
tree29cc255d75683cb54bc20c518ec2505b5d2183ab /spec/features/explore
parent81b565ee36179561dcae8d428a712fa5fe1cc04b (diff)
downloadgitlab-ce-39d976cf5881c947eefeb45a2f8fe2922923eac6.tar.gz
Added more negative checks for public project23603-add-extra-functionality-for-the-top-right-plus-button
Diffstat (limited to 'spec/features/explore')
-rw-r--r--spec/features/explore/new_menu_spec.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/features/explore/new_menu_spec.rb b/spec/features/explore/new_menu_spec.rb
index cbd97ff74b3..15a6354211b 100644
--- a/spec/features/explore/new_menu_spec.rb
+++ b/spec/features/explore/new_menu_spec.rb
@@ -4,8 +4,8 @@ feature 'Top Plus Menu', feature: true, js: true do
let(:user) { create :user }
let(:guest_user) { create :user}
let(:group) { create(:group) }
- let(:public_group) { create(:group, :public) }
let(:project) { create(:project, :repository, creator: user, namespace: user.namespace) }
+ let(:public_project) { create(:project, :public) }
before do
group.add_owner(user)
@@ -127,6 +127,24 @@ feature 'Top Plus Menu', feature: true, js: true do
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
end
+ scenario 'public project has no New Issue Button' do
+ visit namespace_project_path(public_project.namespace, public_project)
+
+ hasnot_topmenuitem("New issue")
+ end
+
+ scenario 'public project has no New merge request menu item' do
+ visit namespace_project_path(public_project.namespace, public_project)
+
+ hasnot_topmenuitem("New merge request")
+ end
+
+ scenario 'public project has no New project snippet menu item' do
+ visit namespace_project_path(public_project.namespace, public_project)
+
+ expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
+ end
+
scenario 'has no New subgroup menu item' do
visit group_path(group)