test: align system-messages MultiSelect with new fuselage a11y#40357
test: align system-messages MultiSelect with new fuselage a11y#40357
Conversation
…e a11y
The MultiSelect anchor in @rocket.chat/fuselage now exposes role="combobox"
and uses aria-label/aria-labelledby for its accessible name (the placeholder
is rendered as inert children). The recently added EditRoomInfo.spec.tsx was
written against the previous fuselage where the anchor was a plain button
named by its placeholder, so getByRole('button', { name: /Select messages
to hide/i }) no longer matches and CI's Unit Tests fail on develop.
- Pass aria-label to the MultiSelect so the combobox has an accessible name.
- Update the spec helper to query by the combobox role.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 3c7422e The changes in this PR will be included in the next version bump. This PR includes changesets to release 42 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughAdds an accessible aria-label to the system-messages multi-select in the channel edit panel. Changes include a changeset entry, test adjustment for role-based element selection, and aria-label implementation. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #40357 +/- ##
===========================================
+ Coverage 69.81% 69.99% +0.18%
===========================================
Files 3300 3301 +1
Lines 119423 120443 +1020
Branches 21532 21585 +53
===========================================
+ Hits 83378 84308 +930
- Misses 32737 32844 +107
+ Partials 3308 3291 -17
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/jira ARCH-2083 |
Summary
The Unit Tests CI job is currently red on
develop(and on every PR against it). The failure is inEditRoomInfo.spec.tsx, added by #40295:@rocket.chat/fuselageMultiSelectwas upgraded by #40328 and the anchor now exposesrole="combobox"and usesaria-label/aria-labelledbyfor the accessible name (theplaceholderis rendered as inert children, which ARIA does not consult for combobox names). The spec was written against the previous behavior, where the anchor was a plain<button>named by its placeholder text — so the broken selector matched then but does not match now.Why CI didn't catch this earlier
The two changes that conflict travelled on different branches and never met until the back-merge from the release line.
Merge master into develop(aed3c5d85d)957625f064is not an ancestor of981af327a9—git merge-basebetween them lands on6cd73b0fe9from Apr 22. #40295 was labelledregression:, so it went into the release branch (master), not intodevelop.What each CI run actually saw:
masterwith the old fuselage. The anchor was a plain<button>sogetByRole('button', { name: /Select messages to hide/i })matched. The test was correct for the tree it ran against.develop, which had never seen the spec. Jest inapps/meteor/client/views/.../EditRoomInfoonly picked upuseEditRoomPermissions.spec.ts; the newEditRoomInfo.spec.tsxwas simply not in the tree, so there was nothing to fail.developstill without the spec.aed3c5d85d(the back-merge frommasterintodevelopafter the 8.4.0 cut) is the first commit where both pieces coexist. Unit Tests went red immediately on run 25190354848, and every PR opened againstdevelopsince then inherits the same failure via the merge commit CI builds.This is a textbook merge-skew between the release branch and mainline: each side green in isolation, conflict only visible at the back-merge. The 6-day gap between #40295 landing on
master(Apr 24) andmasterflowing back intodevelop(Apr 30) is what kept the regression hidden.Changes
EditRoomInfo.tsx— passaria-label={t('Select_messages_to_hide')}to theMultiSelectso the combobox has a real accessible name (a11y improvement, not just a test fix).EditRoomInfo.spec.tsx— query the trigger viagetByRole('combobox', …)to match the new fuselage semantics.Test plan
yarn jest client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.spec.tsx— all 5 tests pass locally.Task: ARCH-2123
Summary by CodeRabbit