feat: share local fishing plans
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user