mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix test for InputUsername.spec.js
This commit is contained in:
parent
94b62293fc
commit
d241eb5249
@ -29,17 +29,18 @@ describe('UserName Form', () => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
it('renders the component', () => {
|
||||
expect(wrapper.find('div.input-username').exists()).toBeTruthy()
|
||||
expect(wrapper.find('[data-test="username"]').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
describe('currentValue', () => {
|
||||
beforeEach(async () => {
|
||||
wrapper = Wrapper()
|
||||
|
||||
await wrapper.setProps({ value: 'petra' })
|
||||
await wrapper.find('div.input-username.input[type="text"]').setValue('petra swastiska')
|
||||
await wrapper.find('[data-test="username"]').setValue('petra')
|
||||
})
|
||||
it('emits input event with the current value', () => {
|
||||
expect(wrapper.emitted('input')).toEqual([['petra swastiska']])
|
||||
expect(wrapper.emitted('input')).toEqual([['petra']])
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
type="text"
|
||||
:state="validated ? valid : false"
|
||||
autocomplete="off"
|
||||
data-test="username"
|
||||
></b-form-input>
|
||||
<b-input-group-append>
|
||||
<b-button
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user