Commit 274139fb authored by Aleksandr Soborov's avatar Aleksandr Soborov Committed by Walmyr Lima e Silva Filho

Fix E2E test navigation to Group Security Dashboard

parent 56516981
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
- main_path = @group.feature_available?(:group_level_compliance_dashboard) ? group_security_compliance_dashboard_path(@group) : group_security_dashboard_path(@group) - main_path = @group.feature_available?(:group_level_compliance_dashboard) ? group_security_compliance_dashboard_path(@group) : group_security_dashboard_path(@group)
= nav_link(path: %w[groups/security/compliance_dashboard#show groups/security/dashboard#show]) do = nav_link(path: %w[groups/security/compliance_dashboard#show groups/security/dashboard#show]) do
= link_to main_path, data: { qa_selector: 'security_dashboard_link' } do = link_to main_path, data: { qa_selector: 'security_compliance_link' } do
.nav-icon-container .nav-icon-container
= sprite_icon('shield') = sprite_icon('shield')
%span.nav-item-name %span.nav-item-name
= _('Security & Compliance') = _('Security & Compliance')
%ul.sidebar-sub-level-items %ul.sidebar-sub-level-items{ data: { qa_selector: 'group_secure_submenu' } }
- if @group.feature_available?(:security_dashboard) - if @group.feature_available?(:security_dashboard)
= nav_link(path: 'groups/security/dashboard#show') do = nav_link(path: 'groups/security/dashboard#show') do
= link_to group_security_dashboard_path(@group), title: _('Security') do = link_to group_security_dashboard_path(@group), title: _('Security'), data: { qa_selector: 'security_dashboard_link' } do
%span= _('Security') %span= _('Security')
- if @group.feature_available?(:group_level_compliance_dashboard) - if @group.feature_available?(:group_level_compliance_dashboard)
......
...@@ -19,6 +19,8 @@ module QA ...@@ -19,6 +19,8 @@ module QA
end end
view 'ee/app/views/layouts/nav/ee/_security_link.html.haml' do view 'ee/app/views/layouts/nav/ee/_security_link.html.haml' do
element :security_compliance_link
element :group_secure_submenu
element :security_dashboard_link element :security_dashboard_link
end end
...@@ -95,8 +97,10 @@ module QA ...@@ -95,8 +97,10 @@ module QA
end end
def click_group_security_link def click_group_security_link
within_sidebar do hover_element(:security_compliance_link) do
click_element(:security_dashboard_link) within_submenu(:group_secure_submenu) do
click_element(:security_dashboard_link)
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