Files
DocsGPT/tests/e2e
arc53-machine b8a62cedf9 Show a failed attachment's reason on hover, not as a red line
The composer showed each failed file's reason as a red line of text under
the chips. A failed file no longer blocks the send, since it is dropped
then, so that line was louder than it needed to be. DESIGN.md also says
status text of a sentence or more must not be a coloured paragraph.

The chip's warning icon already marks the failure. The reason is now a
Tooltip on the failed chip. It falls back to "Failed" when no reason is
known. It is also kept as sr-only text so screen readers still read it.
The native title moves from the chip to the truncating file name, where
DESIGN.md keeps title=, and is left off failed chips so the tooltip
doesn't double up.
2026-09-28 10:27:12 +01:00
..
2026-04-18 13:13:57 +01:00
2026-08-11 00:09:56 +01:00
2026-04-18 13:13:57 +01:00
2026-09-12 19:35:22 +01:00
2026-09-12 19:35:22 +01:00

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

# 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:

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:

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.