fix(backups): продолжать наблюдение без повторного создания

This commit is contained in:
Denozordec committed 2026-10-01 15:58:47 +07:00
1 parent 4aee2a34f1
commit 714af7e872
9 files changed
+265 -74

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { expect, type Page } from "@playwright/test"
import { backup } from "./backups"
export async function openBackup(page: Page) {
await page.goto("/backups"); await page.getByRole("button", { name: "Новый бэкап", exact: true }).first().click()
const dialog = page.getByRole("dialog")
await dialog.getByRole("checkbox", { name: /Выбрать Роутер/ }).check()
await dialog.getByRole("button", { name: "Далее", exact: true }).click()
await dialog.getByRole("textbox", { name: "Заметка резервной копии", exact: true }).fill("manual")
await dialog.getByRole("button", { name: "Далее", exact: true }).click()
await expect(dialog.getByRole("button", { name: /Снять бэкап/ })).toBeEnabled()
return dialog
}
export function backupJob(id: string, patch: Record<string, unknown> = {}) { return { id, status: "done", serverIds: ["1"], notes: "manual", total: 1, completed: 1, created: [backup], failures: [], requestedAt: "2026-10-01T00:00:00Z", finishedAt: "2026-10-01T00:01:00Z", ...patch } }
export function backupAck(id: string) { return { jobId: id, status: "queued", serverIds: ["1"], total: 1, completed: 0 } }