mirror of
https://github.com/TautvydasDerzinskas/Thingport.git
synced 2026-10-21 06:09:56 -05:00
28 lines
806 B
TypeScript
28 lines
806 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
export const ADMIN_STATE = ".auth/admin.json";
|
|
|
|
export default defineConfig({
|
|
testDir: "tests",
|
|
// Scenarios share one database, and the first account registered becomes the admin.
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
reporter: process.env.CI ? [["list"], ["html", { open: "never" }]] : "list",
|
|
use: {
|
|
baseURL: process.env.BASE_URL || "http://localhost:8090",
|
|
locale: "en-US",
|
|
trace: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
projects: [
|
|
{ name: "setup", testMatch: /.*\.setup\.ts/ },
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"], storageState: ADMIN_STATE },
|
|
dependencies: ["setup"],
|
|
},
|
|
],
|
|
});
|