2022-03-02 17:26:53 +00:00
|
|
|
import * as path from "path"
|
|
|
|
import { PlaywrightTestConfig } from "@playwright/test"
|
|
|
|
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
|
|
testDir: "tests",
|
|
|
|
globalSetup: require.resolve("./globalSetup"),
|
|
|
|
|
|
|
|
// Create junit report file for upload to DataDog
|
|
|
|
reporter: [["junit", { outputFile: "test-results/junit.xml" }]],
|
|
|
|
|
|
|
|
use: {
|
|
|
|
baseURL: "http://localhost:3000",
|
|
|
|
video: "retain-on-failure",
|
|
|
|
},
|
|
|
|
|
|
|
|
// `webServer` tells Playwright to launch a test server - more details here:
|
|
|
|
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
|
|
|
|
webServer: {
|
2022-03-08 01:50:37 +00:00
|
|
|
// Run the coder daemon directly.
|
2022-03-24 15:07:33 +00:00
|
|
|
command: `go run -tags embed ${path.join(__dirname, "../../cmd/coder/main.go")} start --dev --tunnel=false`,
|
2022-03-02 17:26:53 +00:00
|
|
|
port: 3000,
|
|
|
|
timeout: 120 * 10000,
|
|
|
|
reuseExistingServer: false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|