mirror of
https://github.com/nexu-io/open-design.git
synced 2026-05-31 19:04:39 +07:00
* feat(dev): add desktop tools-dev control plane * refactor(sidecar): split Open Design contracts Move Open Design-specific sidecar protocol definitions into @open-design/contracts so sidecar and platform can remain descriptor-driven primitives. * refactor(daemon): organize package sources Keep daemon app code, tests, and sidecar entrypoints in separate package directories so each layer can be built and verified independently. * chore(repo): streamline maintenance entrypoints Centralize agent guidance by directory and reduce root command chains while preserving the existing build scope. * docs: translate agent guidance to English * fix(sidecar): tolerate stale IPC sockets Remove stale Unix socket files only after confirming no listener is active, so tools-dev can restart after unclean shutdowns.
50 lines
1.5 KiB
TypeScript
50 lines
1.5 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}`;
|
|
|
|
export default defineConfig({
|
|
testDir: './specs',
|
|
outputDir: './reports/test-results',
|
|
timeout: 30_000,
|
|
expect: {
|
|
timeout: 10_000,
|
|
},
|
|
fullyParallel: true,
|
|
reporter: process.env.CI
|
|
? [
|
|
['github'],
|
|
['list'],
|
|
['html', { open: 'never', outputFolder: './reports/playwright-html-report' }],
|
|
['json', { outputFile: './reports/results.json' }],
|
|
['junit', { outputFile: './reports/junit.xml' }],
|
|
['./reporters/markdown-reporter.ts', { outputFile: './reports/latest.md' }],
|
|
]
|
|
: [
|
|
['list'],
|
|
['html', { open: 'never', outputFolder: './reports/playwright-html-report' }],
|
|
['json', { outputFile: './reports/results.json' }],
|
|
['junit', { outputFile: './reports/junit.xml' }],
|
|
['./reporters/markdown-reporter.ts', { outputFile: './reports/latest.md' }],
|
|
],
|
|
use: {
|
|
baseURL,
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
},
|
|
webServer: {
|
|
command:
|
|
`OD_DATA_DIR=e2e/.od-data ` +
|
|
`pnpm --dir .. tools-dev run web --daemon-port ${daemonPort} --web-port ${webPort}`,
|
|
url: baseURL,
|
|
reuseExistingServer: false,
|
|
timeout: 120_000,
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
],
|
|
});
|