import { expect, test } from "@playwright/test"; test("spot can be saved to a five-item local fishing plan and survives reload", async ({ page }) => { await page.goto("/spots/vyunok-6331x6332"); await page.evaluate(() => localStorage.removeItem("rf4spotter:fishing-plan")); await page.reload(); const save = page.getByRole("button", { name: "Сохранить в план" }); await expect(save).toHaveAttribute("aria-pressed", "false"); await save.click(); await expect(page.getByRole("button", { name: "В плане" })).toHaveAttribute("aria-pressed", "true"); await expect(page.getByText("Добавлено в план")).toBeVisible(); await page.reload(); await expect(page.getByRole("button", { name: "В плане" })).toHaveAttribute("aria-pressed", "true"); await page.getByRole("button", { name: "В плане" }).click(); await expect(page.getByRole("button", { name: "Сохранить в план" })).toHaveAttribute("aria-pressed", "false"); });