mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-03 20:12:55 +00:00
* feat: postgres tests * feat: mongo cutoff * feat: mongo cutoff * feat: adjust docs and compose files * fix: mini code mongo removals * fix: tests and k8s mongo stuff * feat: test fixes * fix: ruff * fix: vale * Potential fix for pull request finding 'CodeQL / Clear-text logging of sensitive information' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: mini suggestions * vale lint fix 2 * fix: codeql columns thing * fix: test mongo * fix: tests coverage * feat: better tests 4 * feat: more tests * feat: decent coverage * fix: ruff fixes * fix: remove mongo mock * feat: enhance workflow engine and API routes; add document retrieval and source handling * feat: e2e tests * fix: mcp, mongo and more * fix: mini codeql warning * fix: agent chunk view * fix: mini issues * fix: more pg fixes * feat: postgres prep on start * feat: qa tests * fix: mini improvements * fix: tests --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Siddhant Rai <siddhant.rai.5686@gmail.com>
61 lines
1.7 KiB
Markdown
61 lines
1.7 KiB
Markdown
# DocsGPT E2E Tests
|
|
|
|
End-to-end tests for DocsGPT, driven by Playwright against the full native
|
|
dev stack (Flask + Celery + Vite + a mock LLM stub), backed by a disposable
|
|
`docsgpt_e2e` Postgres database.
|
|
|
|
This is an isolated Node workspace. It has its own `package.json` so
|
|
Playwright never ends up in the frontend app bundle.
|
|
|
|
## Quick start
|
|
|
|
```bash
|
|
# 1. Install JS deps (first time only).
|
|
npm install
|
|
|
|
# 2. Install the Chromium browser Playwright will drive (first time only).
|
|
npm run e2e:install
|
|
|
|
# 3. Bake the Postgres template DB (one-time, idempotent).
|
|
../../scripts/e2e/bake_template.sh
|
|
|
|
# 4. Run the whole suite: boots services, runs tests, tears down.
|
|
npm run e2e
|
|
```
|
|
|
|
## Interactive development
|
|
|
|
When iterating on a spec you want the services up across many runs:
|
|
|
|
```bash
|
|
npm run e2e:up # boot Flask + Celery + Vite + mock LLM, leave them running
|
|
npm run e2e:ui # open Playwright UI against the running stack
|
|
npm run e2e:down # tear down when done
|
|
```
|
|
|
|
## Reports
|
|
|
|
After a run, view the HTML report:
|
|
|
|
```bash
|
|
npm run e2e:report
|
|
```
|
|
|
|
Traces, screenshots, and videos for failed tests land under `test-results/`.
|
|
Trace is captured `on-first-retry` (the first attempt runs clean; the retry
|
|
records for debugging).
|
|
|
|
## Structure
|
|
|
|
- `specs/` — test files, grouped by tier (`auth/`, `tier-a/`, `tier-b/`, `tier-c/`).
|
|
- `helpers/` — shared TypeScript helpers: `auth.ts`, `db.ts`, `reset.ts`,
|
|
`api.ts`. Imported via the `@helpers/*` path alias.
|
|
- `fixtures/` — static fixture documents (PDFs, markdown, text) used by
|
|
upload specs. Body content must be deterministic — no dates, UUIDs, or
|
|
random tokens.
|
|
|
|
## Full plan
|
|
|
|
See [`../../e2e-plan.md`](../../e2e-plan.md) for the phased rollout,
|
|
parallelization model, and Tier-A/B/C spec inventory.
|