mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add tests for search
This commit is contained in:
parent
8ae0d70153
commit
049d8d2d1c
@ -258,5 +258,26 @@ describe('Creation', () => {
|
||||
expect(toastErrorMock).toBeCalledWith('Ouch')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
describe('set value in test-input-criteria', () => {
|
||||
beforeEach(async () => {
|
||||
wrapper = Wrapper()
|
||||
await wrapper.find('.test-input-criteria').setValue('some value')
|
||||
})
|
||||
|
||||
it('check value is setting', () => {
|
||||
expect(wrapper.find('.test-input-criteria').element.value).toBe('some value')
|
||||
})
|
||||
|
||||
describe('click test-click-clear-criteria and clear value', () => {
|
||||
beforeEach(() => {
|
||||
wrapper.find('.test-click-clear-criteria').trigger('click')
|
||||
})
|
||||
it('is value remove', () => {
|
||||
expect(wrapper.find('.test-input-criteria').element.value).toBe('')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -6,12 +6,12 @@
|
||||
<b-input-group>
|
||||
<b-form-input
|
||||
type="text"
|
||||
class="test-input-criteria"
|
||||
v-model="criteria"
|
||||
:placeholder="$t('user_search')"
|
||||
@input="getUsers"
|
||||
></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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user