Skip to content

[E2E] Add negated matcher for has_vulnerability

John McDonnell requested to merge jmd/negated-vulnerability-matcher into master

What does this MR do and why?

Adds a negated matcher for has_vulnerability in the E2E tests.

Without this change, when we run something like expect(security_dashboard).not_to have_vulnerability(description: name) it requires waiting the default max wait time (10 seconds) before returning, whereas with this change, the negated matcher will return as soon as it confirms the non presence of the element.

How to set up and validate locally

Noted in ./qa/specs/features/ee/browser_ui/10_govern/vulnerability_management_spec.rb

Govern Vulnerability management in a merge request can dismiss a security finding with reason from pipeline security tab  
Govern Vulnerability management in a merge request can create an issue from a security finding in pipeline security tab
Govern Vulnerability management in a merge request can dismiss a vulnerability with a reason from mr security widget
Govern Vulnerability management in a merge request can create an issue from a vulnerability from mr security widget
  • bundle exec rspec ./qa/specs/features/ee/browser_ui/10_govern/vulnerability_management_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports