Commit 715d4afb authored by Tom Quirk's avatar Tom Quirk Committed by Gabriel Mazetto

Add group navbar_spec test for wiki menu item

parent 376660e6
...@@ -218,4 +218,21 @@ RSpec.describe 'Group navbar' do ...@@ -218,4 +218,21 @@ RSpec.describe 'Group navbar' do
it_behaves_like 'verified navigation bar' it_behaves_like 'verified navigation bar'
end end
context 'when group wiki is available' do
before do
stub_feature_flags(group_wiki: true)
insert_after_nav_item(
_('Analytics'),
new_nav_item: {
nav_item: _('Wiki'),
nav_sub_items: []
}
)
visit group_path(group)
end
it_behaves_like 'verified navigation bar'
end
end end
...@@ -44,6 +44,10 @@ module QA ...@@ -44,6 +44,10 @@ module QA
element :group_sidebar_submenu_content element :group_sidebar_submenu_content
element :group_saml_sso_link element :group_saml_sso_link
end end
view 'app/views/layouts/nav/sidebar/_wiki_link.html.haml' do
element :wiki_link
end
end end
end end
...@@ -114,6 +118,12 @@ module QA ...@@ -114,6 +118,12 @@ module QA
end end
end end
end end
def click_group_wiki_link
within_sidebar do
click_element(:wiki_link)
end
end
end end
end end
end end
......
...@@ -19,10 +19,6 @@ module QA ...@@ -19,10 +19,6 @@ module QA
element :analytics_sidebar_submenu element :analytics_sidebar_submenu
end end
view 'app/views/layouts/nav/sidebar/_wiki_link.html.haml' do
element :wiki_link
end
def click_group_members_item def click_group_members_item
within_sidebar do within_sidebar do
click_element(:group_members_item) click_element(:group_members_item)
...@@ -69,12 +65,6 @@ module QA ...@@ -69,12 +65,6 @@ module QA
yield yield
end end
end end
def click_wiki
within_sidebar do
click_element(:wiki_link)
end
end
end 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