diff options
author | Florian Dold <florian@dold.me> | 2024-08-21 19:23:48 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-08-21 19:23:48 +0200 |
commit | 0b25d5d010c2b66628035f267353bec0721e3bf0 (patch) | |
tree | 0ba998103f344cbb72a610cffed236c8f786b256 /packages/taler-harness | |
parent | 5374b47792a7aad57e8f766d62b516df490ec360 (diff) |
wallet-core: fix transition out of auto-refund
Diffstat (limited to 'packages/taler-harness')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-refund-auto.ts | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-refund-auto.ts b/packages/taler-harness/src/integrationtests/test-refund-auto.ts index 582f30299..822e465e0 100644 --- a/packages/taler-harness/src/integrationtests/test-refund-auto.ts +++ b/packages/taler-harness/src/integrationtests/test-refund-auto.ts @@ -62,12 +62,12 @@ export async function runRefundAutoTest(t: GlobalTestState) { summary: "Buy me!", amount: "TESTKUDOS:5", fulfillment_url: "taler://fulfillment-success/thx", - auto_refund: { - d_us: 3000 * 1000, - }, + auto_refund: Duration.toTalerProtocolDuration( + Duration.fromSpec({ minutes: 5 }), + ), }, refund_delay: Duration.toTalerProtocolDuration( - Duration.fromSpec({ minutes: 5 }), + Duration.fromSpec({ minutes: 10 }), ), }); @@ -104,6 +104,8 @@ export async function runRefundAutoTest(t: GlobalTestState) { console.log(ref); + t.logStep("gave-refund"); + // The wallet should now automatically pick up the refund. await walletClient.call( WalletApiOperation.TestingWaitTransactionsFinal, @@ -133,12 +135,12 @@ export async function runRefundAutoTest(t: GlobalTestState) { summary: "Buy me!", amount: "TESTKUDOS:5", fulfillment_url: "taler://fulfillment-success/thx", - auto_refund: { - d_us: 3000 * 1000, - }, + auto_refund: Duration.toTalerProtocolDuration( + Duration.fromSpec({ minutes: 5 }), + ), }, refund_delay: Duration.toTalerProtocolDuration( - Duration.fromSpec({ minutes: 5 }), + Duration.fromSpec({ minutes: 10 }), ), }); @@ -175,7 +177,7 @@ export async function runRefundAutoTest(t: GlobalTestState) { }); // Only time-travel the wallet await walletClient.call(WalletApiOperation.TestingSetTimetravel, { - offsetMs: 5000, + offsetMs: 10 * 60 * 1000, }); await walletClient.call(WalletApiOperation.TestingWaitTransactionState, { transactionId: r1.transactionId, |