Commit d1b335d5 authored by Tanya Pazitny's avatar Tanya Pazitny

Merge branch 'first_class_sec_dboard_spec_update' into 'master'

Add data-qa-selector to first class security dashboard

Closes #238848

See merge request gitlab-org/gitlab!39983
parents 647862e0 5c22ef4f
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
v-for="severityGroup in severityGroups" v-for="severityGroup in severityGroups"
:ref="`accordionItem${severityGroup.type}`" :ref="`accordionItem${severityGroup.type}`"
:key="severityGroup.type" :key="severityGroup.type"
:data-qa-selector="`severity_accordion_item_${severityGroup.type}`"
:accordion-id="accordionId" :accordion-id="accordionId"
:disabled="shouldAccordionItemBeDisabled(severityGroup)" :disabled="shouldAccordionItemBeDisabled(severityGroup)"
:max-height="$options.accordionItemsContentMaxHeight" :max-height="$options.accordionItemsContentMaxHeight"
...@@ -188,9 +189,12 @@ export default { ...@@ -188,9 +189,12 @@ export default {
<div class="gl-ml-7 gl-pb-3"> <div class="gl-ml-7 gl-pb-3">
<ul class="list-unstyled gl-py-2"> <ul class="list-unstyled gl-py-2">
<li v-for="project in severityGroup.projects" :key="project.id" class="gl-py-3"> <li v-for="project in severityGroup.projects" :key="project.id" class="gl-py-3">
<gl-link target="_blank" :href="`/${project.fullPath}/-/security/dashboard`">{{ <gl-link
project.nameWithNamespace target="_blank"
}}</gl-link> :href="`/${project.fullPath}/-/security/dashboard`"
data-qa-selector="project_name_text"
>{{ project.nameWithNamespace }}</gl-link
>
<span <span
v-if="project.mostSevereVulnerability" v-if="project.mostSevereVulnerability"
ref="mostSevereCount" ref="mostSevereCount"
......
...@@ -16,6 +16,10 @@ module QA ...@@ -16,6 +16,10 @@ module QA
element :project_name_text, required: true element :project_name_text, required: true
end 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) def filter_project(project)
click_element(:filter_project_dropdown) click_element(:filter_project_dropdown)
within_element(:filter_dropdown_content) do within_element(:filter_dropdown_content) do
...@@ -24,7 +28,9 @@ module QA ...@@ -24,7 +28,9 @@ module QA
end end
def has_security_status_project_for_severity?(severity, project) 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}") has_element?(:project_name_text, text: "#{project.group.sandbox.path} / #{project.group.path} / #{project.name}")
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