diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 3a12d2d11..a3aeb14a2 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -45,9 +45,11 @@ }, "error": { "change-password": "Fehler beim Ändern des Passworts", + "empty-transactionlist": "Es gab einen Fehler mit der Übermittlung der Anzahl deiner Transaktionen.", "error": "Fehler", "no-account": "Leider konnten wir keinen Account finden mit diesen Daten!", "no-email-verify": "Die Email wurde noch nicht bestätigt, bitte überprüfe deine Emails und klicke auf den Aktivierungslink!", + "no-transactionlist": "Es gab leider einen Fehler. Es wurden keine Transaktionen vom Server übermittelt", "session-expired": "Die Sitzung wurde aus Sicherheitsgründen beendet." }, "form": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 49f715717..5ccdfc63b 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -45,9 +45,11 @@ }, "error": { "change-password": "Error while changing password", + "empty-transactionlist": "There was an error with the transmission of the number of your transactions.", "error": "Error", "no-account": "Unfortunately we could not find an account to the given data!", "no-email-verify": "Your email is not activated yet, please check your emails and click the activation link!", + "no-transactionlist": "Unfortunately, there was an error. No transactions have been sent from the server.", "session-expired": "The session was closed for security reasons." }, "form": { diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js index faf1375fb..55f65bee6 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.spec.js @@ -36,9 +36,42 @@ describe('GddTransactionList', () => { expect(wrapper.find('div.gdd-transaction-list').exists()).toBeTruthy() }) + describe('no transactions from server', () => { + beforeEach(async () => { + await wrapper.setProps({ + transactions: false, + }) + }) + it('shows error no transaction list', () => { + expect(wrapper.find('div.test-no-transactionlist').text()).toContain( + 'error.no-transactionlist', + ) + }) + }) + describe('0 transactions from server', () => { + beforeEach(async () => { + await wrapper.setProps({ + transactions: [], + transactionCount: 0, + }) + }) + it('Transactions Array is empty, 0 transactions', () => { + expect(wrapper.find('div.test-empty-transactionlist').text()).toContain( + '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('transaction.nullTransactions') + it('renders text saying that there are error.empty-transactionlist ', () => { + expect(wrapper.find('div.gdd-transaction-list').text()).toContain( + 'error.empty-transactionlist', + ) + }) + it('renders text saying that there are no transaction.nullTransactions', () => { + expect(wrapper.find('div.gdd-transaction-list').text()).toContain( + 'transaction.nullTransactions', + ) }) }) diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue index 1e24c14d0..955a6adc1 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionList.vue @@ -1,6 +1,16 @@