mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
* test: strengthen e2e PR coverage * fix: address e2e PR feedback Generated-By: looper 0.6.1 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Generated-By: looper 0.6.1 (runner=fixer, agent=opencode) * ci: cache Windows packaged smoke builds * test: fake additional agent runtimes * fix: address e2e PR feedback Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Route tools-pack mac starts through a launch-time packaged config override so portable packaged smoke runs keep using the namespace runtime root that inspect and logs expect. Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Fall back to the packaged app's embedded config when the build output config is missing so installed mac starts still work. Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: align packaged mac PR smoke with tools-pack runtime mode Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Keep blake3-wasm out of the packaged mac daemon prebundle so the standalone runtime loads the Cloudflare asset hasher from node_modules instead of crashing in ESM. Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix: address e2e PR feedback Skip the portable mac launch override when the bundled packaged config is missing so installed fallback app targets can still boot with packaged defaults. Add a regression test covering the missing-config start path. Generated-By: looper 0.6.2 (runner=fixer, agent=opencode) * fix(pack): remove duplicate mac prebundle dependency key
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
const daemonPort = Number(process.env.OD_PORT) || 17_456;
|
|
const webPort = Number(process.env.OD_WEB_PORT) || 17_573;
|
|
const baseURL = `http://127.0.0.1:${webPort}`;
|
|
const namespace = process.env.OD_E2E_NAMESPACE || `playwright-${process.pid}`;
|
|
const dataDir = process.env.OD_E2E_DATA_DIR || `e2e/ui/.od-data/${namespace}`;
|
|
|
|
function shellQuote(value: string): string {
|
|
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
}
|
|
|
|
export default defineConfig({
|
|
testDir: './ui',
|
|
outputDir: './ui/reports/test-results',
|
|
timeout: 30_000,
|
|
retries: process.env.CI ? 1 : 0,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
// The webServer owns one daemon and one OD_DATA_DIR for the entire UI suite.
|
|
// Keep backend-mutating UI tests serialized until the harness can boot an
|
|
// isolated daemon/data directory per worker.
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
reporter: process.env.CI
|
|
? [
|
|
['github'],
|
|
['list'],
|
|
['html', { open: 'never', outputFolder: './ui/reports/playwright-html-report' }],
|
|
['json', { outputFile: './ui/reports/results.json' }],
|
|
['junit', { outputFile: './ui/reports/junit.xml' }],
|
|
]
|
|
: [
|
|
['list'],
|
|
['html', { open: 'never', outputFolder: './ui/reports/playwright-html-report' }],
|
|
['json', { outputFile: './ui/reports/results.json' }],
|
|
['junit', { outputFile: './ui/reports/junit.xml' }],
|
|
],
|
|
use: {
|
|
baseURL,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
webServer: {
|
|
command:
|
|
`OD_DATA_DIR=${shellQuote(dataDir)} ` +
|
|
`pnpm --dir .. tools-dev run web --namespace ${shellQuote(namespace)} --daemon-port ${daemonPort} --web-port ${webPort}`,
|
|
url: baseURL,
|
|
reuseExistingServer: false,
|
|
timeout: 120_000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|