Tests for SendOverview send transaction steps

This commit is contained in:
elweyn 2021-12-16 12:11:16 +01:00 committed by ogerly
parent ada332e8a2
commit 52acec0820
2 changed files with 6 additions and 8 deletions

View File

@ -14,7 +14,7 @@ describe('SendOverview', () => {
const propsData = {
balance: 123.45,
GdtBalance: 1234.56,
transactions: [],
transactions: [{ balance: 0.1 }],
pending: true,
}
@ -45,13 +45,14 @@ describe('SendOverview', () => {
})
describe('transaction form', () => {
it('steps forward in the dialog', async () => {
await wrapper.findComponent({ name: 'TransactionForm' }).vm.$emit('set-transaction', {
beforeEach(async () => {
wrapper.findComponent({ name: 'TransactionForm' }).vm.$emit('set-transaction', {
email: 'user@example.org',
amount: 23.45,
memo: 'Make the best of it!',
})
await wrapper.vm.$nextTick()
})
it('steps forward in the dialog', () => {
expect(wrapper.findComponent({ name: 'TransactionConfirmation' }).exists()).toBe(true)
})
})

View File

@ -23,10 +23,7 @@
<div class="test-send_transaction_error">{{ $t('form.send_transaction_error') }}</div>
<hr />
<div
class="test-test-receiver-not-found"
v-if="errorResult === 'GraphQL error: recipiant not known'"
>
<div class="test-receiver-not-found" v-if="errorResult === 'recipiant not known'">
{{ $t('transaction.receiverNotFound') }}
</div>
<div v-else>({{ errorResult }})</div>