mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix tests
This commit is contained in:
parent
07dc5cf5d4
commit
4f0a78022a
@ -12,6 +12,7 @@ describe('ContributionForm', () => {
|
||||
date: '',
|
||||
memo: '',
|
||||
amount: '',
|
||||
hours: 0,
|
||||
},
|
||||
isThisMonth: true,
|
||||
minimalDate: new Date(),
|
||||
@ -375,6 +376,7 @@ describe('ContributionForm', () => {
|
||||
date: now,
|
||||
memo: 'Mein Beitrag zur Gemeinschaft für diesen Monat ...',
|
||||
amount: '200',
|
||||
hours: 0,
|
||||
},
|
||||
]),
|
||||
]),
|
||||
|
||||
@ -109,7 +109,7 @@ export default {
|
||||
this.form.id = null
|
||||
this.form.date = ''
|
||||
this.form.memo = ''
|
||||
this.form.hours = null
|
||||
this.form.hours = 0
|
||||
this.form.amount = ''
|
||||
},
|
||||
},
|
||||
|
||||
@ -74,7 +74,7 @@ describe('InputHour', () => {
|
||||
it('emits input with new value', async () => {
|
||||
await wrapper.find('input').setValue('12')
|
||||
expect(wrapper.emitted('input')).toBeTruthy()
|
||||
expect(wrapper.emitted('input')).toEqual([['12']])
|
||||
expect(wrapper.emitted('input')).toEqual([[12]])
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
currentValue() {
|
||||
this.$emit('input', isNaN(Number(this.currentValue)) ? 0 : Number(this.currentValue))
|
||||
this.$emit('input', Number(this.currentValue))
|
||||
},
|
||||
value() {
|
||||
if (this.value !== this.currentValue) this.currentValue = this.value
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user