fix(ipsec): показывать все привязки общего сертификата
This commit is contained in:
1 parent
60b2e099f0
commit
58f5c48a97
17 files changed
+1213
-56
No files matched your search
@@ -6,6 +6,26 @@ const servers = [1, 2].map(id => ({ id, name: "Роутер " + id, host: "192.0
|
||||
const full = { servers: [summary("1"), summary("2")], clients: [client("1"), client("2")] }
|
||||
|
||||
for (const width of [1280, 320]) {
|
||||
test(`IPsec: один сертификат сохраняет разные строки identity ${width}px`, async ({ page }) => {
|
||||
await page.setViewportSize({ width, height: 1000 })
|
||||
await page.route("**/health", r => r.fulfill({ json: { ok: true } }))
|
||||
await page.route("**/api/**", r => {
|
||||
const path = new URL(r.request().url()).pathname
|
||||
return r.fulfill({ json: path === "/api/ipsec" ? {
|
||||
servers: [{ ...summary("1"), clientsTotal: 2, clientsSessionAmbiguous: 2 }],
|
||||
clients: [0,1].map(n => ({ ...client("1", "Привязка " + n), id: "1:identity:*" + n, rosId: "identity:*" + n, certName: "shared-certificate", staticIp: "198.18.114." + (250+n), sessionAmbiguous: true })),
|
||||
} : path === "/api/servers" ? servers : path === "/api/auth/config" ? { required: false } : {} })
|
||||
})
|
||||
await page.goto("/ipsec?server=1")
|
||||
const rows = page.locator("tr[data-row-id]")
|
||||
await expect(rows).toHaveCount(2)
|
||||
for (const n of [0,1]) {
|
||||
const row = rows.filter({ has: page.getByRole("button", { name: "Привязка " + n, exact: true }) })
|
||||
await expect(row).toContainText("198.18.114." + (250+n))
|
||||
await expect(row.getByText("Не определено", { exact: true })).toHaveCount(1)
|
||||
}
|
||||
expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true)
|
||||
})
|
||||
test(`IPsec: несколько сессий одного клиента без произвольного адреса ${width}px`, async ({ page }) => {
|
||||
await page.setViewportSize({ width, height: 1000 })
|
||||
let phase = 0
|
||||
|
||||
Reference in new issue
Block a user