Update zod to 4 (#24791)
CI / AMD64 Build (push) Canceled after 0s
CI / AMD64 Smoke Test (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s

* fix races in ui settings import e2e tests

confirmImport clicked any button named "Import", so when the file parse was slow it hit the Import Settings button before the dialog opened and the page never reloaded. The click is now scoped to the dialog. The legacy layouts test also wrote naturalAspectLayout after the view had already read it, so it reloads the view after the write.

* 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:
Josh Hawkins
2026-10-25 20:44:39 -06:00
committed by GitHub
parent 7d4b87946e
commit 9fec1c76b5
9 changed files with 143 additions and 46 deletions
@@ -121,9 +121,14 @@ async function confirmImport(page: Page) {
// route change, so #pageRoot is already present and waiting for it
// alone can race the navigation. Wait for the "load" event first so
// the evaluate() calls below run against the post-reload document.
// scoped to the dialog: until it opens, a page-wide "Import" match is the
// Import Settings button, which only reopens the file chooser
await Promise.all([
page.waitForEvent("load"),
page.getByRole("button", { name: "Import" }).click(),
page
.getByRole("dialog")
.getByRole("button", { name: "Import", exact: true })
.click(),
]);
await page.waitForSelector("#pageRoot");
}
@@ -270,6 +275,9 @@ test.describe("UI settings import/export @medium", () => {
// naturalAspectLayout preference must not override that.
await frigateApp.goto("/settings?page=uiSettings");
await writeIdb(frigateApp.page, { "naturalAspectLayout:admin": true });
// the view reads the setting once on mount, so load it again after the
// write
await frigateApp.goto("/settings?page=uiSettings");
await chooseImportFile(
frigateApp.page,