mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-22 02:30:56 -05:00
test(frontend): update form primitive tests for admin input usage
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
||||
@@ -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('')
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user