diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index bd3bd8e4c..40a6011d5 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -100,6 +100,7 @@ export default { }) .catch((error) => { this.pending = true + this.transactionCount = -1 this.$toasted.global.error(error.message) // what to do when loading balance fails? }) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js index 55f65bee6..b116de9e8 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js @@ -56,16 +56,20 @@ describe('GddTransactionList', () => { }) }) it('Transactions Array is empty, 0 transactions', () => { - expect(wrapper.find('div.test-empty-transactionlist').text()).toContain( - 'error.empty-transactionlist', - ) + expect(wrapper.find('div.test-empty-transactionlist').exists()).toBe(false) }) }) describe('without any properties', () => { + beforeEach(async () => { + await wrapper.setProps({ + transactions: [], + transactionCount: -1, + }) + }) it('renders text saying that there are error.empty-transactionlist ', () => { expect(wrapper.find('div.gdd-transaction-list').text()).toContain( - 'error.empty-transactionlist', + 'transaction.nullTransactions', ) }) it('renders text saying that there are no transaction.nullTransactions', () => { diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 955a6adc1..f6c046fe6 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -7,7 +7,7 @@ {{ $t('error.no-transactionlist') }} -
+
{{ $t('error.empty-transactionlist') }}
@@ -134,7 +134,7 @@ :per-page="pageSize" :total-rows="transactionCount" > -
+
{{ $t('transaction.nullTransactions') }}