feat: add method and risk to fishing plans

This commit is contained in:
ik
2026-09-21 07:34:32 +07:00
parent 36d704d854
commit 3b4557b549
8 changed files with 18 additions and 9 deletions
+3 -1
View File
@@ -2,11 +2,13 @@ import { expect, test } from "@playwright/test";
test("saved spot appears on the plan page and can be removed or cleared", async ({ page }) => {
await page.goto("/spots/vyunok-6331x6332");
await page.evaluate(() => localStorage.setItem("rf4spotter:fishing-plan", JSON.stringify([{ key: "/spots/vyunok-6331x6332", waterbody: "Вьюнок", coordinates: "6331:6332", baits: "Тестовая приманка", freshness: "2026-09-20T12:55:11.236309Z", confidence: "24" }])));
await page.evaluate(() => localStorage.setItem("rf4spotter:fishing-plan", JSON.stringify([{ key: "/spots/vyunok-6331x6332", waterbody: "Вьюнок", coordinates: "6331:6332", baits: "Тестовая приманка", method: "Спиннинг", retrieve: "равномерная", risk: "Подтверждено", freshness: "2026-09-20T12:55:11.236309Z", confidence: "24" }])));
await page.goto("/plan");
await expect(page.getByRole("heading", { name: "Вьюнок" })).toBeVisible();
await expect(page.getByText("6331:6332")).toBeVisible();
await expect(page.getByText("Спиннинг · равномерная")).toBeVisible();
await expect(page.getByText(/Риск: Подтверждено/)).toBeVisible();
await expect(page.getByText("1 из 5 точек")).toBeVisible();
await page.getByRole("button", { name: "Убрать" }).click();
await expect(page.getByRole("heading", { name: "План пока пуст" })).toBeVisible();