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-06-02 21:10:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-02 21:10:01 +0300
commite84a2fdfc862ac63fe4be9df2f940c22a0c9aba3 (patch)
tree8a64589231ede24f385d2819b3440fca001e482d /spec/views
parent1c2ff01b694fd06be15bc20279eef71ee5adf402 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
index 9b6d98a12a8..60c0009a4aa 100644
--- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
@@ -1338,4 +1338,22 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
end
it_behaves_like 'sidebar includes snowplow attributes', 'render', 'projects_side_navigation', 'projects_side_navigation'
+
+ describe 'Collapsed menu items' do
+ it 'does not render the collapsed top menu as a link' do
+ render
+
+ expect(rendered).not_to have_selector('.sidebar-sub-level-items > li.fly-out-top-item > a')
+ end
+
+ context 'when feature flag :sidebar_refactor is disabled' do
+ it 'renders the collapsed top menu as a link' do
+ stub_feature_flags(sidebar_refactor: false)
+
+ render
+
+ expect(rendered).to have_selector('.sidebar-sub-level-items > li.fly-out-top-item > a')
+ end
+ end
+ end
end