This commit is contained in:
Moriz Wahl 2021-07-19 12:09:27 +02:00
parent 48d2d4b527
commit 72073a40ff
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,7 @@ describe('AccountOverview', () => {
describe('transaction is confirmed and server response is error', () => { describe('transaction is confirmed and server response is error', () => {
beforeEach(async () => { beforeEach(async () => {
jest.clearAllMocks() jest.clearAllMocks()
sendMock.mockReturnValue({ success: false }) sendMock.mockReturnValue({ success: false, result: { message: 'receiver not found' } })
await wrapper await wrapper
.findComponent({ name: 'TransactionConfirmation' }) .findComponent({ name: 'TransactionConfirmation' })
.vm.$emit('send-transaction') .vm.$emit('send-transaction')
@ -121,6 +121,10 @@ describe('AccountOverview', () => {
it('shows the error page', () => { it('shows the error page', () => {
expect(wrapper.find('div.card-body').text()).toContain('form.send_transaction_error') expect(wrapper.find('div.card-body').text()).toContain('form.send_transaction_error')
}) })
it('shows recipient not found', () => {
expect(wrapper.text()).toContain('transaction.receiverNotFound')
})
}) })
}) })
}) })

View File

@ -75,7 +75,7 @@ export default {
timestamp: Date.now(), timestamp: Date.now(),
transactionData: { ...EMPTY_TRANSACTION_DATA }, transactionData: { ...EMPTY_TRANSACTION_DATA },
error: false, error: false,
errorResult: false, errorResult: '',
currentTransactionStep: 0, currentTransactionStep: 0,
loading: false, loading: false,
} }