From 325ac536cd1cb6ac43522bce0c062f7c2393eacc Mon Sep 17 00:00:00 2001 From: cliffhall Date: Sat, 15 Aug 2026 23:59:31 -0400 Subject: [PATCH] test(web): resolve the null defaults from the schema, not a seeded value Copilot review: seeding `{ b: null }` / `{ cfg: null }` meant the schema's `default: null` was never resolved, so a regression that dropped null defaults would have left both #1885 tests green while claiming to pin that path. Render the harness unseeded instead, which is also how the reporter's form arrived. Signed-off-by: cliffhall --- .../components/groups/SchemaForm/SchemaForm.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/clients/web/src/components/groups/SchemaForm/SchemaForm.test.tsx b/clients/web/src/components/groups/SchemaForm/SchemaForm.test.tsx index 908bc33d..9e573a9c 100644 --- a/clients/web/src/components/groups/SchemaForm/SchemaForm.test.tsx +++ b/clients/web/src/components/groups/SchemaForm/SchemaForm.test.tsx @@ -1602,9 +1602,9 @@ describe("JSON editor escaping (#1853, #1856, #1885)", () => { }, required: ["a"], }; - renderWithMantine( - , - ); + // No seeded value: the `null` has to come from the schema's `default`, + // which is where the reporter's did. + renderWithMantine(); const b = screen.getByLabelText(/^B$/) as HTMLInputElement; expect(b.tagName).toBe("INPUT"); @@ -1632,9 +1632,9 @@ describe("JSON editor escaping (#1853, #1856, #1885)", () => { }, }, }; - renderWithMantine( - , - ); + // Again unseeded, so the editor's opening `null` is the schema default + // being resolved — the state the reporter's recording starts from. + renderWithMantine(); const jsonInput = screen.getByLabelText(/Cfg/) as HTMLTextAreaElement; expect(jsonInput.value).toBe("null");