trips) add playwright e2e flows and issue video upload guidance
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m27s
This commit is contained in:
20
e2e/setup/global-setup.ts
Normal file
20
e2e/setup/global-setup.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { FullConfig } from '@playwright/test';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { resolve } from 'path';
|
||||
import { config as dotenvConfig } from 'dotenv';
|
||||
|
||||
dotenvConfig({ path: resolve(process.cwd(), '.env.test'), override: true });
|
||||
|
||||
async function globalSetup(_config: FullConfig): Promise<void> {
|
||||
console.log('[e2e] Seeding test database via Bun...');
|
||||
const result = spawnSync('bun', ['run', 'e2e/setup/seed-db.ts'], {
|
||||
env: { ...process.env },
|
||||
stdio: 'inherit',
|
||||
cwd: process.cwd()
|
||||
});
|
||||
if (result.status !== 0) {
|
||||
throw new Error(`[e2e] DB seed script failed with exit code ${result.status}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default globalSetup;
|
||||
Reference in New Issue
Block a user