diff options
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-refund.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund.ts | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-refund.ts b/packages/taler-harness/src/integrationtests/test-refund.ts index aa245803d..999a9b621 100644 --- a/packages/taler-harness/src/integrationtests/test-refund.ts +++ b/packages/taler-harness/src/integrationtests/test-refund.ts @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - (C) 2020 Taler Systems S.A. + (C) 2020-2024 Taler Systems S.A. GNU Taler is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -19,7 +19,6 @@ */ import { Duration, - durationFromSpec, j2s, MerchantApiClient, NotificationType, @@ -33,9 +32,6 @@ import { withdrawViaBankV2, } from "../harness/helpers.js"; -/** - * Run test for basic, bank-integrated withdrawal. - */ export async function runRefundTest(t: GlobalTestState) { // Set up test environment @@ -67,7 +63,7 @@ export async function runRefundTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }, refund_delay: Duration.toTalerProtocolDuration( - durationFromSpec({ minutes: 5 }), + Duration.fromSpec({ minutes: 5 }), ), }); @@ -84,7 +80,7 @@ export async function runRefundTest(t: GlobalTestState) { }); await wallet.client.call(WalletApiOperation.ConfirmPay, { - proposalId: r1.proposalId, + transactionId: r1.transactionId, }); // Check if payment was successful. @@ -115,7 +111,6 @@ export async function runRefundTest(t: GlobalTestState) { console.log(ref); { - // FIXME! const refundFinishedCond = wallet.waitForNotificationCond( (x) => x.type === NotificationType.TransactionStateTransition && @@ -125,7 +120,6 @@ export async function runRefundTest(t: GlobalTestState) { await wallet.client.call(WalletApiOperation.StartRefundQuery, { transactionId: r1.transactionId, }); - await refundFinishedCond; } @@ -150,21 +144,6 @@ export async function runRefundTest(t: GlobalTestState) { tx.type === TransactionType.Payment && tx.refundPending === undefined, ); } - - // FIXME: Test is incomplete without this! - // { - // const refundQueriedCond = wallet.waitForNotificationCond( - // (x) => x.type === NotificationType.RefundQueried, - // ); - // const r3 = await wallet.client.call( - // WalletApiOperation.ApplyRefundFromPurchaseId, - // { - // purchaseId: r1.proposalId, - // }, - // ); - // console.log(r3); - // await refundQueriedCond; - // } } runRefundTest.suites = ["wallet"]; |