31 lines
788 B
TypeScript
31 lines
788 B
TypeScript
import { defineConfig } from '@playwright/test';
|
|
import { mkdtempSync } from 'node:fs';
|
|
import { tmpdir } from 'node:os';
|
|
import path from 'node:path';
|
|
|
|
const dataDirectory = mkdtempSync(path.join(tmpdir(), 'sendewerk-e2e-'));
|
|
|
|
export default defineConfig({
|
|
testDir: 'tests',
|
|
testMatch: '**/*.e2e.ts',
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
webServer: {
|
|
command: 'npm run setup && npm run build && npm start',
|
|
url: 'http://127.0.0.1:4173/healthz',
|
|
timeout: 120_000,
|
|
reuseExistingServer: false,
|
|
env: {
|
|
SENDEWERK_DB_PATH: path.join(dataDirectory, 'e2e.sqlite'),
|
|
SENDEWERK_UPLOAD_DIR: path.join(dataDirectory, 'uploads'),
|
|
HOST: '127.0.0.1',
|
|
PORT: '4173'
|
|
}
|
|
},
|
|
use: {
|
|
baseURL: 'http://127.0.0.1:4173',
|
|
browserName: 'chromium',
|
|
trace: 'retain-on-failure'
|
|
}
|
|
});
|