From 098568c59bed7730e2e553679d0554747f27c0df Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Wed, 12 Jun 2024 08:57:49 +0930 Subject: [PATCH 1/2] Run playwright in parallel with 4 workers --- apps/smart-forms-app/playwright.config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/smart-forms-app/playwright.config.ts b/apps/smart-forms-app/playwright.config.ts index 84c2031f..5479557d 100644 --- a/apps/smart-forms-app/playwright.config.ts +++ b/apps/smart-forms-app/playwright.config.ts @@ -18,7 +18,7 @@ export default defineConfig({ /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, + workers: process.env.CI ? 4 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ @@ -71,8 +71,8 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: 'npm run build && npm run preview', - url: 'http://localhost:4173', + command: 'npm run start', + url: 'http://localhost:5173', reuseExistingServer: !process.env.CI } }); From 68d5b4451df1f4956885c8e2e3d6ee46ec79c3c2 Mon Sep 17 00:00:00 2001 From: Sean Fong Date: Wed, 12 Jun 2024 09:52:58 +0930 Subject: [PATCH 2/2] Fix playwright config --- apps/smart-forms-app/playwright.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/smart-forms-app/playwright.config.ts b/apps/smart-forms-app/playwright.config.ts index 5479557d..f34ce6c3 100644 --- a/apps/smart-forms-app/playwright.config.ts +++ b/apps/smart-forms-app/playwright.config.ts @@ -71,8 +71,8 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: 'npm run start', - url: 'http://localhost:5173', + command: 'npm run build && npm run preview', + url: 'http://localhost:4173', reuseExistingServer: !process.env.CI } });