chore: perauset customer project
This commit is contained in:
22
e2e/tests/support/browser-config.ts
Normal file
22
e2e/tests/support/browser-config.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { resolve, dirname } from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
// `pikku db reset` only operates on files inside .pikku-runtime/, so the e2e db
|
||||
// lives there (not e2e/.tmp).
|
||||
const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..')
|
||||
|
||||
// Browser e2e config.
|
||||
//
|
||||
// The harness (browser-hooks.ts) starts both servers itself:
|
||||
// - backend → backend/bin/start-e2e.ts (SQLite) on backendPort
|
||||
// - frontend → apps/app vite dev server on 6001, configured to proxy /api to
|
||||
// the backend (VITE_BACKEND_URL) and to treat its own origin as the API
|
||||
// base (VITE_API_URL=<appUrl>/api) so auth + RPC stay same-origin.
|
||||
export const browserConfig = {
|
||||
appUrl: process.env.APP_URL || 'http://localhost:6001',
|
||||
backendUrl: process.env.E2E_BACKEND_URL || 'http://localhost:6002',
|
||||
/** Isolated SQLite file the e2e backend serves. */
|
||||
dbFile: process.env.E2E_DB_FILE || resolve(repoRoot, '.pikku-runtime/browser-e2e.db'),
|
||||
timeout: Number(process.env.E2E_TIMEOUT ?? 60_000),
|
||||
headed: process.env.HEADED === '1',
|
||||
}
|
||||
Reference in New Issue
Block a user