chore: remediate CI blockers for production readiness
This commit is contained in:
@@ -50,6 +50,16 @@ export async function loginUser(
|
||||
return res.json();
|
||||
}
|
||||
|
||||
/** Logs in the seeded admin created by prisma/seed.ts for E2E admin happy paths. */
|
||||
export async function loginSeedAdmin(request: APIRequestContext): Promise<TokenPair> {
|
||||
const phone = process.env['E2E_ADMIN_PHONE'] ?? '0876677771';
|
||||
const password = process.env['SEED_DEFAULT_PASSWORD'];
|
||||
if (!password) {
|
||||
throw new Error('SEED_DEFAULT_PASSWORD is required to log in the seeded admin user');
|
||||
}
|
||||
return loginUser(request, phone, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extended test fixture that provides a pre-authenticated API context.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user