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:
1 parent
1e5058577f
commit
3bea19f16b
4 files changed
+30
-16
No files matched your search
@@ -11,6 +11,14 @@ import { workspaceOf, type SandboxAccount } from './sandbox'
|
||||
export const literal = (value: string | null) =>
|
||||
value === null ? 'null' : `'${value.replaceAll("'", "''")}'`
|
||||
|
||||
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
||||
|
||||
/** An id a run captured, checked before it is written into a statement. */
|
||||
export function capturedId(id: string): string {
|
||||
if (!UUID.test(id)) throw new Error(`not a captured id (${id})`)
|
||||
return id
|
||||
}
|
||||
|
||||
export interface ClientSeed {
|
||||
kind?: 'person' | 'organization'
|
||||
city?: string | null
|
||||
|
||||
Reference in new issue
Block a user