aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-claim-loop.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-08-24 18:29:54 +0200
committerFlorian Dold <florian@dold.me>2023-08-24 18:30:03 +0200
commit6cc3fb3d0466e89b67be271009a2fc95f3ed41ca (patch)
treefc21999997bcdbed6c66dc2970dfc473a85bfd37 /packages/taler-harness/src/integrationtests/test-claim-loop.ts
parentf5596767e1ad8f6461a6e64d61519783928624d2 (diff)
downloadwallet-core-6cc3fb3d0466e89b67be271009a2fc95f3ed41ca.tar.xz
harness: modernize some tests
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-claim-loop.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-claim-loop.ts21
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-claim-loop.ts b/packages/taler-harness/src/integrationtests/test-claim-loop.ts
index 921391283..32706c28b 100644
--- a/packages/taler-harness/src/integrationtests/test-claim-loop.ts
+++ b/packages/taler-harness/src/integrationtests/test-claim-loop.ts
@@ -17,13 +17,13 @@
/**
* Imports.
*/
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
+import { URL } from "url";
import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
import {
- createSimpleTestkudosEnvironment,
- withdrawViaBank,
+ createSimpleTestkudosEnvironmentV2,
+ withdrawViaBankV2,
} from "../harness/helpers.js";
-import { URL } from "url";
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
* Run test for the merchant's order lifecycle.
@@ -34,10 +34,15 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
export async function runClaimLoopTest(t: GlobalTestState) {
// Set up test environment
- const { wallet, bank, exchange, merchant } =
- await createSimpleTestkudosEnvironment(t);
+ const { walletClient, bank, exchange, merchant } =
+ await createSimpleTestkudosEnvironmentV2(t);
- await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:20" });
+ await withdrawViaBankV2(t, {
+ walletClient,
+ bank,
+ exchange,
+ amount: "TESTKUDOS:20",
+ });
// Set up order.
const orderResp = await MerchantPrivateApi.createOrder(merchant, "default", {
@@ -61,7 +66,7 @@ export async function runClaimLoopTest(t: GlobalTestState) {
// Make wallet claim the unpaid order.
t.assertTrue(orderStatusBefore.order_status === "unpaid");
const talerPayUri = orderStatusBefore.taler_pay_uri;
- await wallet.client.call(WalletApiOperation.PreparePayForUri, {
+ await walletClient.call(WalletApiOperation.PreparePayForUri, {
talerPayUri,
});