Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-05 18:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-05 18:10:05 +0300
commitcf05fd7f3956f0b1a17caf313e89bb7b3315d947 (patch)
tree8d847ad538180a03a6a25e7ee81605d2f86358d5 /spec/views
parent023e050d82ed11d9060ce5bdaec99c3871b98164 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb34
1 files changed, 33 insertions, 1 deletions
diff --git a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
index 640f463b45d..d46ba86a22e 100644
--- a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe 'layouts/nav/sidebar/_group' do
- let(:group) { create(:group) }
+ let_it_be(:group) { create(:group) }
before do
assign(:group, group)
@@ -11,4 +11,36 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
it_behaves_like 'has nav sidebar'
it_behaves_like 'sidebar includes snowplow attributes', 'render', 'groups_side_navigation', 'groups_side_navigation'
+
+ describe 'Group information' do
+ it 'has a link to the group path' do
+ render
+
+ expect(rendered).to have_link('Group information', href: group_path(group))
+ end
+
+ it 'does not have a link to the details menu item' do
+ render
+
+ expect(rendered).not_to have_link('Details', href: details_group_path(group))
+ end
+
+ context 'when feature flag :sidebar_refactor is disabled' do
+ before do
+ stub_feature_flags(sidebar_refactor: false)
+ end
+
+ it 'has a link to the group path with the "Group overview" title' do
+ render
+
+ expect(rendered).to have_link('Group overview', href: group_path(group))
+ end
+
+ it 'has a link to the details menu item' do
+ render
+
+ expect(rendered).to have_link('Details', href: details_group_path(group))
+ end
+ end
+ end
end