fix: clarify empty fishing plan shares
This commit is contained in:
@@ -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("В ссылке нет сохранённых точек");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user