Files
pl_mail/package.json
T
Paul LütznerandClaude Opus 5 b22e5a3be4 test(appearance): click the label, and take the Playwright pin back off
The pin was wrong and so was the reason I gave for it.

I claimed 1.62 had changed what counts as visible, on the strength of
measuring the element under 1.61 and finding it painted. Probed under
1.62 the same element reports isVisible() TRUE. The geometry told me the
element was fine; I turned that into a claim about the tool.

The actual failure, from the log:

  locator.check: Clicking the checkbox did not change its state

A forced click on an `sr-only` radio — a 1px clipped box — that lands
without taking. label-bulk-toggle.spec.ts documents this exact sentence
and works around it, noting it hit "roughly one full run in three". So it
was already broken under 1.61 and merely intermittent; 1.62 made it
reliable. Eight failures at once instead of one every third run is the
tool exposing a broken test, not breaking a working one.

The fix was one helper away in the same file. pick() has always clicked
the LABEL, for the reason its comment gives — the radio is invisible and
the label is what a person clicks. setToggle() never caught up. It does
now, waits for the write it triggers, and asserts the radio actually
moved.

The last straggler was self-inflicted: the corner is a stored preference
restored by afterEach, which used the same broken helper, so my failing
runs left it switched off and the next run's "on by default" assertion
was reading their residue.

578 pass on 1.62.1. The other seven check({ force: true }) sites are
untouched — none of them failed, and rewriting them on suspicion is how
tests acquire workarounds nobody can later justify.

v0.1.16 shipped with the wrong explanation in its notes; the next release
carries the correction rather than a rewritten tag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 14:24:48 +02:00

33 lines
1.7 KiB
JSON

{
"name": "plmail-e2e",
"private": true,
"description": "End-to-end tests for plMail (Playwright). Separate from the app's AssetMapper/importmap frontend.",
"scripts": {
"test:env:up": "docker compose -f compose.test.yaml up -d --build --wait app",
"test:env:down": "docker compose -f compose.test.yaml down",
"test:env:reset": "docker compose -f compose.test.yaml down -v",
"test:env:logs": "docker compose -f compose.test.yaml logs -f app",
"test:unit:docker": "npm run test:env:up && docker compose -f compose.test.yaml run --rm --no-deps --entrypoint docker-php-entrypoint app php vendor/bin/phpunit",
"test:e2e:docker": "npm run test:env:up && playwright test",
"test:e2e:docker:ui": "npm run test:env:up && playwright test --ui",
"test:e2e:docker:headed": "npm run test:env:up && playwright test --headed",
"test:e2e:docker:trace": "npm run test:env:up && playwright test --trace on --video on",
"test:e2e": "playwright test",
"test:e2e:site": "php bin/build-site.php && E2E_SITE=1 playwright test site.spec.ts",
"test:e2e:screenshots": "E2E_SCREENSHOTS=1 playwright test screenshots.spec.ts",
"test:e2e:coverage": "rm -rf var/js-coverage && E2E_JS_COVERAGE=1 playwright test && node bin/js-coverage.mjs",
"test:e2e:ui": "playwright test --ui",
"test:e2e:headed": "playwright test --headed",
"test:e2e:report": "playwright show-report",
"typecheck": "tsc --noEmit -p tsconfig.json"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@playwright/test": "^1.62.1",
"@types/node": "^26.1.2",
"typescript": "^7.0.2"
}
}