Playwright E2E Coverage and Fixture Backlog¶
Purpose¶
The guarded Playwright suite runs against the disposable database configured in
.env.e2e. Run it with:
make e2e
make e2e migrates the disposable database, runs prepare_e2e, writes generated
sessions and fixture identifiers to the ignored .env.e2e.generated file, starts
Django on the E2E port, and then runs Playwright.
Some tests currently call test.skip(...) when specialized fixture or provider
variables are absent. These skips are coverage gaps, not evidence that the
underlying product behavior is optional. A green Playwright exit can therefore be
incomplete and must always be reported with its passed and skipped counts.
Current Coverage Snapshot¶
On 22 July 2026, the standard disposable run scheduled 40 tests:
- 26 passed.
- 14 were skipped because
prepare_e2edoes not yet generate all required fixtures and provider configuration. - 0 failed.
The standard make e2e profile should eventually run all 41 tests with zero
skips. Missing variables must then fail a fixture preflight rather than silently
reduce coverage.
GitHub Actions Gate¶
GitHub Actions runs make e2e in a dedicated job with a disposable PostGIS
service and an installed Chromium runtime. The job uploads the HTML Playwright
report, traces, screenshots, videos, and Django server log when available.
Until the specialized fixtures below are implemented, CI enforces the documented baseline rather than claiming full coverage:
- At least 41 tests must be discovered.
- No more than 14 tests may skip.
- Any test failure, missing test, or additional skip fails the job.
The skip ceiling is temporary. Reduce E2E_MAX_SKIPPED_TESTS as fixtures are
added, and set it to 0 when the full-coverage backlog is complete.
Skipped Scenario Inventory¶
| Area | Tests skipped | Missing variables | Required fixture or configuration |
|---|---|---|---|
| Centralized basemap inheritance | 2 | E2E_CENTRALIZED_BASEMAP_PROVIDERS, E2E_CENTRALIZED_BASEMAP_PATHS, E2E_CENTRALIZED_REJECTED_PROVIDER, E2E_CENTRALIZED_REJECTED_URL_PART |
Approved provider keys, representative secondary-map URLs, and one interceptable provider request for deterministic rejection/fallback coverage. |
| Draft editing exchange | 3 | E2E_DRAFT_EXCHANGE_DRAFT_ID |
An eligible fixture draft visible in the editor, reviewer, and approver exchange workflows. The tests should consume this identifier rather than using it only as an availability flag. |
| MapTiler provider | 2 | E2E_MAPTILER_ENABLED=true and an enabled maptiler_streets runtime provider |
Deterministic MapTiler-style configuration. Prefer a Playwright-intercepted local style response and a non-secret E2E key over a live provider credential or network dependency. |
| Parcel overlap governance | 1 | E2E_OVERLAP_POLYGON_GEOJSON |
Browser/API GeoJSON derived from a known approved fixture parcel and guaranteed to produce safe, versioned overlap evidence. Persisted geometry remains in the configured storage SRID. |
| Split and merge topology | 3 | E2E_SPLIT_LINE_JSON, E2E_MERGE_SOURCE_IDS, E2E_CORNER_MERGE_SOURCE_IDS |
Isolated source parcels for a valid split, an edge-connected merge, and a corner-only rejected merge. Fixtures must not share mutable sources across tests. |
| Upload draft workflow | 3 | E2E_UPLOAD_PREVIEW_URL, E2E_UPLOAD_STATUS_URL, E2E_UPLOAD_CREATED_DRAFT_URL, E2E_UPLOAD_DENIED_PATH |
Fixture-owned upload preview payload, completed upload/result rows, linked created draft, and a stable viewer-denied route. File-backed preview data must be cleaned and recreated idempotently. |
The shared base URL, actor sessions, dataset ID, and several ordinary parcel and workflow identifiers are already generated. The table lists the additional values responsible for the 14 skips.
Required Follow-up¶
Fixture generation¶
Extend apps/parcels/management/commands/prepare_e2e.py so it owns every
specialized database row, geometry, URL, and file-backed preview needed above.
Generation must be deterministic and safe to run repeatedly against the same
disposable database. Add command tests proving both the emitted variables and a
second consecutive reset.
Topology, overlap, draft exchange, and upload scenarios must use separate fixture records where an E2E action changes workflow state, retires a parcel, or otherwise mutates shared data. Cleanup must remove dependent workflow and upload records before deleting protected source rows.
Provider isolation¶
Provider behavior should not depend on production credentials or uncontrolled internet availability. Seed an approved E2E basemap catalog and intercept styled provider requests in Playwright. Enable MapTiler in the E2E process with a non-secret test value only when its style and resource requests are fully controlled by the test.
Full-coverage gate¶
Add a preflight to the guarded make e2e path that validates every generated
variable required by the standard profile before Playwright starts. Retain skip
guards only for intentionally partial, direct spec execution. The guarded full
suite must fail when fixture preparation would otherwise cause a test to skip.
Completion Criteria¶
This backlog is complete only when all of the following are true:
prepare_e2eemits every specialized fixture value listed above.- Fixture preparation remains idempotent on two consecutive runs.
- Provider tests use controlled E2E responses and no production secret.
make e2ereports 41 passed, 0 skipped, and 0 failed.- CI runs the same full disposable profile and treats missing fixture coverage as a failure.