fix: validate saved plan confidence
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user