Lt Html Tests Runner
Overview
Run targeted Playwright checks for changed HTML test pages, using git diff to detect which tests changed. Use the full suite only when explicitly requested.
Workflow
- •Work from repo root:
/mnt/c/Programming/Projects/Pets/eduardmikhailau.github.io. - •Detect changed HTML test files via git:
- •
git diff --name-only - •
git diff --name-only --cached - •
git ls-files --others --exclude-standard - •Filter to
tests/**/*.html.
- •
- •If HTML tests changed, validate only those files, then run only those tests with Playwright:
- •
node scripts/validate-html-tests.mjs <relative path> [more paths...] - •
npx playwright test tests/all-tests.spec.js -g "<relative path>" - •Run the Playwright command once per changed HTML file (preserve relative path under
tests/).
- •
- •If no HTML tests changed but the user explicitly asked to run tests, run the full suite:
- •
npm run test:html
- •
- •Report results: pass/fail summary and any failing file/errors.
- •Optional full validation (only if user explicitly asks for full validation):
- •
node scripts/validate-html-tests.mjs
- •