taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 5754f00399d923a605619b3ee6ae84c11cea25f6
parent e0d4f7e4af81686ff719448b86512accc89d7ac3
Author: Florian Dold <florian@dold.me>
Date:   Fri, 30 Jun 2023 16:44:46 +0200

harness: check balance in basic payment test

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-payment.ts | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-payment.ts b/packages/taler-harness/src/integrationtests/test-payment.ts @@ -17,12 +17,14 @@ /** * Imports. */ +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState } from "../harness/harness.js"; import { createSimpleTestkudosEnvironment, withdrawViaBank, makeTestPayment, } from "../harness/helpers.js"; +import { j2s } from "@gnu-taler/taler-util"; /** * Run test for basic, bank-integrated withdrawal and payment. @@ -68,6 +70,12 @@ export async function runPaymentTest(t: GlobalTestState) { await makeTestPayment(t, { wallet, merchant, order: order3 }); await wallet.runUntilDone(); + + const bal = await wallet.client.call(WalletApiOperation.GetBalances, {}); + console.log(`balance after 3 payments: ${j2s(bal)}`); + t.assertAmountEquals(bal.balances[0].available, "TESTKUDOS:3.8"); + t.assertAmountEquals(bal.balances[0].pendingIncoming, "TESTKUDOS:0"); + t.assertAmountEquals(bal.balances[0].pendingOutgoing, "TESTKUDOS:0"); } runPaymentTest.suites = ["wallet"];