You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
knowfoolery/frontend/apps/web/playwright.fullstack.config.ts

32 lines
918 B
TypeScript

import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { defineConfig } from '@playwright/test'
const configDir = path.dirname(fileURLToPath(import.meta.url))
const frontendRoot = path.resolve(configDir, '../..')
export default defineConfig({
testDir: './e2e/full-stack',
timeout: 60_000,
workers: 1,
globalSetup: './e2e/full-stack/global.setup.ts',
globalTeardown: './e2e/full-stack/global.teardown.ts',
use: {
baseURL: process.env.PW_BASE_URL ?? 'http://127.0.0.1:4175',
headless: true,
},
webServer: {
command: 'yarn workspace @knowfoolery/web dev --host 127.0.0.1 --port 4175',
cwd: frontendRoot,
port: 4175,
reuseExistingServer: !process.env.CI,
timeout: 60_000,
env: {
...process.env,
VITE_API_BASE_URL: process.env.VITE_API_BASE_URL ?? 'http://127.0.0.1:18096/api/v1',
VITE_LEADERBOARD_FORCE_API: 'true',
},
},
})