chore: remediate CI blockers for production readiness

This commit is contained in:
Ho Ngoc Hai
2026-05-07 13:08:20 +07:00
parent f82806e06d
commit b35ec55126
32 changed files with 401 additions and 113 deletions

View File

@@ -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.
*