fix(api): сохранять достоверные параметры рекурсивных маршрутов

This commit is contained in:
Denozordec committed 2026-09-30 22:08:22 +07:00
1 parent 50fad3ac80
commit 54ef752a5b
17 files changed
+198 -45

No files matched your search

+2 -2
View File
@@ -11,8 +11,8 @@ test("Рекурсивные маршруты: все группы и раскр
await page.route("**/health", route => route.fulfill({ json: { ok: true } }))
await page.route("**/api/**", route => {
const path = new URL(route.request().url()).pathname
return route.fulfill({ json: path === "/api/recursive-routes" ? { serverId: 1, routes, live: true, stale: false }
: path === "/api/recursive-routes/gateways" ? { serverId: 1, gateways: [] }
return route.fulfill({ json: path === "/api/recursive-routes/catalog" ? { serverId: 1, routes, live: true, stale: false }
: path === "/api/recursive-routes/gateways/catalog" ? { serverId: 1, gateways: [] }
: path === "/api/auth/config" ? { required: false }
: path === "/api/servers" ? [{ id: 1, name: "Роутер", host: "192.0.2.100", type: "exit-node", site: "TEST", country: "RU", asn: "64512", enabled: true, status: "online", latency: 1 }]
: path === "/api/evobgp/settings" ? { enabled: false, baseUrl: "", secretConfigured: false } : {} })