test: real auth e2e flow against the dev database (pg17)#3
Merged
Conversation
Enable a database-backed end-to-end test (register -> sign-out -> sign-in) that runs against the local dev database from .env, as the project already foresaw — no separate test database. - e2e/auth.spec.ts: real register -> sign-out -> sign-in flow (unique email per run so it is repeatable). - Rename docker-compose.yml -> compose.yml (auto-detected by both podman and docker) and upgrade PostgreSQL pg16 -> pg17 (compose + CI service). - playwright.config.ts: document that the dev database must be running and migrated before `pnpm test:e2e`. - Docs (README, AGENTS): podman-first compose commands and the e2e workflow (compose up -> db:migrate -> test:e2e). Verified against a podman pg17 container: pnpm test:e2e (3 passed), typecheck, and lint all pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dc18479 to
df3906b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a real, database-backed e2e test (register → sign-out → sign-in) that runs against the local dev database from
.env— no separate test database. Also renames the compose file and upgrades PostgreSQL to 17.Changes
e2e/auth.spec.ts— real register → sign-out → sign-in flow through Better Auth + Postgres, using a unique email per run so it is repeatable.compose.yml— renamed fromdocker-compose.yml(auto-detected by bothpodman composeanddocker compose) and upgraded PostgreSQL pg16 → pg17 (compose service + CI service).playwright.config.ts— documents that the dev database must be running and migrated beforepnpm test:e2e(no globalSetup; relies on.envlike the rest of the app).How to run locally
podman compose up -d # or: docker compose up -d pnpm db:migrate pnpm test:e2eVerification
pnpm test:e2e— 3 passed (2 smoke + 1 auth flow) against a realpodmanpg17 containerpnpm typecheck— cleanpnpm lint— clean🤖 Generated with Claude Code