24 lines
1000 B
TypeScript
24 lines
1000 B
TypeScript
import { defineConfig } from "@playwright/test"
|
|
import base from "./playwright.config"
|
|
|
|
const server = base.webServer
|
|
const contextFiles = base.testIgnore
|
|
if (!server || Array.isArray(server)) throw new Error("Ожидается один локальный frontend сервер")
|
|
if (!Array.isArray(contextFiles) || contextFiles.some(file => typeof file !== "string")) {
|
|
throw new Error("Ожидается список context файлов, исключённых из основной регрессии")
|
|
}
|
|
|
|
// Same isolation as individual context configs, with one sequential server session.
|
|
export default defineConfig({
|
|
...base,
|
|
use: { ...base.use, baseURL: "http://127.0.0.1:3101" },
|
|
testIgnore: [],
|
|
testMatch: [...contextFiles, "**/backend-switch.e2e.ts"],
|
|
webServer: {
|
|
...server,
|
|
command: "node node_modules/next/dist/bin/next dev --hostname 127.0.0.1 --port 3101",
|
|
url: "http://127.0.0.1:3101",
|
|
env: { ...server.env, NEXT_PUBLIC_BACKEND_URL: "local" },
|
|
},
|
|
})
|