fix(editor): e2e setup retries a GoTrue 500 step-up, drops late replays

This commit is contained in:
bchanot committed 2026-11-14 19:01:21 +01:00
1 parent dca80cb006
commit 0ea94602d1
5 files changed
+110 -11

No files matched your search

+13
View File
@@ -27,6 +27,7 @@ import { core } from './catalogue'
import { parseOutcome } from '@faunosteo/core-wasm'
import {
createAccount,
dropLateReplays,
FAKE_SUPABASE_ORIGIN,
routeToSandbox,
type SandboxAccount,
@@ -778,6 +779,18 @@ export async function secondSession(
return { context, page: await context.newPage() }
}
/**
* Closes a session opened by `secondSession`. Its replays still running are dropped
* first: closing the context under them rejects their `route.fetch` or `route.fulfill`
* (« Request context disposed »), which fails the test (verifier 10, gate final3).
*/
export async function closeSecondSession(session: {
context: BrowserContext
}): Promise<void> {
await dropLateReplays(session.context)
await session.context.close()
}
/** The storage key of the tab's recovery copy of a draft (state/recovery.ts). */
export const copyKeyOf = (userId: string, versionId: string) =>
`osteo:sheet-draft:${userId}:${versionId}`