Commit 96d02a33 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch '323178-remove-list-from-requirements' into 'master'

Removed "Lists" entry from Requirements nav item [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!58638
parents c6137e87 c899740a
---
name: project_sidebar_refactor
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58638
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326111
milestone: '13.11'
type: development
group: group::editor
default_enabled: false
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
= sprite_icon('requirements') = sprite_icon('requirements')
%span.nav-item-name %span.nav-item-name
= _('Requirements') = _('Requirements')
%ul.sidebar-sub-level-items - if Feature.disabled?(:project_sidebar_refactor)
= nav_link(path: 'requirements#index', html_options: { class: "fly-out-top-item" } ) do %ul.sidebar-sub-level-items
= link_to project_requirements_management_requirements_path(project) do = nav_link(path: 'requirements#index', html_options: { class: "fly-out-top-item" } ) do
%strong.fly-out-top-item-name= _('Requirements') = link_to project_requirements_management_requirements_path(project) do
%li.divider.fly-out-top-item %strong.fly-out-top-item-name= _('Requirements')
= nav_link(path: 'requirements#index', html_options: { class: 'home' }) do %li.divider.fly-out-top-item
= link_to project_requirements_management_requirements_path(project), title: 'List' do = nav_link(path: 'requirements#index', html_options: { class: 'home' }) do
%span= _('List') = link_to project_requirements_management_requirements_path(project), title: 'List' do
%span= _('List')
...@@ -81,18 +81,42 @@ RSpec.describe 'Project navbar' do ...@@ -81,18 +81,42 @@ RSpec.describe 'Project navbar' do
context 'when requirements is available' do context 'when requirements is available' do
before do before do
stub_licensed_features(requirements: true) stub_licensed_features(requirements: true)
end
insert_after_nav_item( context 'with flag enabled' do
_('Merge requests'), before do
new_nav_item: { stub_feature_flags(project_sidebar_refactor: true)
nav_item: _('Requirements'),
nav_sub_items: [_('List')]
}
)
visit project_path(project) insert_after_nav_item(
_('Merge requests'),
new_nav_item: {
nav_item: _('Requirements'),
nav_sub_items: []
}
)
visit project_path(project)
end
it_behaves_like 'verified navigation bar'
end end
it_behaves_like 'verified navigation bar' context 'with flag disabled' do
before do
stub_feature_flags(project_sidebar_refactor: false)
insert_after_nav_item(
_('Merge requests'),
new_nav_item: {
nav_item: _('Requirements'),
nav_sub_items: [_('List')]
}
)
visit project_path(project)
end
it_behaves_like 'verified navigation bar'
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment