Migrate read-only work item sidebar cases to MSW
What does this MR do and why?
https://gitlab.com/gitlab-org/plan-stage/plan-engineering/-/work_items/1417
This is the fifth slice of an ongoing series that migrates work item detail sidebar widgets from Capybara feature specs to MSW frontend integration specs.
It adds ee/spec/frontend/integration/work_items/details/read_only_sidebar_spec.js.
The spec opens the work item drawer with a payload whose permissions
are off, and checks the sidebar still renders its attribute values
(status, assignees, labels) but offers no edit button anywhere in
it. It runs under both states of the workItemFeaturesField flag.
Worth calling out: the deleted guest example asserted the absence
of the selector .block.labels .js-sidebar-dropdown-toggle. That
selector is markup from the old issue sidebar, which the work item
sidebar does not render at all, so the example passed whether or
not a guest could actually edit anything. The replacement spec
asserts there is no edit button in the sidebar, which is the thing
the example meant to check in the first place.
References
- Parent issue: https://gitlab.com/gitlab-org/plan-stage/plan-engineering/-/work_items/1417
- Earlier slices in the series:
- Weight: !252836 (merged)
- Iteration: !253470 (merged)
- Health status: !254556 (merged)
- Status: !255742 (merged)
How to set up and validate locally
- Run the new MSW integration spec:
yarn jest:integration ee/spec/frontend/integration/work_items/details/read_only_sidebar_spec.js - Run the trimmed Capybara specs to confirm the remaining examples
still pass:
bundle exec rspec ee/spec/features/work_items/detail/work_item_detail_spec.rb spec/features/work_items/issues/issue_sidebar_spec.rb
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.