v1.7.0 — adopt a test run you already did
If CI already runs your suites, the sync no longer needs to run them again.
Added
--adopt-report <harness>:<dir>:<path>[,<path>...](repeatable; alsoDEFPROD_ADOPT_REPORTS) — parse a report another runner already produced instead of running that suite. The<harness>:<dir>prefix matches atestSuitesentry;<dir>is part of the key because a repo often has several suites on one harness. Several comma-separated paths are unioned, for a run split across passes. A named file that does not exist is an error rather than an empty parse — reporting a whole suite as untested because of a typo is worse than failing.
Changed
- Carry-forward now applies to any run, not just
--skip-run. A covered story with no fresh result keeps its previous one: silence about a story whose spec still exists is not evidence — it may be quarantined or filtered out by a grep — and resetting it would read as a regression to "never tested". An uncovered story is still reset, since nothing is making a claim about it any more.
Fixed
- A whole suite could be reported as unrun. The path matching required a leading
/, but Playwright reportsfilerelative to the common ancestor of the discovered specs, not totestDir. Where specs share a single root — or a pass runs a narrow grep — paths begin at the area segment and matched nothing. --helpwas silently truncated by a hardcoded line range every time an option was added.
Compatibility
No breaking changes. Without --adopt-report the behaviour is exactly as before.
Upgrade
npx @defprod/scripts defprod-sync-tests
# or
npm install -g @defprod/scripts