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
it_behaves_like 'verified navigation bar'
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
......@@ -44,6 +44,10 @@ module QA
element :group_sidebar_submenu_content
element :group_saml_sso_link
end
view 'app/views/layouts/nav/sidebar/_wiki_link.html.haml' do
element :wiki_link
end
end
end
......@@ -114,6 +118,12 @@ module QA
end
end
end
def click_group_wiki_link
within_sidebar do
click_element(:wiki_link)
end
end
end
end
end
......
......@@ -19,10 +19,6 @@ module QA
element :analytics_sidebar_submenu
end
view 'app/views/layouts/nav/sidebar/_wiki_link.html.haml' do
element :wiki_link
end
def click_group_members_item
within_sidebar do
click_element(:group_members_item)
......@@ -69,12 +65,6 @@ module QA
yield
end
end
def click_wiki
within_sidebar do
click_element(:wiki_link)
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