aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts31
1 files changed, 18 insertions, 13 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts
index 7d2ba99b2..161e8beac 100644
--- a/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts
+++ b/packages/taler-harness/src/integrationtests/test-merchant-longpolling.ts
@@ -17,20 +17,20 @@
/**
* Imports.
*/
-import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
-import {
- createSimpleTestkudosEnvironment,
- withdrawViaBank,
-} from "../harness/helpers.js";
import {
- PreparePayResultType,
- codecForMerchantOrderStatusUnpaid,
ConfirmPayResultType,
+ PreparePayResultType,
URL,
+ codecForMerchantOrderStatusUnpaid,
} from "@gnu-taler/taler-util";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import axiosImp from "axios";
+import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js";
+import {
+ createSimpleTestkudosEnvironmentV2,
+ withdrawViaBankV2
+} from "../harness/helpers.js";
const axios = axiosImp.default;
-import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
/**
* Run test for basic, bank-integrated withdrawal.
@@ -38,12 +38,17 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
export async function runMerchantLongpollingTest(t: GlobalTestState) {
// Set up test environment
- const { wallet, bank, exchange, merchant } =
- await createSimpleTestkudosEnvironment(t);
+ const { walletClient, bank, exchange, merchant } =
+ await createSimpleTestkudosEnvironmentV2(t);
// Withdraw digital cash into the wallet.
- await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:20" });
+ await withdrawViaBankV2(t, {
+ walletClient,
+ bank,
+ exchange,
+ amount: "TESTKUDOS:20",
+ });
/**
* =========================================================================
@@ -113,7 +118,7 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) {
* =========================================================================
*/
- let preparePayResp = await wallet.client.call(
+ let preparePayResp = await walletClient.call(
WalletApiOperation.PreparePayForUri,
{
talerPayUri: pubUnpaidStatus.taler_pay_uri,
@@ -148,7 +153,7 @@ export async function runMerchantLongpollingTest(t: GlobalTestState) {
publicOrderStatusResp.data,
);
- const confirmPayRes = await wallet.client.call(
+ const confirmPayRes = await walletClient.call(
WalletApiOperation.ConfirmPay,
{
proposalId: proposalId,