test(e2e): §22-current Tier-1 harness + metadata E2E (SLICE-3/4/5)
Modernize the Tier-1 stack to the three-tier app and add browser coverage for the §22.4a metadata UI, closing the E2E gap deferred across SLICE-3/4/5: - seed-gitea.sh: create a REGISTRY_REPO with projects.yaml + a faceted named collection (.collection.yaml fields: priority enum + tags) seeded with three metadata-bearing entries; register content+registry webhooks; self-guarding (skip if a prior token still works) so a dependency-triggered re-run can't remint and invalidate the backend's token. - .env.tier1: REGISTRY_REPO/DEFAULT_PROJECT_ID; disable OTC cooldown + lift the per-IP auth limiter for the single-IP test runner. - docker-compose: pin backend image; backend-seed inserts a granted owner the OTC path can sign in as (write paths need contributor+). - Makefile: two-phase tier1-up (seed to completion, then create backend so it reads the populated token env); robust down; e2e-fresh = down+up+e2e (the canonical run, since the edit/bulk specs mutate the seeded corpus). - metadata.spec.js: SLICE-3 faceted filter (anon), SLICE-4 edit panel (owner), SLICE-5 bulk bar (owner). 4 passed against a fresh stack. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
.PHONY: tier1-up tier1-down tier1-logs fe-unit e2e e2e-install
|
||||
.PHONY: tier1-up tier1-down tier1-logs fe-unit e2e e2e-install e2e-fresh
|
||||
|
||||
# Two-phase: run the Gitea seed to completion FIRST so it writes the bot token /
|
||||
# OAuth creds into generated/.env.tier1.generated, THEN create the backend/web —
|
||||
# compose snapshots env_file at container-create time, so the backend must be
|
||||
# created after the seed has populated it. The touch seeds an empty placeholder
|
||||
# for compose's up-front env_file existence check on a clean checkout.
|
||||
tier1-up:
|
||||
touch testing/generated/.env.tier1.generated
|
||||
docker compose -f testing/docker-compose.yml up --build -d gitea-seed
|
||||
docker compose -f testing/docker-compose.yml wait gitea-seed
|
||||
docker compose -f testing/docker-compose.yml up --build -d
|
||||
|
||||
tier1-down:
|
||||
touch testing/generated/.env.tier1.generated
|
||||
docker compose -f testing/docker-compose.yml down -v
|
||||
|
||||
tier1-logs:
|
||||
@@ -17,3 +26,8 @@ e2e-install:
|
||||
|
||||
e2e:
|
||||
cd e2e && BASE_URL=$${BASE_URL:-http://localhost:8080} MAILSINK_URL=$${MAILSINK_URL:-http://localhost:8025} npm run e2e
|
||||
|
||||
# Canonical run: the metadata specs mutate the seeded corpus (edit/bulk write
|
||||
# real commits), so they assume a freshly-seeded stack. This brings the stack
|
||||
# down, back up (re-seeds), and runs the suite once — the shape CI uses.
|
||||
e2e-fresh: tier1-down tier1-up e2e
|
||||
|
||||
Reference in New Issue
Block a user