summaryrefslogtreecommitdiff
path: root/spec/features/groups
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
commit6b75320f525f841454f1ab162d141d3610f2e77b (patch)
tree4971c27759e4fbc18b85e71800c3b9c12346317e /spec/features/groups
parent4226aca420920c1844e8eade4798a2dff188a6fc (diff)
downloadgitlab-ce-6b75320f525f841454f1ab162d141d3610f2e77b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups')
-rw-r--r--spec/features/groups/user_sees_package_sidebar_spec.rb47
1 files changed, 47 insertions, 0 deletions
diff --git a/spec/features/groups/user_sees_package_sidebar_spec.rb b/spec/features/groups/user_sees_package_sidebar_spec.rb
new file mode 100644
index 00000000000..f85b6841636
--- /dev/null
+++ b/spec/features/groups/user_sees_package_sidebar_spec.rb
@@ -0,0 +1,47 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe 'Groups > sidebar' do
+ let(:user) { create(:user) }
+ let(:group) { create(:group) }
+
+ before do
+ group.add_developer(user)
+ sign_in(user)
+ end
+
+ context 'Package menu' do
+ context 'when container registry is enabled' do
+ before do
+ stub_container_registry_config(enabled: true)
+ visit group_path(group)
+ end
+
+ it 'shows main menu' do
+ within '.nav-sidebar' do
+ expect(page).to have_link(_('Packages'))
+ end
+ end
+
+ it 'has container registry link' do
+ within '.nav-sidebar' do
+ expect(page).to have_link(_('Container Registry'))
+ end
+ end
+ end
+
+ context 'when container registry is disabled' do
+ before do
+ stub_container_registry_config(enabled: false)
+ visit group_path(group)
+ end
+
+ it 'does not have container registry link' do
+ within '.nav-sidebar' do
+ expect(page).not_to have_link(_('Container Registry'))
+ end
+ end
+ end
+ end
+end