qwen-code/packages/web-shell/playwright.config.ts
ermin.zem 5c82857fea
Some checks are pending
E2E Tests / E2E Test (Linux) - sandbox:docker (push) Waiting to run
E2E Tests / E2E Test (Linux) - sandbox:none (push) Waiting to run
E2E Tests / E2E Test - macOS (push) Waiting to run
E2E Tests / web-shell Browser Regression (push) Waiting to run
Add harness infrastructure for web-shell package (#6517)
* test(web-shell): add browser and lint harness

* test(web-shell): harden browser smoke harness

* fix(web-shell): guard mock daemon model state

* test(web-shell): remove unused scenario harness

* fix(web-shell): remove stale lint disables

* test(web-shell): make matchMedia stub writable

* fix(web-shell): exclude tests from package typecheck

* test(web-shell): tighten mock daemon route contract

* Update packages/web-shell/client/e2e/utils/mockDaemon.ts

Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com>

* test(web-shell): clear stale SSE connections

* ci(web-shell): gate smoke on full CI profile

---------

Co-authored-by: ermin.zem <ermin.zem@alibaba-inc.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com>
Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
Co-authored-by: 易良 <1204183885@qq.com>
2026-07-09 08:11:58 +00:00

38 lines
942 B
TypeScript

import { defineConfig, devices } from '@playwright/test';
const port = Number(process.env['PLAYWRIGHT_PORT'] ?? 5174);
const baseURL =
process.env['PLAYWRIGHT_BASE_URL'] ?? `http://127.0.0.1:${port}`;
export default defineConfig({
testDir: './client/e2e',
outputDir: './client/e2e/test-results',
timeout: 60_000,
expect: {
timeout: 10_000,
},
forbidOnly: !!process.env['CI'],
retries: process.env['CI'] ? 2 : 0,
reporter: [
['line'],
['html', { outputFolder: 'client/e2e/playwright-report', open: 'never' }],
],
webServer: {
command: `npm run dev -- --host 127.0.0.1 --port ${port}`,
url: baseURL,
reuseExistingServer: !process.env['CI'],
timeout: 120_000,
},
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
});