mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test no transactions, test transaction is empty
This commit is contained in:
parent
0818ddcf66
commit
4cfd2206fe
@ -36,9 +36,31 @@ describe('GddTransactionList', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
describe('Prüfen wenn keine Transaktionen vom Server kommen', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
transactions: false,
|
||||
})
|
||||
})
|
||||
it('transactions array ist nicht da', () => {
|
||||
expect(wrapper.find('div.test-no-transactionlist').text()).toBe('error.no-transactionlist')
|
||||
})
|
||||
})
|
||||
describe('Prüfen wenn 0 Transaktionen vom Server kommen', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
transactions: [],
|
||||
transactionCount: 0,
|
||||
})
|
||||
})
|
||||
it('transactions ist leer, 0 Transaktionen', () => {
|
||||
expect(wrapper.find('div.test-empty-transactionlist').text()).toBe('error.empty-transactionlist')
|
||||
})
|
||||
})
|
||||
|
||||
describe('without any properties', () => {
|
||||
it('renders text saying that there are no transactions', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list').text()).toBe(
|
||||
expect(wrapper.find('div.gdd-transaction-list').text()).toContain(
|
||||
'error.empty-transactionlist transaction.nullTransactions',
|
||||
)
|
||||
})
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div class="gdd-transaction-list">
|
||||
<div class="list-group">
|
||||
<div v-if="!transactions" class="text-right">
|
||||
<div v-if="!transactions" class="test-no-transactionlist text-right">
|
||||
<b-icon icon="exclamation-triangle" class="mr-2" style="color: red"></b-icon>
|
||||
<small>
|
||||
{{ $t('error.no-transactionlist') }}
|
||||
</small>
|
||||
</div>
|
||||
<div v-if="!transactionCount" class="text-right">
|
||||
<div v-if="!transactionCount" class="test-empty-transactionlist text-right">
|
||||
<b-icon icon="exclamation-triangle" class="mr-2" style="color: red"></b-icon>
|
||||
<small>{{ $t('error.empty-transactionlist') }}</small>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user