Loading
Keep scanner card selected when choosing a profile
What does this MR do and why?
Keep scanner card selected when choosing a profile
This fixes a regression introduced by
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/252954
Clicking on an option in the scan profile dropdown
should not deselect the scanner card
Related to https://gitlab.com/gitlab-org/gitlab/-/issues/624190
Changelog: fixed
EE: trueReferences
- issue: [Frontend] Support custom Secret Detection prof... (#624190)
- merge request that introduced the regression: !252954 (merged)
- prototype: https://security-coverage-prototype-0b2bbb.gitlab.io/security-inventory-profiles/#/security-configuration/enable-scanners
- frontend plan in the epic: gitlab-org#20198 (comment 3745722841)
Screenshots or screen recordings
| Before |
After |
|---|---|
How to set up and validate locally
-
git checkout 624190-keep-card-selected-on-profile-choice -
have a GitLab Ultimate licence, and have
read_security_scan_profilespermission for a top-level group
reach the select scanners step
- go to a group =>
Secure=>Security configuration=>Scannerstab - click
Enable scanners - on the first step of the wizard, choose the advanced approach rather than the default quick approach, so it does not skip straight to review
- check that you land on
Select scanners,Step 3 of 4, with header rowSelect all scanners
verify the fix
- select a scanner card by clicking anywhere on it - the cards start unselected, and a card's
Configuration profiledropdown stays disabled until its card is selected - open that card's
Configuration profiledropdown and click on an option in the dropdown - check that:
- the card is still selected, with its checkbox still checked
- the
Configuration profiledropdown is still enabled - the dropdown panel closes normally
- the
Select all scannerscount does not go down — it should still reflect the cards that are checked
- check that clicking the card outside the dropdown still toggles it, so the guard covers only the dropdown:
- clicking the card title or description should deselect the card, and clicking again should reselect it
to run tests
yarn jest ee/spec/frontend/security_configuration/components/enable_scanners_wizard/select_scanners_spec.jsMR 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.
Related to #624190
Edited by Miranda Fluharty