fix(ui): показывать ошибки и свежесть NetFlow карты

This commit is contained in:
Denozordec committed 2026-10-01 01:56:39 +07:00
1 parent e47e2b4029
commit 1bce4e1ea2
7 files changed
+139 -45

No files matched your search

+2 -2
View File
@@ -6,11 +6,11 @@ for(const part of ["servers","gre","probes"] as const)for(const malformed of [fa
await page.route("**/health",r=>r.fulfill({json:{ok:true}}))
await page.route("**/api/**",r=>{const p=new URL(r.request().url()).pathname;return r.fulfill(failing&&p===paths[part]?(malformed?{json:{}}:{status:403,json:{error:"Нет доступа к данным"}}):{json:body(p)})})
await page.goto("/network-map")
await expect(page.getByRole("alert").filter({hasText:"Первоначальная загрузка"})).toBeVisible()
await expect(page.getByRole("alert").filter({hasText:"Первоначальная загрузка карты"})).toBeVisible()
await expect(page.getByText("Данные карты неизвестны",{exact:true})).toBeVisible()
failing=false;await page.getByRole("button",{name:"Обновить",exact:true}).click()
await expect(page.getByText("Роутер",{exact:true}).first()).toBeVisible()
await expect(page.getByRole("alert").filter({hasText:"Первоначальная загрузка"})).toHaveCount(0)
await expect(page.getByRole("alert").filter({hasText:"Первоначальная загрузка карты"})).toHaveCount(0)
})
for(const part of ["servers","gre","probes"] as const)test("Карта: частичный отказ сохраняет снимок "+part,async({page})=>{
let failing=false