fix: validate saved plan confidence

This commit is contained in:
ik
2026-09-21 18:23:19 +07:00
parent b0421c11f5
commit f3eb54083f
3 changed files with 10 additions and 2 deletions
+6
View File
@@ -67,6 +67,11 @@ test("plan preserves a real zero confidence and bounds imported text", async ({
method: "Спиннинг",
retrieve: "равномерная",
oversized: "x".repeat(5000),
}, {
key: "/spots/vyunok-7450x7451",
waterbody: "Вьюнок",
coordinates: "7450:7451",
confidence: "999",
}])));
await page.reload();
@@ -74,6 +79,7 @@ test("plan preserves a real zero confidence and bounds imported text", async ({
const stored = await page.evaluate(() => JSON.parse(localStorage.getItem("rf4spotter:fishing-plan") || "[]"));
expect(stored[0].key.length).toBeLessThanOrEqual(512);
expect(stored[0].confidence).toBe("0");
expect(stored[1].confidence).toBe("");
expect(stored[0].oversized).toBeUndefined();
});