-
-
Notifications
You must be signed in to change notification settings - Fork 728
chore: add some Web Platform Tests testcases #7135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
WalkthroughA new test file Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx (1)
1-19
: Consider test organisation for future WPT additions.Given the PR objectives mention many more WPT test cases will be added, consider creating a consistent naming pattern like
wpt_html_aam_roles_generic.jsx
to make future WPT-sourced tests easily identifiable.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalid.jsx.snap
is excluded by!**/*.snap
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx.snap
is excluded by!**/*.snap
📒 Files selected for processing (1)
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
crates/biome_*/**/*
📄 CodeRabbit Inference Engine (CLAUDE.md)
Core crates must be located in
/crates/biome_*/
Files:
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:18.454Z
Learning: You are encouraged to split the work for a new rule into multiple PRs and describe your plan in an issue if unfamiliar with Biome's APIs.
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:51:59.193Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Add end-to-end tests for watcher functionality in LSP tests (../biome_lsp/src/server.tests.rs)
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:56.365Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Create your first `.html` test file inside `tests/specs/html`, preferably organizing tests into subfolders by kind.
📚 Learning: applies to crates/biome_formatter/tests/specs/html/**/*.html : create your first `.html` test file i...
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:56.365Z
Learning: Applies to crates/biome_formatter/tests/specs/html/**/*.html : Create your first `.html` test file inside `tests/specs/html`, preferably organizing tests into subfolders by kind.
Applied to files:
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
📚 Learning: applies to crates/biome_formatter/tests/spec_tests.rs : update the `spec_tests.rs` file to generate ...
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:56.365Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : Update the `spec_tests.rs` file to generate a test function for each `.html` file found inside `tests/specs/html` using the `tests_macros::gen_tests!` macro.
Applied to files:
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
📚 Learning: see the documentation of `packages/aria-data` to generate this file....
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-08-05T14:50:25.072Z
Learning: See the documentation of `packages/aria-data` to generate this file.
Applied to files:
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Documentation
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: End-to-end tests
- GitHub Check: Check Dependencies
- GitHub Check: autofix
- GitHub Check: Test Node.js API
🔇 Additional comments (2)
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx (2)
1-1
: Excellent WPT integration reference.Good practice referencing the original WPT source for traceability.
2-19
: Comprehensive test coverage for generic role redundancy.The test cases effectively cover various HTML elements where
role="generic"
would be redundant, which aligns perfectly with thenoRedundantRoles
rule testing.
crates/biome_js_analyze/tests/specs/a11y/noRedundantRoles/invalidHtmlAamRoleGeneric.jsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should put imported tests into their own folder.
Summary
Read #7128 for more context. But the Web Platform Tests have hundreds of test cases that could be brought into Biome to capture nuanced browser behavior when it comes to ARIA role calculation. It really shines with edge cases, and highlights all the ways Biome would deviate from browser behavior.
This PR doesn’t introduce any changes! It only adds more test-cases. Looking for feedback on where these live, because there’ll be a lot more of these 🙏
Alternatives
What we’re really doing is calculating roles, which there aren’t unit tests for. Rather than using
noRedundantRoles
’ tests, we could do something lower-level if there ends up being too much indirection hereTest Plan
Docs
Just tests?