Commit 5c22ef4f authored by Will Meek's avatar Will Meek

Add data-qa-selector to first class security dashboard

This fixes issue
https://gitlab.com/gitlab-org/gitlab/-/issues/238848
parent d906bc28
......@@ -160,6 +160,7 @@ export default {
v-for="severityGroup in severityGroups"
:ref="`accordionItem${severityGroup.type}`"
:key="severityGroup.type"
:data-qa-selector="`severity_accordion_item_${severityGroup.type}`"
:accordion-id="accordionId"
:disabled="shouldAccordionItemBeDisabled(severityGroup)"
:max-height="$options.accordionItemsContentMaxHeight"
......@@ -188,9 +189,12 @@ export default {
<div class="gl-ml-7 gl-pb-3">
<ul class="list-unstyled gl-py-2">
<li v-for="project in severityGroup.projects" :key="project.id" class="gl-py-3">
<gl-link target="_blank" :href="`/${project.fullPath}/-/security/dashboard`">{{
project.nameWithNamespace
}}</gl-link>
<gl-link
target="_blank"
:href="`/${project.fullPath}/-/security/dashboard`"
data-qa-selector="project_name_text"
>{{ project.nameWithNamespace }}</gl-link
>
<span
v-if="project.mostSevereVulnerability"
ref="mostSevereCount"
......
......@@ -16,6 +16,10 @@ module QA
element :project_name_text, required: true
end
view 'ee/app/assets/javascripts/security_dashboard/components/first_class_vulnerability_severities.vue' do
element :project_name_text, required: true
end
def filter_project(project)
click_element(:filter_project_dropdown)
within_element(:filter_dropdown_content) do
......@@ -24,7 +28,9 @@ module QA
end
def has_security_status_project_for_severity?(severity, project)
click_element("severity_accordion_item_#{severity}")
within_element("severity_accordion_item_#{severity}") do
click_on severity
end
has_element?(:project_name_text, text: "#{project.group.sandbox.path} / #{project.group.path} / #{project.name}")
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