This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 64fbe9f474 feat: round-3 deep product build-out (69 gaps closed, all 7 products green)
Deep-audit + build-out across all products to fully-usable state; all typecheck clean.

- gitgram-web (99): wire Store feature to real endpoints, close 9 gaps
- gitgram-backend (100): close 8 flow gaps, document infra-provisioning items
- gitgram-mobile (90): fix API base-URL/path mismatch (404s) + copy proximity
  components into components/proximity wired to real screens; 15 gaps, +react-native-svg
- aitm-core (95): wire natural-language CLI flow end-to-end; 11 gaps
- aitm-api (97): fix teams metadata runtime bug; copy a2a-js server/client/grpc
  into src/a2a and wire A2A route; crates.io package search; 8 gaps
- aitm-mcp (100): fix A2A client/server card mismatch; 9 gaps
- aitm-website (95): build missing docs routes; 9 gaps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 13:54:57 +03:00
..

Gitgram Backend — End-to-End (E2E) Tests

This suite exercises the real Express HTTP API against a real PostgreSQL (and optionally Redis) instance. Unlike the default Jest suite (which mocks Prisma, Redis, and external services via tests/setup.ts), these tests catch cross-service regressions and route-wiring breaks that mocks cannot.

What it covers

  • auth.e2e.test.ts — register, /me, login, refresh, logout, validation boundaries.
  • posts.e2e.test.ts — create/read posts, comments, like/unlike, likers, follow graph.
  • snippets.e2e.test.ts — snippet CRUD plus comments and likers (social parity).
  • system.e2e.test.ts — health/readiness, AI-analysis feature flag (503 when disabled), Polar webhook route mounting, and confirmation the duplicate webhook route was removed.

Running locally

Option A — one command (Docker)

Requires Docker. Brings up ephemeral Postgres (:5433) + Redis (:6380), runs the suite, and tears everything down:

npm run test:e2e:docker

Option B — manual

# 1. Start the harness
docker compose -f docker-compose.test.yml up -d --wait

# 2. Point the suite at it and run
export DATABASE_URL="postgresql://gitgram_test:gitgram_test@localhost:5433/gitgram_test"
export REDIS_URL="redis://localhost:6380"
npm run test:e2e

# 3. Tear down
docker compose -f docker-compose.test.yml down -v

The global setup (globalSetup.ts) runs prisma db push against the test database before the suite, so a fresh empty DB is fine — no migration history required.

CI

The Gitgram Tests workflow (.github/workflows/gitgram-tests.yml) runs this suite in the backend-e2e job using GitHub Actions service containers for Postgres and Redis.

Notes

  • The suite runs serially (--runInBand) and resets the relevant tables between suites for deterministic state.
  • External integrations (email, storage, Polar, GitNexus) are intentionally left unconfigured so flows are deterministic; the feature-flag tests assert the graceful-degradation behavior.