test(a11y): shared playground IBM scan and jest-axe coverage for untested modals and primitives - #14302
Conversation
…aces (LE-2042) - Playwright spec for the never-scanned /playground/:id route: publishes a Chat Input -> Chat Output flow (no LLM key), scans empty and with-message states in light and dark, plus composer tab-order and focus-trap keyboard tests - jest-axe for 5 uncovered modals (api, share, editNode, templates, flowSettings) and 5 ui primitives (label, command, context-menu, calendar, sidebar) - 69 tests - pre-existing bugs asserted as-is with FINDING comments so fixes trip the tests loudly (tracked in LE-2043) - manifest: dynamic playground entry references its covering spec
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe pull request adds accessibility coverage for frontend UI components, modals, and the shared playground. It also documents the playground route’s public-flow requirement and links it to its Playwright accessibility specification. ChangesAccessibility coverage
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 8 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.12.0 #14302 +/- ##
==================================================
- Coverage 61.86% 61.55% -0.31%
==================================================
Files 2347 2347
Lines 238604 237882 -722
Branches 36664 33360 -3304
==================================================
- Hits 147614 146434 -1180
- Misses 89170 89628 +458
Partials 1820 1820
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Scan labels are <project>__<label>[__<index>], but the greedy regex stripped through the last __, so every scan after the first in a test showed its numeric index as the route. Strip only the leading project segment and the trailing index. Also document the job-summary command alongside the html-report one.
Jira: LE-2042 · Findings tracked in LE-2043 · Parent epic: LE-1505
Summary
Test-only branch — no production code changes.
/playground/:idroute (tests/a11y/shared-playground.a11y.spec.ts, 4 tests): publishes a Chat Input → Chat Output flow (no LLM API key needed, somake test_frontend_a11y_scanpicks it up), scans empty and with-message states in light and dark, plus keyboard tests — composer tab order must reachbutton-sendwith every intervening stop exposing an accessible name; no focus trap.Pre-existing bugs found while writing these are asserted as-is with
FINDING (documented, not fixed)comments so a future fix trips the test loudly — full list in LE-2043. The/flow/:id/viewcrash (route always throwsTypeError: setIsLoading is not a function, standing TS2741) is tracked in LE-1755 and the route will be deleted.QA — how to test
cd src/frontend && npx jest --testPathPatterns="\.a11y\.test\."→ 41 suites / 186 tests green.RUN_A11Y=true npx playwright test tests/a11y/shared-playground.a11y.spec.ts --workers=5→ 4 tests green, scan summaries attached to the report.Notes for reviewers
flowSettingsModalfield labelling is not auditable in jsdom (global Radix form stub injest.setup.js; un-stubbing infinite-loops Radix Switch under React 19 + jsdom) —labelrules disabled there with an in-file explanation; field labelling stays covered by page-level IBM scans.apiModalcode tabs andtemplatesModaltemplate panes are stubbed (ace-builds side-effect imports / missing image moduleNameMapper); the modal shells are audited for real.Summary by CodeRabbit