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 @@
= sprite_icon('requirements')
%span.nav-item-name
= _('Requirements')
%ul.sidebar-sub-level-items
= nav_link(path: 'requirements#index', html_options: { class: "fly-out-top-item" } ) do
= link_to project_requirements_management_requirements_path(project) do
%strong.fly-out-top-item-name= _('Requirements')
%li.divider.fly-out-top-item
= nav_link(path: 'requirements#index', html_options: { class: 'home' }) do
= link_to project_requirements_management_requirements_path(project), title: 'List' do
%span= _('List')
- if Feature.disabled?(:project_sidebar_refactor)
%ul.sidebar-sub-level-items
= nav_link(path: 'requirements#index', html_options: { class: "fly-out-top-item" } ) do
= link_to project_requirements_management_requirements_path(project) do
%strong.fly-out-top-item-name= _('Requirements')
%li.divider.fly-out-top-item
= nav_link(path: 'requirements#index', html_options: { class: 'home' }) do
= link_to project_requirements_management_requirements_path(project), title: 'List' do
%span= _('List')
......@@ -81,18 +81,42 @@ RSpec.describe 'Project navbar' do
context 'when requirements is available' do
before do
stub_licensed_features(requirements: true)
end
insert_after_nav_item(
_('Merge requests'),
new_nav_item: {
nav_item: _('Requirements'),
nav_sub_items: [_('List')]
}
)
context 'with flag enabled' do
before do
stub_feature_flags(project_sidebar_refactor: true)
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
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
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