Visitar URL original
test(media): validate check result messages by KyPython · Pull Request #5480 · dequelabs/axe-core · GitHub
Skip to content

test(media): validate check result messages - #5480

Draft
KyPython wants to merge 1 commit into
dequelabs:developfrom
KyPython:test/media-check-messages
Draft

KyPython wants to merge 1 commit into
dequelabs:developfrom
KyPython:test/media-check-messages

Conversation

@KyPython

Copy link
Copy Markdown

The caption and no-autoplay-audio tests currently call check.evaluate directly, so they still pass if an incomplete diagnostic message is missing. Route their existing cases through testutils.getCheckEvaluate with message verification enabled and explicit mock contexts.

Preserve all 17 existing cases, including incomplete results, caption's none-rule semantics, composed-tree captions, media preloading, allowed duration, looping, and controls.

Part of #5375, following the agreed split into focused migration PRs. Additional check families remain.

Validation:

  • Build, repository-wide formatting, ESLint, and TypeScript passed with Node 24.21.0.
  • All 23 media tests passed in Chrome 155, including all 17 migrated cases.
  • All eight test:unit:* browser suites passed.
  • Temporary mutation: removing both incomplete messages leaves the original tests passing (17/17), while the migrated tests detect all four affected cases (13 pass, four expected failures). All mutations were restored.
  • Independent diff review: no findings.

The local pnpm test wrapper passed TypeScript but could not spawn the cached pnpm.cjs (EACCES). The browser suites passed using npm-run-all's supported --npm-path option pointing to the same installed pnpm 11.17.0 module. This workaround changes no project files.

Prepared with Codex. Human review pending.

Use getCheckEvaluate in caption and no-autoplay-audio tests so existing
cases verify diagnostic messages for their results, including incomplete
results. Preserve the fixtures, options and assertions.

Refs: dequelabs#5375
@straker

straker commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the pr. We have a lot of open prs at the moment so we'll try to get to this as soon as we can.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants