Skip to content

Feat/add e2e tests#82

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

Feat/add e2e tests#82
binit2-1 merged 3 commits intomainfrom
feat/add-e2e-tests

Conversation

@binit2-1
Copy link
Owner

This pull request introduces a robust local test environment setup for the API, including Dockerized database configuration, improved environment variable management, and streamlined bootstrapping scripts. It also updates the Playwright configuration to support these changes and adds a basic API health check test.

Test Environment Setup and Automation

  • Added a new script scripts/test-bootstrap.js to automate the setup of development and test environments, including database container management and schema migrations. The script uses different Docker Compose files and environment files depending on the mode (dev or test).
  • Introduced docker-compose.test.yaml to define a disposable PostgreSQL service for running tests locally, ensuring isolation and repeatability.
  • Added a dedicated .env.test file for the API to separate test environment variables from development variables.

Playwright and Testing Configuration

  • Updated playwright.config.ts to load environment variables from .env.test, use the correct CLIENT_URL for the test base URL, and automatically start the local dev server before running tests. [1] [2] [3]
  • Added a basic Playwright test (tests/api/health.spec.ts) to verify the API health endpoint.

Package and Dependency Management

  • Added dotenv-cli to devDependencies for loading environment variables in scripts.
  • Added new npm scripts setup:dev and setup:test to simplify local environment setup using the new bootstrap script.

Fixes: #81

@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 4:02pm
composter-web Ready Ready Preview, Comment Jan 28, 2026 4:02pm

@binit2-1 binit2-1 merged commit 2f4ccf0 into main Jan 28, 2026
7 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]setup isolated test database and seeding script

1 participant