chore(test): сохранить общую регрессию смены контекста
This commit is contained in:
1 parent
91c1194550
commit
8d6d82082c
5 files changed
+249
-2
No files matched your search
@@ -0,0 +1,23 @@
|
||||
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" },
|
||||
},
|
||||
})
|
||||
Reference in new issue
Block a user