mirror of
https://github.com/cline/cline.git
synced 2026-10-30 18:12:49 +08:00
* refactor: e2e test setup to use Playwright projects with global server - Replace globalSetup/globalTeardown with Playwright projects configuration - Rename setup.ts to global.setup.ts and teardown.ts to global.teardown.ts - Convert ClineApiServerMock to use shared global server instance - Add proper dependency management between setup, tests, and cleanup phases - Improve server connection tracking and cleanup handling * Rename Playwright test project names to match * IS_DEV * update helpers
33 lines
718 B
TypeScript
33 lines
718 B
TypeScript
import { defineConfig } from "@playwright/test"
|
|
|
|
const isCI = !!process?.env?.CI
|
|
const isWindow = process?.platform?.startsWith("win")
|
|
|
|
export default defineConfig({
|
|
workers: 1,
|
|
retries: 1,
|
|
testDir: "src/test/e2e",
|
|
timeout: isCI || isWindow ? 40000 : 20000,
|
|
expect: {
|
|
timeout: isCI || isWindow ? 5000 : 2000,
|
|
},
|
|
fullyParallel: true,
|
|
reporter: isCI ? [["github"], ["list"]] : [["list"]],
|
|
projects: [
|
|
{
|
|
name: "setup test environment",
|
|
testMatch: /global\.setup\.ts/,
|
|
},
|
|
{
|
|
name: "e2e tests",
|
|
testMatch: /.*\.test\.ts/,
|
|
dependencies: ["setup test environment"],
|
|
},
|
|
{
|
|
name: "cleanup test environment",
|
|
testMatch: /global\.teardown\.ts/,
|
|
dependencies: ["e2e tests"],
|
|
},
|
|
],
|
|
})
|