Remove snapshots from security dashboard integration tests
What does this MR do and why?
Related #558227 (closed)
Remove snapshots from security dashboard integration tests
This refactors the security dashboard integration tests in the following way:
- Go from snapshot based approach, to checking if the correct component is loaded
- Change the structure of the spec so it follows the group, project, and instance levels
- Check for the non-configured empty state as well
It also fixes a bug for the not configured project level component. The
newVulnerabilityPath and canAdminVulnerability properties were not
being provided. This caused an error because it is expected. And this
also caused the Submit vulnerability button not never show up.
Changelog: fixed EE: true
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
For refactor:
Run yarn jest:integration ee/spec/frontend_integration/security_dashboard/security_dashboard_init_integration_spec.js
For bugfix:
Go to security dashboard of a project without vulnerabilities. Notice it has a "Submit vulnerability" button at the top.
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.

