Skip to content

Add negatable matchers to vulnerability elements

John McDonnell requested to merge jmd/speed-up-has-no-vulnerability into master

What does this MR do and why?

When we use expectations such as expect(foobar).not_to have_job(job) the not_to leads to the default 10sec wait being applied to calls to has_element?.

Instead lets add negatable matchers for these checks, so we can avoid adding delays into our test suite.
https://docs.gitlab.com/ee/development/testing_guide/end_to_end/best_practices.html#create-negatable-matchers-to-speed-expect-checks

How to set up and validate locally

    cd /path/to/gdk/gitlab/qa
    bundle exec rspec qa/specs/features/ee/browser_ui/10_govern/vulnerability_management_spec.rb
    bundle exec rspec qa/specs/features/ee/browser_ui/10_govern/fix_vulnerability_workflow_spec.rb:49

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