diff options
author | Florian Dold <florian@dold.me> | 2023-08-24 18:29:54 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-24 18:30:03 +0200 |
commit | 6cc3fb3d0466e89b67be271009a2fc95f3ed41ca (patch) | |
tree | fc21999997bcdbed6c66dc2970dfc473a85bfd37 /packages/taler-harness/src/integrationtests/test-payment-claim.ts | |
parent | f5596767e1ad8f6461a6e64d61519783928624d2 (diff) | |
download | wallet-core-6cc3fb3d0466e89b67be271009a2fc95f3ed41ca.tar.gz wallet-core-6cc3fb3d0466e89b67be271009a2fc95f3ed41ca.tar.bz2 wallet-core-6cc3fb3d0466e89b67be271009a2fc95f3ed41ca.zip |
harness: modernize some tests
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-payment-claim.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-payment-claim.ts | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-payment-claim.ts b/packages/taler-harness/src/integrationtests/test-payment-claim.ts index e93d2c44c..eb219c1e7 100644 --- a/packages/taler-harness/src/integrationtests/test-payment-claim.ts +++ b/packages/taler-harness/src/integrationtests/test-payment-claim.ts @@ -17,18 +17,17 @@ /** * Imports. */ +import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, MerchantPrivateApi, WalletCli, } from "../harness/harness.js"; import { - createSimpleTestkudosEnvironment, - withdrawViaBank, + createSimpleTestkudosEnvironmentV2, + withdrawViaBankV2, } from "../harness/helpers.js"; -import { PreparePayResultType } from "@gnu-taler/taler-util"; -import { TalerErrorCode } from "@gnu-taler/taler-util"; -import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; /** * Run test for basic, bank-integrated withdrawal. @@ -36,14 +35,19 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; export async function runPaymentClaimTest(t: GlobalTestState) { // Set up test environment - const { wallet, bank, exchange, merchant } = - await createSimpleTestkudosEnvironment(t); + const { walletClient, bank, exchange, merchant } = + await createSimpleTestkudosEnvironmentV2(t); const walletTwo = new WalletCli(t, "two"); // Withdraw digital cash into the wallet. - await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:20" }); + await withdrawViaBankV2(t, { + walletClient, + bank, + exchange, + amount: "TESTKUDOS:20", + }); // Set up order. @@ -65,7 +69,7 @@ export async function runPaymentClaimTest(t: GlobalTestState) { // Make wallet pay for the order - const preparePayResult = await wallet.client.call( + const preparePayResult = await walletClient.call( WalletApiOperation.PreparePayForUri, { talerPayUri, @@ -82,7 +86,7 @@ export async function runPaymentClaimTest(t: GlobalTestState) { }); }); - await wallet.client.call(WalletApiOperation.ConfirmPay, { + await walletClient.call(WalletApiOperation.ConfirmPay, { proposalId: preparePayResult.proposalId, }); |