Migrate work item status widget to MSW
What does this MR do and why?
Related to https://gitlab.com/gitlab-org/plan-stage/plan-engineering/-/work_items/1417
Migrates the work item status widget from Capybara to an MSW integration test.
Fourth slice of the sidebar widget migration, after weight (!252836 (merged)), iteration (!253470 (merged)) and health status (!254556 (merged)). That covers the EE sidebar widgets; the CE ones (assignee, labels, milestone, dates) remain, in separate MRs.
Unlike the widgets migrated so far, the status dropdown's options are not a client-side constant. They come from the namespace's allowed statuses for the work item type, fetched only when the dropdown opens. The new spec covers that deferred query as well as selecting a status.
Two Capybara contexts stay behind. The custom status context stays because the frontend does not distinguish a custom status from a system-defined one — it's the same code path with a different id — so the value of that example is the backend wiring that makes those statuses appear, which a hand-written fixture can't prove. The unlicensed context stays because MSW mocks licensing away.
References
- Parent issue: https://gitlab.com/gitlab-org/plan-stage/plan-engineering/-/work_items/1417
- Weight widget migration: !252836 (merged)
- Iteration widget migration: !253470 (merged)
- Health status widget migration: !254556 (merged)
Screenshots or screen recordings
None, this is a test-only change.
How to set up and validate locally
- Run
yarn jest:msw-integration ee/spec/frontend/msw_integration/work_items/details/status_spec.js - Run the remaining Capybara examples with
bundle exec rspec ee/spec/features/work_items/detail/work_item_detail_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.