Skip to content

fix(api): skip the page audit tests when playwright-core is missing - #154

Merged
codemenschendev merged 1 commit into
mainfrom
fix/page-audit-availability
Sep 26, 2026
Merged

codemenschendev merged 1 commit into
mainfrom
fix/page-audit-availability

Conversation

@codemenschendev

Copy link
Copy Markdown
Owner

On a machine with node but without apps/api/tools/node_modules (every fresh worktree), PageAudit::available() returned true, qa-page.cjs died on require('playwright-core') and 11 PageAuditTest cases failed instead of skipping.

  • PageAudit::available() also requires tools/node_modules/playwright-core, where the API image and CI install it. It is only called by the tests, so production is unaffected.
  • The PageAuditTest docblock no longer says CI skips these tests: CI installs the driver and runs them. The skip message names npm --prefix tools ci.
  • The CI workflow comment now describes the new behaviour.

Checked locally:

  • with tools/node_modules: PageAuditTest 12/12 passed
  • without it: 1 passed, 11 skipped
  • full suite: 489/489 passed

Project: Appwerk

PageAudit::available() only checked for node and the script file. On a
machine with node but without tools/node_modules (every fresh worktree)
the tests ran, qa-page.cjs died on require('playwright-core') and eleven
PageAuditTest cases failed with an empty report instead of skipping.

available() now also requires playwright-core beside the script, which
is where the API image and CI install it. The test docblock no longer
claims CI skips these tests (CI installs the driver and runs them) and
the skip message names the npm command that fixes it.

Project: Appwerk
@codemenschendev
codemenschendev merged commit 4c8ce7a into main Sep 26, 2026
2 checks passed
@codemenschendev
codemenschendev deleted the fix/page-audit-availability branch September 26, 2026 09:57
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.

1 participant