Repository navigation
feat(conformance): generate the adapter capability matrix from one declared source - #448
Open
vishnuv688 wants to merge 2 commits into
Open
vishnuv688 wants to merge 2 commits into
vishnuv688 wants to merge 2 commits into
Conversation
…clared source Three hand-maintained tables disagreed and two had no Python column, because a markdown table cannot notice that a fourth adapter exists. Capabilities are now declared once with a cell per adapter id, a required reason for every partial or unsupported cell, and conformance rules behind every cell marked tested. Every user-facing option of the four adapters, Python's DEVTOOLS_* variables included, and every conformance rule must map to a capability row or say why it is not one, so a new option, rule or adapter cannot skip the matrix. The README tables render from it and a test fails when they are stale.
Contributor
[Low impact] The PR appears safe to merge; the latest changes address the previous finding without introducing a new issue. SummaryGenerates adapter capability tables from one declaration, with checks for adapter cells, option coverage, rule coverage, and stale README tables.
Reviews (2) · Last reviewed commit: "fix(conformance): mark metadata and run ..." · Reviewed by Greptile |
Their rules check a precondition (metadata ahead of the first command, a command behind every offered run control), not the tab's content or that Run, Rerun and Run all work, so a tested mark promised more than the suite proves.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Closes #402
The adapter capability tables were maintained by hand in three places (the README,
CrossFrameworkSupport.mdandMobileTesting.mdon the docs site). They disagreed with each other, and two of them had no Python column, because a markdown table cannot notice that a fourth adapter exists.The matrix is now an output.
packages/conformance/src/capabilities.tsdeclares every capability once, with a cell for each of the four adapters (WebdriverIO, Selenium, Nightwatch, Python), andpnpm docs:capabilitiesrenders the tables from it.CLAUDE.md.enable()keywords, pytest options andDEVTOOLS_*variables (checked by a test that parses the source with Python'sast).pnpm docs:capabilitiesrewrites the content between<!-- capability-matrix:<table>:start -->and:end -->markers. The README now holds three generated tables: trace mode, live dashboard and mobile.--checkwrites nothing and exits 1 when anything is stale, and a test runs it against the README.--website <checkout>also rewrites the two docs-site pages; it checks every target first and writes nothing when a page is missing its markers.The matrix has 33 rows. Correcting the old tables along the way:
expect()surface only failing matchers), and Seleniumheadlessis Chrome only.The PR template gains a "Capability matrix" checkbox, and
CLAUDE.mddocuments the command and both coverage checks.Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)elements(published element/snapshot API —@wdio/elements)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)selenium-devtools-py(Selenium Python adapter)backend(server)app(UI)script(page-injected runtime)trace(Trace mode)The code lives in
packages/conformance, which is private and test-only, beside the adapter ids and rules it uses. It imports only the adapters' option types. No changeset, since no published package changes.Notes for reviewers
capabilities.tsis the declaration. Validation is incapability-validation.ts, the option maps incapability-options.ts, rendering inrender-capabilities.tsand the CLI incapability-matrix.ts.adapters-agree-*comparisons, which judge adapters against each other rather than any one adapter.DevToolsOptionsfailedpnpm typecheck, and adding a keyword to Python'senable()failed the coverage test. Both were reverted.CrossFrameworkSupport.mdthat says Python is not in the table. Dry-run against a copy of the docs, the generator renders all 33 rows on that page and the 6 mobile rows onMobileTesting.md.pnpm test: 2846 passed.pnpm lint: 0 errors and no new warnings.pnpm typecheck,pnpm buildandpnpm docs:capabilities --checkare clean.Screenshots / recordings
n/a (no UI change)
🤖 Generated with Claude Code