fix: test failing

This commit is contained in:
Kim, Jimin 2024-04-27 23:27:10 +09:00
parent 037a5625fb
commit 9423645ee5
Signed by: pomp
GPG key ID: 2B516173EDD492EB
2 changed files with 23 additions and 4 deletions

View file

@ -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",

View file

@ -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,
},
})