feat: share local fishing plans
CI / backend-and-migrations (push) Waiting to run
CI / astro-build (push) Waiting to run
CI / dependency-audit (push) Waiting to run
CI / compose-e2e (push) Waiting to run

This commit is contained in:
ik
2026-09-20 20:17:08 +07:00
parent 5335255c5c
commit 9569f4768a
4 changed files with 31 additions and 3 deletions
+9
View File
@@ -17,3 +17,12 @@ test("saved spot appears on the plan page and can be removed or cleared", async
await page.getByRole("button", { name: "Очистить план" }).click();
await expect(page.getByRole("heading", { name: "План пока пуст" })).toBeVisible();
});
test("plan can be restored from a shareable URL", async ({ page }) => {
const shared = encodeURIComponent(JSON.stringify([{ key: "/spots/vyunok-6331x6332", waterbody: "Вьюнок", coordinates: "6331:6332", baits: "Тестовая приманка", freshness: "", confidence: "" }]));
await page.goto(`/plan?plan=${shared}`);
await expect(page.getByRole("heading", { name: "Вьюнок" })).toBeVisible();
await expect(page.getByRole("button", { name: "Поделиться планом" })).toBeVisible();
await expect(page.getByText("1 из 5 точек")).toBeVisible();
});