From db81928dfa7fedfbbe108d51b895cfaed48d2e15 Mon Sep 17 00:00:00 2001 From: bchanot Date: Mon, 26 Oct 2026 02:00:33 +0100 Subject: [PATCH] fix(app): no HTML report for the shell suite, it kept typed passwords The report's step titles held what the tests typed, the throwaway sandbox accounts' passwords included, contrary to BROWSER_TESTS.md. The shell suite keeps the terminal output and failure screenshots; the old report deleted. --- apps/app/e2e/playwright.shell.config.ts | 11 ++++++----- docs/development/BROWSER_TESTS.md | 14 +++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/app/e2e/playwright.shell.config.ts b/apps/app/e2e/playwright.shell.config.ts index 9ceaf607..a05cad07 100644 --- a/apps/app/e2e/playwright.shell.config.ts +++ b/apps/app/e2e/playwright.shell.config.ts @@ -3,7 +3,8 @@ * shell in Chromium against the isolated stack of `pnpm db:sandbox`, never DEV. * The dev server is built with a Supabase URL that resolves nowhere and runs * on a loopback port of its own; e2e/support/sandbox.ts replays its calls on - * the sandbox. No trace is kept: it would hold the session tokens. + * the sandbox. No trace and no HTML report are kept: they would hold the + * session tokens and the typed passwords. */ import { defineConfig } from '@playwright/test' import type { GuardOptions } from './support/browser' @@ -23,10 +24,10 @@ export default defineConfig({ fullyParallel: true, forbidOnly: true, retries: 0, - reporter: [ - ['list'], - ['html', { outputFolder: './playwright-report/shell', open: 'never' }], - ], + // No HTML report: its step titles would keep what the test typed, the + // fictitious accounts' passwords included. The terminal and the failure + // screenshots stay. + reporter: [['list']], use: { baseURL: ORIGIN, allowedOrigins: [ORIGIN, FAKE_SUPABASE_ORIGIN], diff --git a/docs/development/BROWSER_TESTS.md b/docs/development/BROWSER_TESTS.md index 708e742e..5e19ec8d 100644 --- a/docs/development/BROWSER_TESTS.md +++ b/docs/development/BROWSER_TESTS.md @@ -69,14 +69,18 @@ object with the service key). `pnpm db:sandbox down` removes all of it. inherits an exception (owner brief 2026-10-26). - Reports: `apps/app/e2e/test-results/` and `apps/app/e2e/playwright-report/`, git-ignored. The UI suite keeps a trace and a screenshot of a failed test - (no backend, no secret). The shell suite keeps a screenshot only: a trace - would hold the session tokens and the typed password. + (no backend, no secret). The shell suite keeps the terminal output and a + screenshot of a failed test only: a trace would hold the session tokens, and + an HTML report the typed values, the fictitious accounts' passwords included + (found in the V1-1.5 report check, 2026-10-26; the HTML reporter was removed + from the shell config). Screenshots and the failure's page snapshot show + fictitious names and addresses only. ## 4. Reading a failure -The terminal shows each step and the failing assertion. The HTML report: -`pnpm --filter @faunosteo/app exec playwright show-report e2e/playwright-report/ui` -(or `.../shell`); a UI trace: `pnpm --filter @faunosteo/app exec playwright +The terminal shows each step and the failing assertion. The HTML report of +the UI suite: `pnpm --filter @faunosteo/app exec playwright show-report +e2e/playwright-report/ui` (the shell suite has none); a UI trace: `pnpm --filter @faunosteo/app exec playwright show-trace `. Setup failures are named: a missing Chromium (Playwright prints the install command), a stale core module (`run pnpm wasm:build`), the shell suite outside its wrapper