test value from criteria, user search

This commit is contained in:
ogerly 2022-02-02 19:08:24 +01:00
parent 80df871326
commit 153de46e22
2 changed files with 28 additions and 1 deletions

View File

@ -80,5 +80,31 @@ describe('UserSearch', () => {
expect(toastErrorMock).toBeCalledWith('Ouch')
})
})
describe('set value in input search form input', () => {
beforeEach( async () => {
await wrapper.find('.test-input-criteria').setValue('some value')
})
it('sets rangeMax to 200', () => {
// await wrapper.find('#test-click-criteria').trigger('click')
expect(wrapper.find('.test-input-criteria').element.value).toBe('some value')
})
describe('set value in input search form input', () => {
beforeEach(() => {
wrapper.find('.test-click-clear-criteria').trigger('click')
})
it('sets rangeMax to 200', () => {
expect(wrapper.find('.test-input-criteria').element.value).toBe('')
})
})
})
})
})

View File

@ -11,11 +11,12 @@
<b-input-group>
<b-form-input
type="text"
class="test-input-criteria"
v-model="criteria"
:placeholder="$t('user_search')"
></b-form-input>
<b-input-group-append @click="criteria = ''">
<b-input-group-append class="test-click-clear-criteria" @click="criteria = ''">
<b-input-group-text>
<b-icon icon="x" />
</b-input-group-text>