fix: test failing
This commit is contained in:
parent
037a5625fb
commit
9423645ee5
2 changed files with 23 additions and 4 deletions
|
@ -3,7 +3,8 @@
|
|||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "open-cli http://localhost:3000 && next dev",
|
||||
"dev": "open-cli http://localhost:3000 && pnpm dev:headless",
|
||||
"dev:headless": "next dev",
|
||||
"build": "next build",
|
||||
"postbuild": "next-sitemap",
|
||||
"serve": "serve build --listen 3000",
|
||||
|
|
|
@ -1,5 +1,23 @@
|
|||
import { createConfig } from "@developomp-site/playwright-config"
|
||||
import { defineConfig } from "@playwright/test"
|
||||
|
||||
export default createConfig({
|
||||
port: 3000,
|
||||
const SECOND = 1000
|
||||
const baseURL = "http://localhost:3000"
|
||||
|
||||
// https://playwright.dev/docs/test-configuration
|
||||
export default defineConfig({
|
||||
// Artifacts folder where screenshots, videos, and traces are stored.
|
||||
outputDir: "test-results/",
|
||||
|
||||
// https://playwright.dev/docs/test-advanced#launching-a-development-web-server-during-the-tests
|
||||
webServer: {
|
||||
command: "pnpm dev:headless",
|
||||
url: baseURL,
|
||||
timeout: 10 * SECOND,
|
||||
},
|
||||
|
||||
use: {
|
||||
// Use baseURL so to make navigation relative.
|
||||
// https://playwright.dev/docs/api/class-testoptions#test-options-base-url
|
||||
baseURL,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue