mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
reset transaction data after success from server
This commit is contained in:
parent
421ae60507
commit
31e07e70ce
@ -200,7 +200,7 @@ describe('GddSend', () => {
|
|||||||
expect(wrapper.find('button[type="reset"]').text()).toBe('form.reset')
|
expect(wrapper.find('button[type="reset"]').text()).toBe('form.reset')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('clears all fields on click and emits set-transaction', async () => {
|
it('clears all fields on click', async () => {
|
||||||
await wrapper.find('#input-group-1').find('input').setValue('someone@watches.tv')
|
await wrapper.find('#input-group-1').find('input').setValue('someone@watches.tv')
|
||||||
await wrapper.find('#input-group-2').find('input').setValue('87.23')
|
await wrapper.find('#input-group-2').find('input').setValue('87.23')
|
||||||
await wrapper.find('#input-group-3').find('textarea').setValue('Long enough')
|
await wrapper.find('#input-group-3').find('textarea').setValue('Long enough')
|
||||||
@ -213,16 +213,6 @@ describe('GddSend', () => {
|
|||||||
expect(wrapper.vm.form.email).toBe('')
|
expect(wrapper.vm.form.email).toBe('')
|
||||||
expect(wrapper.vm.form.amount).toBe('')
|
expect(wrapper.vm.form.amount).toBe('')
|
||||||
expect(wrapper.vm.form.memo).toBe('')
|
expect(wrapper.vm.form.memo).toBe('')
|
||||||
expect(wrapper.emitted('set-transaction')).toEqual([
|
|
||||||
[
|
|
||||||
{
|
|
||||||
selected: 'send',
|
|
||||||
email: '',
|
|
||||||
amount: 0,
|
|
||||||
memo: '',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
])
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -192,12 +192,6 @@ export default {
|
|||||||
this.form.email = ''
|
this.form.email = ''
|
||||||
this.form.amount = ''
|
this.form.amount = ''
|
||||||
this.form.memo = ''
|
this.form.memo = ''
|
||||||
this.$emit('set-transaction', {
|
|
||||||
selected: this.selected,
|
|
||||||
email: '',
|
|
||||||
amount: 0,
|
|
||||||
memo: '',
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
normalizeAmount(isValid) {
|
normalizeAmount(isValid) {
|
||||||
this.amountFocused = false
|
this.amountFocused = false
|
||||||
|
|||||||
@ -129,6 +129,7 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
this.error = false
|
this.error = false
|
||||||
this.updateTransactions({})
|
this.updateTransactions({})
|
||||||
|
this.transactionData = { ...EMPTY_TRANSACTION_DATA }
|
||||||
this.currentTransactionStep = TRANSACTION_STEPS.transactionResultSendSuccess
|
this.currentTransactionStep = TRANSACTION_STEPS.transactionResultSendSuccess
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user