summaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-payment-multiple.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-05 10:46:06 +0200
committerFlorian Dold <florian@dold.me>2023-09-05 10:48:41 +0200
commita60a1d867cfe6a12f1e6fadfa037f022e9385107 (patch)
treebc77a92b327cd0e4933fa4b3fe15f1c775e24235 /packages/taler-harness/src/integrationtests/test-payment-multiple.ts
parente1d86816a7c07cb8ca2d54676d5cdbbe513f2ba7 (diff)
downloadwallet-core-a60a1d867cfe6a12f1e6fadfa037f022e9385107.tar.gz
wallet-core-a60a1d867cfe6a12f1e6fadfa037f022e9385107.tar.bz2
wallet-core-a60a1d867cfe6a12f1e6fadfa037f022e9385107.zip
harness: remove deprecated testing APIs
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-payment-multiple.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-payment-multiple.ts27
1 files changed, 18 insertions, 9 deletions
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.