diff --git a/playwright.config.ts b/playwright.config.ts index 4b86c9d9..8001902e 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,20 +1,18 @@ import { defineConfig } from "@playwright/test" -const isGitHubAction = !!process?.env?.CI +const isCI = !!process?.env?.CI const isWindow = process?.platform?.startsWith("win") -const DEFAULT_TIMEOUT = isWindow ? 40000 : 20000 - export default defineConfig({ workers: 1, retries: 1, testDir: "src/test/e2e", - timeout: DEFAULT_TIMEOUT, + timeout: isCI || isWindow ? 40000 : 20000, expect: { - timeout: DEFAULT_TIMEOUT, + timeout: isCI || isWindow ? 5000 : 2000, }, fullyParallel: true, - reporter: isGitHubAction ? [["github"], ["list"]] : [["list"]], + reporter: isCI ? [["github"], ["list"]] : [["list"]], globalSetup: require.resolve("./src/test/e2e/utils/setup"), globalTeardown: require.resolve("./src/test/e2e/utils/teardown"), }) diff --git a/src/test/e2e/fixtures/server/index.ts b/src/test/e2e/fixtures/server/index.ts index 6eeab23c..6c420eff 100644 --- a/src/test/e2e/fixtures/server/index.ts +++ b/src/test/e2e/fixtures/server/index.ts @@ -332,7 +332,7 @@ export class ClineApiServerMock { } res.write(`data: ${JSON.stringify(chunk)}\n\n`) chunkIndex++ - setTimeout(sendChunk, 50) + setTimeout(sendChunk, 20) } else { const finalChunk = { id: generationId,