From 166debcc7d6e8d5bbdfc25deed8b56e553567b67 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 3 Apr 2023 15:10:01 +0200 Subject: [PATCH] add previous balance to unit tests --- frontend/src/components/GddTransactionList.spec.js | 9 +++++++-- .../components/Transactions/TransactionCreation.spec.js | 3 ++- .../components/Transactions/TransactionReceive.spec.js | 3 ++- .../src/components/Transactions/TransactionSend.spec.js | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/GddTransactionList.spec.js b/frontend/src/components/GddTransactionList.spec.js index 7473c11e0..b1cdf9eb9 100644 --- a/frontend/src/components/GddTransactionList.spec.js +++ b/frontend/src/components/GddTransactionList.spec.js @@ -93,8 +93,9 @@ describe('GddTransactionList', () => { { id: -1, typeId: 'DECAY', - amount: '-0.16778637075575395772595', - balance: '31.59320453982945549519405', + amount: '-0.16', + balance: '31.59', + previousBalance: '31.75', balanceDate: '2022-03-03T08:54:54', memo: '', linkedUser: null, @@ -110,6 +111,7 @@ describe('GddTransactionList', () => { typeId: 'SEND', amount: '1', balance: '31.76099091058520945292', + previousBalance: '30.76', balanceDate: '2022-02-28T13:55:47', memo: 'Um den Kessel schlingt den Reihn, Werft die Eingeweid‘ hinein. Kröte du, die Nacht und Tag Unterm kalten Steine lag,', @@ -129,6 +131,7 @@ describe('GddTransactionList', () => { typeId: 'RECEIVE', amount: '10', balance: '10', + previousBalance: '31.75', balanceDate: '2022-02-23T10:55:30', memo: 'Monatlanges Gift sog ein, In den Topf zuerst hinein… (William Shakespeare, Die Hexen aus Macbeth)', @@ -148,6 +151,7 @@ describe('GddTransactionList', () => { typeId: 'CREATION', amount: '1000', balance: '32.96482231613347376132', + previousBalance: '31.75', balanceDate: '2022-02-25T07:29:26', memo: 'Jammern hilft nichts, sondern ich kann selber meinen Teil dazu beitragen.', linkedUser: { @@ -414,6 +418,7 @@ describe('GddTransactionList', () => { return { amount: '3.14', balanceDate: '2021-04-29T17:26:40+00:00', + previousBalance: '31.75', decay: { decay: '-477.01', start: '2021-05-13T17:46:31.000Z', diff --git a/frontend/src/components/Transactions/TransactionCreation.spec.js b/frontend/src/components/Transactions/TransactionCreation.spec.js index be0713ecf..cec48cce9 100644 --- a/frontend/src/components/Transactions/TransactionCreation.spec.js +++ b/frontend/src/components/Transactions/TransactionCreation.spec.js @@ -13,7 +13,8 @@ const mocks = { const propsData = { amount: '12.45', - balance: '31.76099091058521', + balance: '31.76', + previousBalance: '19.31', balanceDate: '2022-02-28T13:55:47.000Z', decay: { decay: '-0.2038314055482643084', diff --git a/frontend/src/components/Transactions/TransactionReceive.spec.js b/frontend/src/components/Transactions/TransactionReceive.spec.js index 46cb57e06..76c7977d4 100644 --- a/frontend/src/components/Transactions/TransactionReceive.spec.js +++ b/frontend/src/components/Transactions/TransactionReceive.spec.js @@ -13,7 +13,8 @@ const mocks = { const propsData = { amount: '12.45', - balance: '31.76099091058521', + balance: '31.76', + previousBalance: '19.31', balanceDate: '2022-02-28T13:55:47.000Z', decay: { decay: '-0.2038314055482643084', diff --git a/frontend/src/components/Transactions/TransactionSend.spec.js b/frontend/src/components/Transactions/TransactionSend.spec.js index 410fcc733..662d9fd76 100644 --- a/frontend/src/components/Transactions/TransactionSend.spec.js +++ b/frontend/src/components/Transactions/TransactionSend.spec.js @@ -13,7 +13,8 @@ const mocks = { const propsData = { amount: '12.45', - balance: '31.76099091058521', + balance: '31.76', + previousBalance: '19.31', balanceDate: '2022-02-28T13:55:47.000Z', decay: { decay: '-0.2038314055482643084',