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:
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