test(app): e2e cleanup checks the seeded name before archiving

D4 identity check: the integrity spec reads each own sheet's name by its
captured id and archives it only when it is exactly the seeded name.
seedGrant checks the account id as a captured id, now shared from
records.ts.
This commit is contained in:
bchanot committed 2026-11-17 01:04:27 +01:00
1 parent 1e5058577f
commit 3bea19f16b
4 files changed
+30 -16

No files matched your search

+3 -1
View File
@@ -16,6 +16,7 @@ import {
import { sql, stack } from '../../../../packages/supabase/tests/sandbox/stack'
import { currentCode } from '../../../../packages/supabase/tests/sandbox/totp'
import { expect, test } from './browser'
import { capturedId } from './records'
import type { SandboxAccount } from './sandbox'
export type GrantKind =
@@ -40,8 +41,9 @@ export async function seedGrant(
kind: GrantKind,
): Promise<string> {
const note = kind === 'catalog_reader' ? 'null' : "'sandbox'"
const id = capturedId(account.id)
return sql(`insert into public.anatomical_catalog_grants (user_id, grant_kind, reason, verification_note, granted_by)
values ('${account.id}', '${kind}', 'sandbox', ${note}, '${account.id}') returning id`)
values ('${id}', '${kind}', 'sandbox', ${note}, '${id}') returning id`)
}
/** A password session of the account on GoTrue: always aal1. */