mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-26 16:34:43 +03:00
update zod to 4.6.7
zod 4 types the input of z.coerce.number() as unknown, so the zone, camera wizard, and classification edit forms pass number to keep their field types. The ONVIF port error showed zod's built-in English text, which zod 4 rewords, so it now uses a translated message. New e2e tests cover zone inertia validation and camera wizard step 1 validation.
This commit is contained in:
@@ -248,4 +248,37 @@ test.describe("zone rename and delete @medium @mobile", () => {
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
test("inertia below 1 blocks saving and a valid value saves as a number", async ({
|
||||
frigateApp,
|
||||
}) => {
|
||||
const requests = await installRoutes(frigateApp.page);
|
||||
await frigateApp.goto(SETTINGS_URL);
|
||||
|
||||
await openZoneAction(frigateApp.page, frigateApp.isMobile, "Edit");
|
||||
const inertia = frigateApp.page.getByRole("textbox", {
|
||||
name: "Inertia",
|
||||
exact: true,
|
||||
});
|
||||
const save = frigateApp.page.getByRole("button", { name: "Save" });
|
||||
|
||||
await inertia.fill("0");
|
||||
await expect(
|
||||
frigateApp.page.getByText("Inertia must be above 0."),
|
||||
).toBeVisible();
|
||||
await expect(save).toBeDisabled();
|
||||
|
||||
await inertia.fill("5");
|
||||
await expect(
|
||||
frigateApp.page.getByText("Inertia must be above 0."),
|
||||
).toBeHidden();
|
||||
await save.click();
|
||||
|
||||
await expect.poll(() => requests.length).toBe(1);
|
||||
expect(requests[0].body).toMatchObject({
|
||||
config_data: {
|
||||
cameras: { front_door: { zones: { driveway: { inertia: 5 } } } },
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user