Commit 3c895721 authored by Will Meek's avatar Will Meek

Update Project Security Dashboard Spec

This commit updates project_security_dashboard_spec
the previous security dashboard which showed vulnerabilities
has been moved. This test selects the vulnerability report.

A further iteration of this spec will test the new
graph based dashboard
parent 25de286a
......@@ -22,7 +22,7 @@
%span= _('Security Dashboard')
= nav_link(path: 'projects/security/vulnerability_report#index') do
= link_to project_security_vulnerability_report_index_path(@project), title: _('Vulnerability Report') do
= link_to project_security_vulnerability_report_index_path(@project), title: _('Vulnerability Report'), data: { qa_selector: 'vulnerability_report_link' } do
%span= _('Vulnerability Report')
- if project_nav_tab?(:on_demand_scans)
......
......@@ -13,6 +13,7 @@ module QA
view 'ee/app/views/layouts/nav/sidebar/_project_security_link.html.haml' do
element :security_dashboard_link
element :dependency_list_link
element :vulnerability_report_link
end
end
end
......@@ -31,6 +32,14 @@ module QA
end
end
def click_on_vulnerability_report
hover_security_compliance do
within_submenu do
click_element(:vulnerability_report_link)
end
end
end
def hover_security_compliance
within_sidebar do
find_element(:security_dashboard_link).hover
......
......@@ -62,7 +62,7 @@ module QA
it 'shows vulnerability details', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/949' do
Flow::Login.sign_in_unless_signed_in
@project.visit!
Page::Project::Menu.perform(&:click_on_security_dashboard)
Page::Project::Menu.perform(&:click_on_vulnerability_report)
EE::Page::Project::Secure::SecurityDashboard.perform do |security_dashboard|
expect(security_dashboard).to have_vulnerability(description: vulnerability_name)
......
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