From e81ae0f3e5a510424076b611ac32385057cbdaed Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 21 Apr 2023 22:02:34 +0200 Subject: wallet-harness: make sure events are not lost in deposit test --- .../taler-harness/src/integrationtests/test-deposit.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'packages/taler-harness/src/integrationtests/test-deposit.ts') diff --git a/packages/taler-harness/src/integrationtests/test-deposit.ts b/packages/taler-harness/src/integrationtests/test-deposit.ts index 1b46daf5f..6aa086107 100644 --- a/packages/taler-harness/src/integrationtests/test-deposit.ts +++ b/packages/taler-harness/src/integrationtests/test-deposit.ts @@ -45,9 +45,17 @@ export async function runDepositTest(t: GlobalTestState) { await withdrawalResult.withdrawalFinishedCond; - const depositDone = await walletClient.waitForNotificationCond( + const dgIdResp = await walletClient.client.call( + WalletApiOperation.GenerateDepositGroupTxId, + {}, + ); + + const depositTxId = dgIdResp.transactionId; + + const depositDone = walletClient.waitForNotificationCond( (n) => n.type == NotificationType.TransactionStateTransition && + n.transactionId == depositTxId && n.newTxState == TransactionState.Done, ); @@ -56,9 +64,14 @@ export async function runDepositTest(t: GlobalTestState) { { amount: "TESTKUDOS:10", depositPaytoUri: getPayto("foo"), + transactionId: depositTxId, }, ); + t.assertDeepEqual(depositGroupResult.transactionId, depositTxId); + + await depositDone; + const transactions = await walletClient.client.call( WalletApiOperation.GetTransactions, {}, -- cgit v1.2.3