From bfdfbc30937f2bbfb99f94c2bd484ba16385bdc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Tue, 7 Apr 2026 08:20:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(e2e):=20=E4=BC=98=E5=8C=96=20Playwrigh?= =?UTF-8?q?t=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 启用并行执行(fullyParallel: true) - 调整 workers 为 CI: 4, 本地: 50% - 添加 journeys 测试项目配置 --- novalon-manage-web/playwright.config.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/novalon-manage-web/playwright.config.ts b/novalon-manage-web/playwright.config.ts index 8765d22..75f906d 100644 --- a/novalon-manage-web/playwright.config.ts +++ b/novalon-manage-web/playwright.config.ts @@ -10,10 +10,10 @@ const baseURL = process.env.TEST_BASE_URL || process.env.VITE_BASE_URL || 'http: export default defineConfig({ testDir: './e2e', - fullyParallel: false, + fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 1, - workers: 1, + workers: process.env.CI ? 4 : '50%', reporter: [ ['html', { outputFolder: 'playwright-report' }], ['json', { outputFile: 'test-results/results.json' }], @@ -53,6 +53,21 @@ export default defineConfig({ }, projects: [ + { + name: 'journeys', + testDir: './e2e/journeys', + testMatch: /.*\.spec\.ts/, + use: { + ...devices['Desktop Chrome'], + launchOptions: { + args: [ + '--disable-blink-features=AutomationControlled', + '--disable-dev-shm-usage', + '--no-sandbox' + ] + } + }, + }, { name: 'role-based-tests', testDir: './e2e/role-based-tests/scenarios',