Skip to content

test: real auth e2e flow against the dev database (pg17)#3

Merged
stefanowitschdev merged 1 commit into
masterfrom
feature/e2e-test-database
Jun 13, 2026
Merged

test: real auth e2e flow against the dev database (pg17)#3
stefanowitschdev merged 1 commit into
masterfrom
feature/e2e-test-database

Conversation

@stefanowitschdev

@stefanowitschdev stefanowitschdev commented Jun 13, 2026

Copy link
Copy Markdown
Owner

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.

Rebased on master after the dependency-update PR (#2) merged. This revises the earlier dedicated-test-DB approach per review: e2e now uses the dev database as originally foreseen.

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 from docker-compose.yml (auto-detected by both podman compose and docker compose) and upgraded PostgreSQL pg16 → pg17 (compose service + CI service).
  • playwright.config.ts — documents that the dev database must be running and migrated before pnpm test:e2e (no globalSetup; relies on .env like the rest of the app).
  • Docs (README, AGENTS) — podman-first compose commands and the e2e workflow.

How to run locally

podman compose up -d   # or: docker compose up -d
pnpm db:migrate
pnpm test:e2e

Verification

  • pnpm test:e2e3 passed (2 smoke + 1 auth flow) against a real podman pg17 container
  • pnpm typecheck — clean
  • pnpm lint — clean

Note: the create-agentic-app/template/ copy still references docker-compose.yml; it is regenerated from the project root via pnpm sync-template and was intentionally left untouched here.

🤖 Generated with Claude Code

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>
@stefanowitschdev stefanowitschdev force-pushed the feature/e2e-test-database branch from dc18479 to df3906b Compare June 13, 2026 07:39
@stefanowitschdev stefanowitschdev changed the title test: dedicated test database for end-to-end tests test: real auth e2e flow against the dev database (pg17) Jun 13, 2026
@stefanowitschdev stefanowitschdev merged commit 5a9ab22 into master Jun 13, 2026
2 of 4 checks passed
@stefanowitschdev stefanowitschdev deleted the feature/e2e-test-database branch June 13, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants