fix: clarify empty fishing plan shares

This commit is contained in:
ik
2026-09-21 18:17:36 +07:00
parent d32a1973b2
commit 99ca887f77
3 changed files with 24 additions and 3 deletions
+13
View File
@@ -94,3 +94,16 @@ test("plan import deduplicates the same point before applying the five-item cap"
"/spots/vyunok-7450x7451",
]);
});
test("plan explains empty and malformed share states", async ({ page }) => {
await page.goto("/plan");
await page.getByRole("button", { name: "Поделиться планом" }).click();
await expect(page.locator("[data-plan-share-status]")).toHaveText("Сначала добавьте точку в план");
await page.goto("/plan?plan=not-json");
await expect(page.locator("[data-plan-share-status]")).toHaveText("Ссылка плана не распознана");
const emptyPlan = encodeURIComponent(JSON.stringify([]));
await page.goto(`/plan?plan=${emptyPlan}`);
await expect(page.locator("[data-plan-share-status]")).toHaveText("В ссылке нет сохранённых точек");
});