test(frontend): update form primitive tests for admin input usage

This commit is contained in:
kolaente
2026-04-20 18:59:17 +02:00
committed by kolaente
parent f90ebbf0f4
commit 4e805d182a
2 changed files with 2 additions and 5 deletions

View File

@@ -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)
})

View File

@@ -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('')
})