Add a spec for clearing the last vulnerability filter

What does this MR do and why?

Adds a spec for removing the only active filter in the vulnerability report filtered search: with severity in the route query and the filtered search emitting severity: undefined, the component pushes a query with no filters.

The case pins down where empty values are stripped. Stripping them from the emitted params before merging them with the route query, instead of after, passes every other spec in the block while silently dropping the push that clears a filter.

The assertion checks the pushed argument strictly, so it also fails if the strip itself is removed.

References

How to set up and validate locally

Run the spec in both Vue lanes:

yarn jest ee/spec/frontend/security_dashboard/components/shared/filtered_search/vulnerability_report_filtered_search_spec.js
VUE_VERSION=3 yarn jest ee/spec/frontend/security_dashboard/components/shared/filtered_search/vulnerability_report_filtered_search_spec.js

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Anna Vovchenko

Merge request reports

Loading
Loading