From 4e805d182ae559ba5cb09b7f08bc5739fc0347dc Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 20 Apr 2026 18:59:17 +0200 Subject: [PATCH] test(frontend): update form primitive tests for admin input usage --- frontend/src/components/input/FormField.test.ts | 3 +-- frontend/src/components/input/FormSelect.test.ts | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/input/FormField.test.ts b/frontend/src/components/input/FormField.test.ts index 9e411e91c..5c046c389 100644 --- a/frontend/src/components/input/FormField.test.ts +++ b/frontend/src/components/input/FormField.test.ts @@ -233,8 +233,7 @@ describe('FormField', () => { }, }) const label = wrapper.find('label.two-col') - // for would point to a different id than the slotted control generates, - // so omit it entirely and rely on the label wrapping the control. + // for="" would mismatch the slotted control's id; rely on the label wrapping instead. expect(label.attributes('for')).toBeUndefined() expect(label.find('input').exists()).toBe(true) }) diff --git a/frontend/src/components/input/FormSelect.test.ts b/frontend/src/components/input/FormSelect.test.ts index 6bb43406d..cc7b26299 100644 --- a/frontend/src/components/input/FormSelect.test.ts +++ b/frontend/src/components/input/FormSelect.test.ts @@ -155,9 +155,7 @@ describe('FormSelect', () => { }, }) const select = wrapper.find('select') - // Without an explicit value binding, the native select defaults to the - // first option. If the component forced :value="undefined" that default - // would be broken. + // Forcing :value="undefined" would break the native default-to-first-option behavior. expect((select.element as HTMLSelectElement).value).toBe('') })