Skip to content

feat: UI auth flow test#84

Merged
binit2-1 merged 1 commit intomainfrom
feat/add-e2e-tests
Jan 28, 2026
Merged

feat: UI auth flow test#84
binit2-1 merged 1 commit intomainfrom
feat/add-e2e-tests

Conversation

@binit2-1
Copy link
Owner

🧪 Test Contribution

📝 Description

Fixed E2E Test Infrastructure and Added Web Auth Flow Tests

This PR fixes multiple issues with the E2E test setup and adds comprehensive web authentication tests.

Issues Fixed

Issue Root Cause Solution
TypeScript error on expect().status() Missing await before request.post() Added await and fixed assertion syntax
Tests running in wrong order Parallel execution of dependent tests Added test.describe.configure({ mode: 'serial' })
Missing name field in sign-up Better Auth requires name for registration Added name to user object and request
Port conflict with Docker Playwright Browser server and API both on 3000 Moved Docker browser server to port 3001
Browser can't reach frontend Docker container using localhost Uses hostmachine alias via --add-host
Missing API_URL env var Tests couldn't find API endpoint Added to .env.test

Changes Made

File Change
tests/api/auth.spec.ts Added serial mode, name field, fixed await
tests/web/web-auth-flow.spec.ts [NEW] Web auth flow tests (register + login)
playwright.config.ts Docker browser server on port 3001, webServer config
apps/api/.env.test Added API_URL env variable
scripts/test-bootstrap.js Skip Docker in CI (uses service container)
.github/workflows/ci.yml Added PostgreSQL service, env vars

🎯 Test Type

  • 🟢 E2E (Root) - npm run test:e2e
  • 🟡 Unit (API) - npm run test:unit (in apps/api)
  • 🔵 Unit (Web) - npm run test:unit (in apps/web)

✅ Checklist

  • I have verified that the new test passed locally.
  • I have ensured that I didn't break existing tests.
  • (If E2E) I used the isolated test database mechanism.
  • I have cleansed any hardcoded secrets/IDs.

Local Setup for Fedora

docker run --rm --network host --init -it mcr.microsoft.com/playwright:v1.58.0-jammy \
  /bin/sh -c "npx -y playwright@1.58.0 run-server --port 3001 --host 0.0.0.0"

📸 Screenshots / Trace

Fixes: #78

@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
composter-api Ready Ready Preview, Comment Jan 28, 2026 7:45pm
composter-web Ready Ready Preview, Comment Jan 28, 2026 7:45pm

@binit2-1 binit2-1 merged commit d6bb74e into main Jan 28, 2026
6 checks passed
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.

[Test]Web Login/Signup Flow

1 participant