Commit ec9a0616 authored by Walmyr Lima e Silva Filho's avatar Walmyr Lima e Silva Filho

Merge branch 'qa-e2e-fix-security-compliance-link' into 'master'

Fix E2E test navigation to Group Security Dashboard

Closes #198636

See merge request gitlab-org/gitlab!23710
parents 56516981 274139fb
......@@ -2,15 +2,15 @@
- 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
= 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
= sprite_icon('shield')
%span.nav-item-name
= _('Security & Compliance')
%ul.sidebar-sub-level-items
%ul.sidebar-sub-level-items{ data: { qa_selector: 'group_secure_submenu' } }
- if @group.feature_available?(:security_dashboard)
= 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')
- if @group.feature_available?(:group_level_compliance_dashboard)
......
......@@ -19,6 +19,8 @@ module QA
end
view 'ee/app/views/layouts/nav/ee/_security_link.html.haml' do
element :security_compliance_link
element :group_secure_submenu
element :security_dashboard_link
end
......@@ -95,8 +97,10 @@ module QA
end
def click_group_security_link
within_sidebar do
click_element(:security_dashboard_link)
hover_element(:security_compliance_link) do
within_submenu(:group_secure_submenu) do
click_element(:security_dashboard_link)
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