fix(bgp): сохранять неизвестные AS и тип сессии
This commit is contained in:
1 parent
2e17cbe926
commit
5c307a5b6c
9 files changed
+47
-21
No files matched your search
@@ -75,13 +75,15 @@ test("BGP: неизвестные поля и наблюдаемый ноль н
|
||||
await page.route("**/health", r => r.fulfill({ json: { ok: true } }))
|
||||
await page.route("**/api/**", r => {
|
||||
const path = new URL(r.request().url()).pathname
|
||||
const unknown = { ...session(1), state: "Неизвестное состояние RouterOS", holdTime: null, keepalive: null, prefixesRx: null, prefixesTx: null, inputMessages: null, outputMessages: null, afi: "ip,ipv6" }
|
||||
const unknown = { ...session(1), state: "Неизвестное состояние RouterOS", remoteAs: null, localAs: null, type: "Unknown", holdTime: null, keepalive: null, prefixesRx: null, prefixesTx: null, inputMessages: null, outputMessages: null, afi: "ip,ipv6" }
|
||||
return r.fulfill({ json: path === "/api/servers" ? [server(1), server(2)] : path === "/api/bgp/catalog" ? { sessions: [unknown, { ...session(2), prefixesRx: 0, prefixesTx: 0 }], failures: [] } : path === "/api/auth/config" ? { required: false } : {} })
|
||||
})
|
||||
await page.goto("/bgp")
|
||||
const rows = page.locator("tr[data-row-id]")
|
||||
await expect(rows).toHaveCount(2)
|
||||
await expect(rows.first()).toContainText("Неизвестно")
|
||||
await expect(rows.first()).toContainText("AS неизвестна")
|
||||
await expect(rows.first()).toContainText("Тип неизвестен")
|
||||
await expect(rows.last().locator("td").nth(7)).toHaveText("0")
|
||||
await rows.first().click()
|
||||
await expect(page.getByText("ip,ipv6", { exact: true })).toBeVisible()
|
||||
|
||||
Reference in new issue
Block a user