e2e: register and repair the settings/explore/social specs

settings.test.ts, explore.test.ts, and social.test.ts weren't matched
by any Playwright project, so they had silently never run — which is
how they rotted. Register them (one project each) and repair the
selectors against the current UI:

- settings: the page was split into sibling sections
  (/settings/{profile,security,account}); the spec assumed one page.
  Navigate to the right sub-page per test, use the stable section-nav
  links + #id input locators (the Vite dev server transiently
  double-renders the profile form during hydration, breaking
  getByLabel), and wait for hydration before interacting with
  fetcher-backed forms and the avatar dropdown.
- explore: setProfileVisibility now targets /settings/profile and
  waits for hydration so the visibility save uses the fetcher.
- social: already green once registered.

Also fixes an app bug the specs surfaced: deleting a passkey redirected
to /settings#security, a stale anchor that now resolves to
/settings/profile — so you'd land on the wrong section. It now
redirects to /settings/security.

Verified locally against Postgres/BRouter: green under CI-style
retries (the residual registration flake is the same cold-start class
the rest of the suite has, which is why CI runs retries=2).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-06-11 08:32:18 +02:00
parent b4067301cc
commit 7a290cd56f
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
4 changed files with 73 additions and 27 deletions

View file

@ -16,7 +16,7 @@ export default defineConfig({
},
// NOTE: specs only run if a project below matches them — a new
// e2e/*.test.ts file MUST be registered here or it silently never
// executes (settings/explore/social sat unregistered for months).
// executes.
projects: [
{
name: "journal",
@ -90,6 +90,30 @@ export default defineConfig({
baseURL: "http://localhost:3000",
},
},
{
name: "settings",
testMatch: "settings.test.ts",
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:3000",
},
},
{
name: "explore",
testMatch: "explore.test.ts",
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:3000",
},
},
{
name: "social",
testMatch: "social.test.ts",
use: {
...devices["Desktop Chrome"],
baseURL: "http://localhost:3000",
},
},
],
webServer: process.env.CI
? [