From 69b0e7aba2e4780c604d3234a7267d54a1749829 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Wed, 4 Jun 2025 07:42:00 -0700 Subject: [PATCH] Attempt to improve Windows E2E reliability(#331) --- e2e-tests/helpers/test_helper.ts | 2 +- playwright.config.ts | 2 +- testing/fake-llm-server/chatCompletionHandler.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e-tests/helpers/test_helper.ts b/e2e-tests/helpers/test_helper.ts index 9c87ea0..5c66465 100644 --- a/e2e-tests/helpers/test_helper.ts +++ b/e2e-tests/helpers/test_helper.ts @@ -11,7 +11,7 @@ const showDebugLogs = process.env.DEBUG_LOGS === "true"; export const Timeout = { // Why make this a constant? In some platforms, perhaps locally, // we may want to shorten this. - LONG: 30_000, + LONG: os.platform() === "win32" ? 60_000 : 30_000, }; class PageObject { diff --git a/playwright.config.ts b/playwright.config.ts index 7c4c0a1..d1e4883 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -5,7 +5,7 @@ const config: PlaywrightTestConfig = { workers: 1, retries: process.env.CI ? 1 : 0, // maxFailures: 1, - timeout: process.env.CI ? 75_000 : 30_000, + timeout: process.env.CI ? 120_000 : 30_000, // Use a custom snapshot path template because Playwright's default // is platform-specific which isn't necessary for Dyad e2e tests // which should be platform agnostic (we don't do screenshots; only textual diffs). diff --git a/testing/fake-llm-server/chatCompletionHandler.ts b/testing/fake-llm-server/chatCompletionHandler.ts index c1ed56d..5797627 100644 --- a/testing/fake-llm-server/chatCompletionHandler.ts +++ b/testing/fake-llm-server/chatCompletionHandler.ts @@ -55,7 +55,7 @@ export const createChatCompletionHandler = }, null, 2, - ), + ).replace(/\r\n/g, "\n"), "utf-8", ); console.log(`* Dumped messages to: ${dumpFilePath}`);