refactor: simplify playwright config
This commit is contained in:
parent
296be0e5b2
commit
036ccfd8ef
2 changed files with 3 additions and 5 deletions
|
@ -1,5 +1,4 @@
|
||||||
import { devices, PlaywrightTestConfig } from "@playwright/test"
|
import { devices, PlaywrightTestConfig } from "@playwright/test"
|
||||||
import path from "path"
|
|
||||||
|
|
||||||
const baseURL = "http://localhost:3000"
|
const baseURL = "http://localhost:3000"
|
||||||
|
|
||||||
|
@ -9,7 +8,7 @@ const config: PlaywrightTestConfig = {
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
|
|
||||||
// Test directory
|
// Test directory
|
||||||
testDir: path.join(__dirname, "e2e"),
|
testDir: "e2e",
|
||||||
|
|
||||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||||
outputDir: "test-results/",
|
outputDir: "test-results/",
|
||||||
|
@ -17,7 +16,7 @@ const config: PlaywrightTestConfig = {
|
||||||
// Run your local dev server before starting the tests:
|
// Run your local dev server before starting the tests:
|
||||||
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
|
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "pnpm dev:headless",
|
command: "pnpm build && pnpm serve",
|
||||||
url: baseURL,
|
url: baseURL,
|
||||||
timeout: 120 * 1000,
|
timeout: 120 * 1000,
|
||||||
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
// eslint-disable-next-line turbo/no-undeclared-env-vars
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import { devices, PlaywrightTestConfig } from "@playwright/test"
|
import { devices, PlaywrightTestConfig } from "@playwright/test"
|
||||||
import path from "path"
|
|
||||||
|
|
||||||
const baseURL = "http://localhost:5174"
|
const baseURL = "http://localhost:5174"
|
||||||
|
|
||||||
|
@ -9,7 +8,7 @@ const config: PlaywrightTestConfig = {
|
||||||
timeout: 30 * 1000,
|
timeout: 30 * 1000,
|
||||||
|
|
||||||
// Test directory
|
// Test directory
|
||||||
testDir: path.join(__dirname, "e2e"),
|
testDir: "e2e",
|
||||||
|
|
||||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||||
outputDir: "test-results/",
|
outputDir: "test-results/",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue