diff options
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts index a13095883..3ec2a3bcd 100644 --- a/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts +++ b/packages/taler-harness/src/integrationtests/test-withdrawal-bank-integrated.ts @@ -46,7 +46,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { "TESTKUDOS:10", ); - // Hand it to the wallet + t.logStep("Hand it to the wallet") const r1 = await walletClient.client.call( WalletApiOperation.GetWithdrawalDetailsForUri, @@ -55,7 +55,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { }, ); - // Withdraw + t.logStep("Withdraw") const r2 = await walletClient.client.call( WalletApiOperation.AcceptBankIntegratedWithdrawal, @@ -65,6 +65,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { }, ); + t.logStep("wait confirmed") const withdrawalBankConfirmedCond = walletClient.waitForNotificationCond( (x) => { return ( @@ -76,6 +77,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { }, ); + t.logStep("wait finished") const withdrawalFinishedCond = walletClient.waitForNotificationCond((x) => { return ( x.type === NotificationType.TransactionStateTransition && @@ -84,6 +86,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { ); }); + t.logStep("wait withdraw coins") const withdrawalReserveReadyCond = walletClient.waitForNotificationCond( (x) => { return ( @@ -95,7 +98,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { }, ); - // Do it twice to check idempotency + t.logStep("Do it twice to check idempotency") const r3 = await walletClient.client.call( WalletApiOperation.AcceptBankIntegratedWithdrawal, { @@ -104,9 +107,10 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { }, ); + t.logStep("stop wirewatch") await exchange.stopWirewatch(); - // Check status before withdrawal is confirmed by bank. + t.logStep("Check status before withdrawal is confirmed by bank.") { const txn = await walletClient.client.call( WalletApiOperation.GetTransactions, @@ -122,7 +126,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { t.assertTrue(tx0.withdrawalDetails.reserveIsReady === false); } - // Confirm it + t.logStep("Confirm it") await bankClient.confirmWithdrawalOperation(user.username, { withdrawalOperationId: wop.withdrawal_id, @@ -132,6 +136,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { // Check status after withdrawal is confirmed by bank, // but before funds are wired to the exchange. + t.logStep("Check status after withdrawal") { const txn = await walletClient.client.call( WalletApiOperation.GetTransactions, @@ -147,11 +152,13 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { t.assertTrue(tx0.withdrawalDetails.reserveIsReady === false); } + t.logStep("start wirewatch") await exchange.startWirewatch(); + t.logStep("wait reserve") await withdrawalReserveReadyCond; - // Check status after funds were wired. + t.logStep("Check status after funds were wired.") { const txn = await walletClient.client.call( WalletApiOperation.GetTransactions, @@ -169,7 +176,7 @@ export async function runWithdrawalBankIntegratedTest(t: GlobalTestState) { await withdrawalFinishedCond; - // Check balance + t.logStep("Check balance") const balResp = await walletClient.client.call( WalletApiOperation.GetBalances, |