mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
output error output from graphql that no recipient was found in ordinary text
This commit is contained in:
parent
508b1519ee
commit
9ed7c9d71e
@ -116,18 +116,22 @@ describe('SendOverview', () => {
|
||||
describe('transaction is confirmed and server response is error', () => {
|
||||
beforeEach(async () => {
|
||||
jest.clearAllMocks()
|
||||
sendMock.mockRejectedValue({ message: 'receiver not found' })
|
||||
sendMock.mockRejectedValue({ message: 'recipiant not known' })
|
||||
await wrapper
|
||||
.findComponent({ name: 'TransactionConfirmation' })
|
||||
.vm.$emit('send-transaction')
|
||||
})
|
||||
|
||||
it('shows the error page', () => {
|
||||
expect(wrapper.find('div.card-body').text()).toContain('form.send_transaction_error')
|
||||
expect(wrapper.find('.test-send_transaction_error').text()).toContain(
|
||||
'form.send_transaction_error',
|
||||
)
|
||||
})
|
||||
|
||||
it('shows recipient not found', () => {
|
||||
expect(wrapper.text()).toContain('transaction.receiverNotFound')
|
||||
expect(wrapper.find('.test-receiver-not-found').text()).toContain(
|
||||
'transaction.receiverNotFound',
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -20,10 +20,13 @@
|
||||
<div>{{ $t('form.sorry') }}</div>
|
||||
<hr />
|
||||
|
||||
<div>{{ $t('form.send_transaction_error') }}</div>
|
||||
<div class="test-send_transaction_error">{{ $t('form.send_transaction_error') }}</div>
|
||||
|
||||
<hr />
|
||||
<div v-if="errorResult === 'receiver not found'">
|
||||
<div
|
||||
class="test-test-receiver-not-found"
|
||||
v-if="errorResult === 'GraphQL error: recipiant not known'"
|
||||
>
|
||||
{{ $t('transaction.receiverNotFound') }}
|
||||
</div>
|
||||
<div v-else>({{ errorResult }})</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user