feat(mcp): подготовить сервер и доступ к приёмке

This commit is contained in:
Denozordec committed 2026-11-03 03:12:03 +07:00
commit bf3d50e1ff
3835 files changed
+537122

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import { test, expect } from "@playwright/test"
test("GRE: mock-пулы только для просмотра без фиктивного создания", async ({ page }) => {
let writes = 0
await page.route("**/health", r => r.fulfill({ json: { ok: true } }))
await page.route("**/api/**", r => {
if (r.request().method() !== "GET") writes++
return r.fulfill({ json: new URL(r.request().url()).pathname === "/api/auth/config" ? { required: false } : {} })
})
await page.goto("/settings")
await page.getByRole("button", { name: "Моковые", exact: true }).click()
await page.getByRole("link", { name: /^GRE/ }).click()
await expect(page.getByRole("group", { name: "Свежесть GRE" })).toContainText("не получены с RouterOS")
await page.getByRole("button", { name: "IP-пулы", exact: true }).click()
await expect(page.getByText("Моковый каталог · только просмотр", { exact: true })).toBeVisible()
expect(await page.locator("tr[data-row-id]").count()).toBeGreaterThan(0)
await expect(page.getByRole("button", { name: "Добавить пул", exact: true })).toHaveCount(0)
await expect(page.getByRole("button", { name: "Создать пул", exact: true })).toHaveCount(0)
await expect(page.getByRole("menuitem", { name: "Удалить пул", exact: true })).toHaveCount(0)
expect(writes).toBe(0)
})