This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
const { defineConfig, devices } = require("@playwright/test")
|
||||
|
||||
module.exports = defineConfig({
|
||||
testDir: "./tests",
|
||||
timeout: 30 * 1000,
|
||||
expect: {
|
||||
timeout: 5000
|
||||
},
|
||||
fullyParallel: true,
|
||||
forbidOnly: Boolean(process.env.CI),
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: process.env.CI ? [["list"], ["html", { open: "never" }]] : "list",
|
||||
use: {
|
||||
baseURL: "http://127.0.0.1:4173",
|
||||
trace: "retain-on-failure",
|
||||
screenshot: "only-on-failure",
|
||||
video: "retain-on-failure"
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] }
|
||||
}
|
||||
],
|
||||
webServer: {
|
||||
command: "npx http-server . -a 127.0.0.1 -p 4173 -c-1 --silent",
|
||||
url: "http://127.0.0.1:4173/index.html",
|
||||
reuseExistingServer: !process.env.CI,
|
||||
timeout: 120 * 1000
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user