From a60a1d867cfe6a12f1e6fadfa037f022e9385107 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 5 Sep 2023 10:46:06 +0200 Subject: harness: remove deprecated testing APIs --- .../src/integrationtests/test-payment-multiple.ts | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'packages/taler-harness/src/integrationtests/test-payment-multiple.ts') diff --git a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts index 25e19ae8e..29047e102 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-multiple.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-multiple.ts @@ -27,9 +27,12 @@ import { MerchantPrivateApi, getPayto, } from "../harness/harness.js"; -import { withdrawViaBank } from "../harness/helpers.js"; import { coin_ct10, coin_u1 } from "../harness/denomStructures.js"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; +import { + createWalletDaemonWithClient, + withdrawViaBankV2, +} from "../harness/helpers.js"; async function setupTest(t: GlobalTestState): Promise<{ merchant: MerchantService; @@ -82,13 +85,13 @@ async function setupTest(t: GlobalTestState): Promise<{ await merchant.start(); await merchant.pingUntilAvailable(); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "default", name: "Default Instance", paytoUris: [getPayto("merchant-default")], }); - await merchant.addInstance({ + await merchant.addInstanceWithWireAccount({ id: "minst1", name: "minst1", paytoUris: [getPayto("minst1")], @@ -113,11 +116,18 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { const { merchant, bank, exchange } = await setupTest(t); - const wallet = new WalletCli(t); + const { walletClient } = await createWalletDaemonWithClient(t, { + name: "default", + }); // Withdraw digital cash into the wallet. - await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:100" }); + await withdrawViaBankV2(t, { + walletClient, + bank, + exchange, + amount: "TESTKUDOS:100", + }); // Set up order. @@ -137,13 +147,12 @@ export async function runPaymentMultipleTest(t: GlobalTestState) { // Make wallet pay for the order - const r1 = await wallet.client.call(WalletApiOperation.PreparePayForUri, { + const r1 = await walletClient.call(WalletApiOperation.PreparePayForUri, { talerPayUri: orderStatus.taler_pay_uri, }); - await wallet.client.call(WalletApiOperation.ConfirmPay, { - // FIXME: should be validated, don't cast! - proposalId: r1.proposalId, + await walletClient.call(WalletApiOperation.ConfirmPay, { + transactionId: r1.transactionId, }); // Check if payment was successful. -- cgit v1.2.3