fix(ui): проверять контекст расчёта OSPF оптимизатора

This commit is contained in:
Denozordec committed 2026-09-30 22:47:04 +07:00
1 parent f93dfe34c2
commit bf2815b5a4
9 files changed
+131 -108

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ test("Оптимизатор: live рекомендации не подтвер
await page.route("**/api/**",r=>{
const p=new URL(r.request().url()).pathname
if(r.request().method()!=="GET"&&!p.endsWith("/preview"))writes++
return r.fulfill({json:p==="/api/auth/config"?{required:false}:p==="/api/servers"?hosts:p==="/api/filters/rules"?{rulesets:[{serverId:"1",rules:[{id:"r",community:"65001:1",communityName:"Сервис",gateway:"192.0.2.2",gatewayTunnelId:"",description:""}]}]}:p==="/api/uptime/speed-probes"?{probes:[]}:p.endsWith("/preview")?{interfaces:[],changes:[],changedCount:0,interfacesTotal:0}:p.endsWith("/ospf")?{interfaces:[],instances:[],neighbors:[],bfdSessions:[]}:{}})
return r.fulfill({json:p==="/api/auth/config"?{required:false}:p==="/api/servers"?hosts:p==="/api/filters/rules"?{rulesets:[{serverId:"1",rules:[{id:"r",community:"65001:1",communityName:"Сервис",gateway:"192.0.2.2",gatewayTunnelId:"",description:""}]}]}:p==="/api/uptime/speed-probes"?{probes:[]}:p.endsWith("/preview")?{serverId:1,serverName:"Роутер 1",pingWeight:60,unchangedCount:0,interfaces:[],changes:[],changedCount:0,interfacesTotal:0}:p==="/api/ospf/catalog"?{interfaces:[],instances:[],neighbors:[],bfdSessions:[],routes:[],failures:[]}:{}})
})
await page.goto("/route-optimizer")
await page.getByRole("button",{name:"BGP community (1)",exact:true}).click()