3d8157de7ba1d2e846856deda743e0aae39b0dda braney Tue Aug 25 16:31:36 2026 -0700 docent: use the shared Playwright install instead of a private ~/pwrec tree, refs #38188 PW_ENV in docent.mk and in the tests makefile named $(HOME)/pwrec, a tree that only existed in one home directory, so nobody else could run docent or its tests without setting the variable by hand. Both now default to /hive/groups/browser/uiTest/pw, one pinned copy of playwright, chromium, ffmpeg and js-yaml shared by every browser-driving test in the tree. A new PW_DIR variable still points either makefile at a private install. Nothing in docent.js changes except two comment lines. All nine docent tests and all three derivation baselines pass against the shared pin. diff --git src/hg/utils/docent/tests/README.txt src/hg/utils/docent/tests/README.txt index ca4cf0d6184..b7ddec1bfe5 100644 --- src/hg/utils/docent/tests/README.txt +++ src/hg/utils/docent/tests/README.txt @@ -1,28 +1,28 @@ Docent tests ------------ Run by hand, not by the kent tree's `make test`: make test # every *.docent.yaml here make test T=composite # just one make parity # one script FAST and slow, and twice over make derive # the derivation alone, against expected/ (no browser) make derive-accept # rewrite those baselines, then read `git diff expected/` Most tests drive a real browser against a real server, so they need the network and -the shared Playwright install (~/pwrec; see ../README.md). That is why none of this is +the shared Playwright install (/hive/groups/browser/uiTest/pw; see ../README.md). That is why none of this is part of the tree-wide test target: a broken network would fail the build. A test is an ordinary Docent script that asserts with `expect:`. It passes by exiting 0. `expect:` is the only verb that fails a run, so a test with no `expect:` step in it tests nothing. A script named *.xfail.docent.yaml is expected to FAIL, and the run fails if it passes. That is how a trap gets pinned rather than merely written down. `make derive` is the cheap half: DOCENT_DERIVE=1 resolves the `track:` steps against trackDb and prints the cart variables without opening a browser, in about a second. It is where Docent's own decisions live, and the baselines in expected/ are what catch a change to visVars() or tdbHideTargets() that a rendered page would hide. What is covered