Tests first for task 2.2; the implementation comes separately.
- AuthService contract (auth/testing/auth-service.contract.ts), run on
the in-memory fake (unit) and on PocketBaseAuthService against a test
PocketBase (integration)
- integration: register persists the user, login maps id/email/name,
restore with a valid, broken or missing token, signals follow the auth
store, two users in separate injectors, NetworkError and kept session
when PocketBase is unreachable
- unit (jsdom): pb_auth cookie is written on sign-in and removed on
sign-out with Path=/ and SameSite=Lax, loaded into the auth store
before restore() at startup, untouched on the server platform
- contract stubs that throw "Not implemented": User, AuthService,
PocketBaseAuthService, provideAuth, InMemoryAuthService (signInAs,
failNextWith)
- docs/testing.md: note on the AuthService contract
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- playwright.config.ts: test PocketBase (port 8190) and ng serve (port 4300)
as webServers, SIGTERM shutdown so the stand removes its temp dir
- fixtures: user via open registration, api SDK client, signedInPage with pb_auth cookie
- expectNoA11yViolations runs all axe rules (WCAG and best-practice)
- render home route on the server; main and h1 placeholder in app shell
- config tests for playwright.config.ts in test:lint; docs updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add proxy.conf.mjs mirroring `location /pb/` from nginx: the prefix is
stripped, target comes from PB_URL (empty value falls back to the default,
same as the SSR provider). Cover the config with tests in tests/lint and
update docs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- add tsconfig.tests.json and run tsc in test:api
- move vitest ProvidedContext types to provided-context.d.ts
- rename vitest.api.config.ts to .mts
- kill signal-test fixture with SIGTERM first so cleanup still runs
- add tests: no files in pb_migrations, independent user/guest clients
- docs: drop superuser env vars from tests in README, note tsc in testing.md
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvmtStx737hu8gXe15e55W
`pnpm test:api` starts an isolated PocketBase with project migrations and
hooks in a temp dir, provides SDK client helpers and cleans up after the run,
on failure and on SIGINT/SIGTERM. The superuser is generated per instance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EvmtStx737hu8gXe15e55W