Files
evig/package.json
T
GandClaude Fable 5 4553102879 test(e2e): wire three never-run specs into CI, and make the security one real (#377)
* test(e2e): wire three never-run specs into CI, and make the security one real

The e2e-local job runs 'tests/e2e/*journey.spec.ts'. Nine specs are not
named *journey, so nothing ran them — anywhere, ever. I ran all of them
against a locally seeded instance before wiring any, which is the only
reason this PR is three specs and not nine.

Wired (41 assertions that were running nowhere):
  security            4 tests — rewritten, see below
  notification-hrefs  21 assertions, green as-is
  user-admin-flows    16 assertions, green after one fix

security.spec.ts was a STUB and wiring it as-written would have been
worse than leaving it out: two of its four tests had comment-only bodies
('Would need to fill and submit form 6 times'), a third asserted only
inside an isVisible() branch, and every one called test.skip() when
redirected to login — which /it-hilfe/create always does signed out. In
CI it would have reported a green 'security' check while exercising
nothing. It now asserts the closed side of the authorization boundary: no
admin page renders and no admin/money API answers 2xx to a signed-out
request, and a refused response carries no user data. Proven by mutation
— adding a public route to the protected list turns it red.

user-admin-flows addressed routes as /de/x. The app 307-redirects those
to /x, and when that races the client router Playwright aborts the
navigation (net::ERR_ABORTED) — indistinguishable from a broken page.
It cost three wrong hypotheses (concurrency, then state residue, then a
fresh database) before I read the error. Now uses the canonical paths,
which is where the redirect lands and what users actually see.

NOT wired, with reasons rather than silence: marketplace, it-hilfe,
appointments, payment-return and timecards fail against the current app —
marketplace expects an h1 of 'Marketplace' and the text 'gebrauchte
IT-Geräte', which is pre-rebrand Revamp-IT copy. dashboard-timecards
skips its only test. Specs nothing runs rot; these did. Recorded in
docs/AUDIT_BACKLOG_2026-08.md.

Verified: 3 consecutive green runs of the bundle, typecheck, lint, docs gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: record which never-run E2E specs rotted, with the triage evidence

Three are now wired; the other six are not, and the table says why rather
than leaving a silent gap. marketplace expects pre-rebrand copy, and
dashboard-timecards skips its only test. it-hilfe is the best next
candidate — 10 of its 14 tests already pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(e2e): the signed-out security spec was running signed IN

CI rejected the previous commit and it was right to. playwright.config.ts
sets storageState globally, so every context — the page AND the request
fixture — inherits a saved login unless a spec says otherwise. My
'authorization boundary (signed out)' tests therefore ran authenticated:
/api/invoices, /api/admin/users and /api/admin/refunds all answered 200,
and the spec reported the doors were open.

They passed locally only because no saved-session file exists there. That
is the worst kind of green: right answer, wrong reason, and dependent on
which machine you run it on.

Both specs now force an empty session explicitly. For security.spec.ts
that line IS the test — a signed-out check carrying a session asserts
nothing about the closed side of the boundary.

Same root cause fixed notification-hrefs: it probes whether a ROUTE
exists using a dummy UUID matching no record. Signed out, an auth
redirect answers that without touching the database. Signed in, the admin
page renders and correctly 404s on the missing record — so it reported
'notification deep link is broken' when nothing was broken.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-25 16:32:41 +02:00

198 lines
8.9 KiB
JSON

{
"name": "evig",
"version": "0.1.0",
"private": true,
"license": "MIT",
"scripts": {
"dev": "next dev",
"dev:frontend": "npm run dev",
"dev:full": "./scripts/start-all.sh",
"d": "npm run services:up && npm run transcription:bg && npm run dev",
"db:up": "docker compose up -d db",
"db:down": "docker compose down db",
"db:migrate": "bash scripts/db/run-migration.sh",
"services:up": "docker compose up -d db meilisearch listmonk",
"services:down": "docker compose down",
"start:all": "./scripts/start-all.sh",
"stop:all": "./scripts/stop-all.sh",
"setup": "npm run services:up && echo 'Waiting for services...' && sleep 5",
"setup-admins": "npx tsx scripts/setup-all-admins.ts",
"e2e:seed": "npx tsx scripts/e2e-seed.ts",
"generate:admin-hash": "node scripts/generate-admin-hash.js",
"reset": "npm run services:down && docker compose down -v && npm run setup",
"listmonk:setup": "./scripts/setup-listmonk.sh",
"listmonk:up": "docker compose up -d listmonk",
"listmonk:down": "docker compose stop listmonk",
"listmonk:logs": "docker compose logs -f listmonk",
"build": "NODE_ENV=production next build --webpack",
"start": "next start",
"lint": "eslint .",
"lint:umlauts": "bash scripts/lint-umlauts.sh src",
"lint:chrome": "bash scripts/ci/card-shell-ratchet.sh",
"lint:docs": "bash scripts/ci/docs-paths-exist.sh",
"compliance:ssot": "node scripts/ssot-audit.mjs",
"test:i18n": "jest src/config/__tests__/i18n-array-parity.test.ts src/config/__tests__/nav-i18n-keys.test.ts src/config/__tests__/no-brand-suffix-in-message-titles.test.ts",
"compliance:i18n": "node scripts/i18n-audit.mjs",
"compliance:i18n-hardcoded": "node scripts/i18n-hardcoded-audit.mjs",
"compliance:i18n-leaks": "node scripts/i18n-leaks.mjs --check",
"compliance": "npm run compliance:ssot && npm run compliance:i18n && npm run compliance:i18n-hardcoded && npm run compliance:i18n-leaks && npm run compliance:i18n-stale",
"compliance:ci": "npm run compliance:ssot && npm run compliance:i18n && npm run compliance:i18n-hardcoded && npm run compliance:i18n-leaks",
"i18n:missing": "node scripts/i18n-missing.mjs",
"i18n:businessplan": "node scripts/i18n-businessplan-parity.mjs",
"i18n:apply": "node scripts/i18n-apply.mjs",
"i18n:leaks": "node scripts/i18n-leaks.mjs",
"i18n:apply-leaks": "node scripts/i18n-apply-leaks.mjs",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"test:e2e": "playwright test",
"test:e2e:auth": "playwright test tests/e2e/auth-smoke.spec.ts -g 'credentials login'",
"test:e2e:journeys": "playwright test tests/e2e/*journey.spec.ts",
"test:e2e:guards": "playwright test tests/e2e/security.spec.ts tests/e2e/notification-hrefs.spec.ts tests/e2e/user-admin-flows.spec.ts",
"test:e2e:it-hilfe": "playwright test tests/e2e/it-hilfe.spec.ts",
"test:e2e:it-hilfe:journey": "playwright test tests/e2e/it-hilfe-journey.spec.ts",
"test:e2e:marketplace:journey": "playwright test tests/e2e/marketplace-checkout-journey.spec.ts",
"test:e2e:workshops:journey": "playwright test tests/e2e/workshops-journey.spec.ts",
"test:e2e:workshops:proposal:journey": "playwright test tests/e2e/workshop-proposal-journey.spec.ts",
"test:e2e:timecards:journey": "playwright test tests/e2e/timecard-journey.spec.ts",
"test:e2e:intake:journey": "playwright test tests/e2e/intake-journey.spec.ts",
"test:e2e:tasks:journey": "playwright test tests/e2e/tasks-journey.spec.ts",
"test:e2e:protocols:journey": "playwright test tests/e2e/protocols-journey.spec.ts",
"test:e2e:decisions:journey": "playwright test tests/e2e/decisions-journey.spec.ts",
"test:e2e:cms:journey": "playwright test tests/e2e/cms-journey.spec.ts",
"test:e2e:hr:journey": "playwright test tests/e2e/hr-vacancy-journey.spec.ts",
"test:e2e:it-hilfe:preferred:journey": "playwright test tests/e2e/it-hilfe-preferred-technician-journey.spec.ts",
"test:e2e:service:journey": "playwright test tests/e2e/service-appointment-journey.spec.ts",
"test:e2e:user-admin": "playwright test tests/e2e/user-admin-flows.spec.ts",
"test:e2e:inventory": "playwright test tests/e2e/feature-inventory.spec.ts",
"test:e2e:inventory:prod": "bash scripts/e2e-inventory-prod.sh",
"test:e2e:ui": "playwright test --ui",
"test:all": "npm run test && npm run test:e2e",
"deploy": "bash scripts/selfhost-deploy-revampit.sh",
"deploy:selfhost": "bash scripts/selfhost-deploy-revampit.sh",
"ship": "bash scripts/ship.sh",
"typecheck": "tsc -p tsconfig.json --noEmit",
"verify": "npm run lint && npm run lint:umlauts && npm run lint:chrome && npm run lint:docs && npm run compliance:ci && npm run typecheck && npm run test && npm run build",
"prod:build": "docker build -f Dockerfile.prod -t revampit-app:latest .",
"prod:up": "docker compose -f docker-compose.prod.yml up -d",
"prod:down": "docker compose -f docker-compose.prod.yml down",
"prod:logs": "docker compose -f docker-compose.prod.yml logs -f",
"prod:restart": "docker compose -f docker-compose.prod.yml restart",
"prod:health": "curl -f http://localhost:3000/api/health",
"hirn:ingest": "npx tsx scripts/hirn-ingest.ts",
"hirn:ingest:docs": "npx tsx scripts/hirn-ingest.ts --dir ./docs",
"hirn:ingest:src": "npx tsx scripts/hirn-ingest.ts --dir ./src --extensions .ts,.tsx",
"hirn:stats": "npx tsx scripts/hirn-ingest.ts --stats",
"transcription:start": "./services/transcription/start.sh",
"transcription:bg": "[ -d services/transcription/.venv ] && (./services/transcription/start.sh &) || echo 'Transcription venv not found. Run: npm run transcription:setup'",
"transcription:setup": "python3 -m venv services/transcription/.venv && services/transcription/.venv/bin/pip install faster-whisper flask",
"transcribe:local": "node scripts/transcribe-local-audio.mjs",
"prepare": "husky",
"i18n:stale": "node scripts/i18n-stale.mjs",
"i18n:stale-update": "node scripts/i18n-stale.mjs --update",
"compliance:i18n-stale": "node scripts/i18n-stale.mjs"
},
"dependencies": {
"@auth/pg-adapter": "^1.11.3",
"@aws-sdk/client-s3": "^3.1115.0",
"@fleet/ai-forms": "github:maonakamoto/ai-forms#v0.1.2",
"@sentry/nextjs": "^10.70.0",
"@tiptap/extension-link": "^3.30.2",
"@tiptap/extension-table": "^3.30.2",
"@tiptap/pm": "^3.30.2",
"@tiptap/react": "^3.30.2",
"@tiptap/starter-kit": "^3.30.2",
"bcryptjs": "^2.4.3",
"busboy": "^1.6.0",
"clsx": "^2.1.1",
"cookie": "^2.0.1",
"cron-parser": "^5.10.0",
"csv-parse": "^7.0.2",
"drizzle-orm": "^0.45.1",
"exceljs": "^4.4.0",
"framer-motion": "^13.1.1",
"gray-matter": "^4.0.3",
"ioredis": "^6.0.0",
"jsonwebtoken": "^9.0.2",
"leaflet": "^1.9.4",
"lru-cache": "^11.5.2",
"lucide-react": "^1.33.0",
"next": "^16.3.2",
"next-auth": "^5.0.0-beta.32",
"next-intl": "^4.13.7",
"next-themes": "^0.4.6",
"nodemailer": "^9.0.1",
"pg": "^8.23.0",
"puppeteer": "^25.8.0",
"qrcode": "^1.5.4",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react-markdown": "^10.1.0",
"recharts": "^3.10.1",
"redis": "^6.2.1",
"remark-gfm": "^4.0.1",
"server-only": "^0.0.1",
"sharp": "^0.35.3",
"sonner": "^2.0.8",
"swr": "^2.5.1",
"tailwind-merge": "^3.2.0",
"tiptap-markdown": "^0.9.0",
"uuid": "^14.0.2",
"zod": "^4.3.6"
},
"lint-staged": {
"*.{ts,tsx,js,jsx}": "eslint --fix"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.6",
"@eslint/js": "^10.0.1",
"@playwright/test": "^1.62.1",
"@swc/helpers": "0.5.23",
"@tailwindcss/postcss": "^4.3.3",
"@testing-library/jest-dom": "^7.0.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.5",
"@types/bcryptjs": "^2.4.6",
"@types/busboy": "^1.5.4",
"@types/jest": "^30.0.0",
"@types/jsonwebtoken": "^9.0.5",
"@types/leaflet": "^1.9.22",
"@types/node": "^20.19.43",
"@types/nodemailer": "^7.0.1",
"@types/pg": "^8.23.1",
"@types/qrcode": "^1.5.6",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"concurrently": "^10.0.5",
"critters": "^0.0.25",
"drizzle-kit": "^0.31.9",
"eslint": "^10.9.0",
"eslint-config-next": "^16.3.2",
"eslint-plugin-react-hooks": "^7.1.1",
"husky": "^9.1.7",
"jest": "^30.3.0",
"jest-environment-jsdom": "^30.2.0",
"lint-staged": "^17.3.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.5.26",
"tailwindcss": "^4.3.0",
"typescript": "^5.3.3"
},
"overrides": {
"@swc/helpers": "0.5.23",
"@opentelemetry/core": "^2.8.0",
"fast-xml-parser": "^5.3.6",
"ajv": "^6.14.0",
"minimatch": "^10.2.1",
"nodemailer": "^9.0.1",
"js-yaml": "^4.3.1",
"basic-ftp": ">=5.3.0",
"postcss": "^8.5.26",
"esbuild": "0.28.1",
"shell-quote": "1.10.0",
"brace-expansion": "^5.0.9",
"uuid": "$uuid",
"sharp": "$sharp"
}
}