PW Framework Tooling
Maintain the framework infrastructure that supports test execution quality and developer workflow.
Use This Skill When
- Changing
playwright.config.ts,package.json, linting, formatting, typechecking, waits, logging, or reporting. - Adding or updating validation scripts.
- Updating framework documentation about tooling or execution behavior.
Covered Areas
playwright.config.tspackage.jsoneslint.config.mjstsconfig.jsonutils/common/Logger.tsutils/common/Waits.tsutils/common/CustomReporter.tsscripts/checkNamingConventions.mjs- framework README quality/tooling sections
Follow These Rules
- Keep
config/test-config.jsonas the single config source for base URLs, role credentials, and shared waits. - Keep framework timeout derivation in
utils/common/Waits.ts. - Keep scoped logging via
logger.withScope(...). - Keep the custom reporter at
utils/common/CustomReporter.ts. - Keep ESLint, Prettier, and
tsc --noEmitworking together. - Keep
@typescript-eslint/no-floating-promisesenabled. - Keep
npm run check:namingpassing for framework naming rules.
Inspect First
- Identify the smallest set of tooling files that own the behavior.
- Check whether the change is configuration, validation, runtime helper, or documentation.
- Reuse an existing script or helper before adding a new one.
- Keep claims in docs limited to what the framework actually implements.
Preferred Change Order
- Change configuration or shared helper logic first.
- Change scripts next if deterministic enforcement is needed.
- Update documentation last so it reflects the final behavior.
- Avoid spreading the same rule across multiple files unless each layer truly needs it.
Validation Workflow
Prefer direct local binaries if npm run is unreliable in the AI shell:
node ./scripts/checkNamingConventions.mjs./node_modules/.bin/eslint.cmd ../node_modules/.bin/tsc.cmd --noEmit./node_modules/.bin/prettier.cmd . --check./node_modules/.bin/playwright.cmd test --list
Run the smallest set that proves the change.
Finish Checklist
- The change is centralized in the narrowest responsible tooling layer.
- Validation scripts and config still agree with each other.
- Documentation claims only what is currently implemented.
- The minimal relevant validation commands were run or explicitly skipped.