mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-12-06 11:14:26 +00:00
29 lines
1.3 KiB
TypeScript
29 lines
1.3 KiB
TypeScript
import { defineConfig } from '@playwright/test';
|
|
import { devOrigin, portBase, publicOrigin } from './test/e2e/localServers.js';
|
|
|
|
// Exercise the shipped public feed with the same invented traffic in both engines.
|
|
export default defineConfig({
|
|
testDir: './test/e2e',
|
|
forbidOnly: Boolean(process.env['CI']),
|
|
timeout: 90_000,
|
|
expect: { timeout: 15_000 },
|
|
webServer: [{
|
|
command: `VITE_BUILD_TARGET=public-website VITE_APP_HOSTNAME=app.ukmesh.com VITE_SITE=ukmesh VITE_NETWORK=ukmesh npm run build -- --config vite.e2e.config.ts --outDir dist/e2e-feed && npm run preview -- --config vite.e2e.config.ts --outDir dist/e2e-feed --host 127.0.0.1 --port ${portBase} --strictPort`,
|
|
port: portBase, reuseExistingServer: false, timeout: 180_000,
|
|
}, {
|
|
command: `npm run dev -- --config vite.e2e.config.ts --host 127.0.0.1 --port ${portBase + 2} --strictPort`,
|
|
port: portBase + 2, reuseExistingServer: false, timeout: 120_000,
|
|
}],
|
|
workers: 1,
|
|
retries: 0,
|
|
projects: (['firefox', 'webkit'] as const).flatMap(browserName => [{
|
|
name: `feed-${browserName}`,
|
|
testMatch: /feed-virtualizer\.spec\.ts/,
|
|
use: { browserName, baseURL: publicOrigin },
|
|
}, {
|
|
name: `socket-replay-${browserName}`,
|
|
testMatch: /socket-replay\.spec\.ts/,
|
|
use: { browserName, baseURL: devOrigin },
|
|
}]),
|
|
});
|