Migrate work items list label filtering to MSW
What does this MR do and why?
Migrates label filtering on the work items list from Capybara to an MSW
integration test. All five operators (=, !=, None, Any, is one of)
are covered, so the whole describe 'label' block is deleted from
spec/features/work_items/list/user_applies_work_items_list_filters_spec.rb.
Notes for reviewers:
- Labels only exist on
getWorkItemsSlim, but rows are enriched fromgetWorkItemsFull. Both are filtered from fixtures generated with the same variables — filtering one alone lets the excluded rows back in. - Fixtures are generated per operator rather than filtering nodes in the
handler, following the existing
get_work_items_full_closedpattern. ReimplementingNone/Any/negation/union semantics in JavaScript would mean asserting the test double instead of the app. - Each example asserts the requested variables as well as the rendered rows.
With the current fixture seed,
!= To DoandNonereturn the same work items, so the variables are what keep the two cases distinguishable. assignRouteris called inside the mount helper rather than atdescribelevel (the pattern in the other list specs) because each example boots the app on a different URL.
The remaining filter dimensions need a richer fixture seed — every seeded work item shares one author, and only one carries a label — so they stay in Capybara for now.
Runtime saved
| Value | |
|---|---|
| Capybara file on master (averaged) | 150.1s |
| The two label examples removed | 42.5s (13.3% of the file) |
| MSW replacement | 6s |
| Net saving per CI run | ~20s |
References
- Related to https://gitlab.com/gitlab-org/plan-stage/plan-engineering/-/work_items/1421
- Part of https://gitlab.com/groups/gitlab-org/plan-stage/-/work_items/475
Screenshots or screen recordings
Not applicable — test-only change, no UI changes.
How to set up and validate locally
-
Generate the fixtures:
bundle exec rspec ee/spec/frontend/fixtures/work_items_integration.rb -
Run the new spec:
yarn jest:msw-integration ee/spec/frontend/msw_integration/work_items/list/label_filter_spec.js -
Run the whole MSW suite to confirm no regressions:
yarn jest:msw-integration
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.