Commit Graph
5 Commits
Author SHA1 Message Date
litruv 1ddca42473 Apply the #109 re-review: crash assertion, artifact hook on launch failure, dropped redundant lines. (#109)
Tests / unit (pull_request) Successful in 17s
Tests / e2e (pull_request) Successful in 4m10s
tests/e2e/login.spec.mjs: assert the render process is alive with the `crash`
event instead of counting pageerrors; the failed-login test now accepts the
rate-limited message as well as the wrong-password one; the failure hook
attaches the console before the app guard so a launch failure still produces an
artifact, wraps `screenshot()` because it throws on a crashed page, and reaches
`fs.rmSync` on launch failure; dropped the duplicate login-form assertion.

playwright.config.mjs: pin `trace: 'off'` explicitly rather than relying on the
version default, since a trace captures the login POST body.

.gitea/workflows/tests.yml: dropped `--prefer-offline`; corrected the xvfb
comment (the guard is live for the host runner, which already has xvfb); dropped
an unresolvable CI run-number citation.

Checks: `node --check` on both JS files, `npm run test:unit` — 2 passed. E2E
cannot be run locally (no `E2E_PASSWORD` in this session); CI is the check.
2026-11-03 13:22:39 +11:00
litruv 347acd0ebd Drop the pageerror assertion: the failed login path produces one. (#109)
Tests / unit (pull_request) Successful in 17s
Tests / e2e (pull_request) Successful in 3m53s
2026-11-03 13:01:29 +11:00
litruv 879a7155eb Apply the #109 re-review: fork guard on the unit job, gated reachability check, renderer liveness assertion.
Tests / unit (pull_request) Successful in 17s
Tests / e2e (pull_request) Failing after 1m50s
act_runner mounts /var/run/docker.sock into every container job, so the fork guard
has to cover the unit job too. The e2e comment now states the blast radius of the
host DOCKER-USER exception instead of the removed container.options. Playwright deps
are narrowed to chromium, which is what Electron uses, and the homeserver reachability
curl gates with -f so a non-2xx fails the job.

The login test claimed "without crashing the app" but asserted only that the body had
text, which is true for an error page. It now asserts no uncaught renderer pageerror,
and toHaveValue after the homeserver commit proves fill() actually stuck.
2026-11-03 12:51:11 +11:00
litruv fcbf1020e8 Apply the #109 review panel: fork guard, loopback dev server, real authenticated assertions.
Tests / unit (pull_request) Successful in 17s
Tests / e2e (pull_request) Failing after 1m1s
Playwright's webServer replaces the custom globalSetup. The e2e job is gated to same-repo PRs because a fork PR controls both the test files and the workflow steps while the E2E_PASSWORD secret is in the environment. The dev server is pinned to loopback, the login screen is asserted before filling, the authenticated state is proven by a token-authenticated request, the token value is never printed, the failed-login test no longer asserts a tautological exitCode, and the DevTools window is no longer mistaken for the app window.
2026-11-03 11:04:18 +11:00
litruv 348e47dbd8 Add the Vitest and Playwright harness with the login E2E test. (#109) 2026-11-03 10:10:25 +11:00