diff options
author | Florian Dold <florian@dold.me> | 2023-09-05 10:46:06 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-05 10:48:41 +0200 |
commit | a60a1d867cfe6a12f1e6fadfa037f022e9385107 (patch) | |
tree | bc77a92b327cd0e4933fa4b3fe15f1c775e24235 /packages/taler-harness/src/integrationtests/test-clause-schnorr.ts | |
parent | e1d86816a7c07cb8ca2d54676d5cdbbe513f2ba7 (diff) | |
download | wallet-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-clause-schnorr.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-clause-schnorr.ts | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts index bf42dc4c6..9a839b677 100644 --- a/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts +++ b/packages/taler-harness/src/integrationtests/test-clause-schnorr.ts @@ -17,12 +17,13 @@ /** * Imports. */ +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js"; import { GlobalTestState } from "../harness/harness.js"; import { - createSimpleTestkudosEnvironment, - withdrawViaBank, - makeTestPayment, + createSimpleTestkudosEnvironmentV2, + makeTestPaymentV2, + withdrawViaBankV2, } from "../harness/helpers.js"; /** @@ -53,12 +54,18 @@ export async function runClauseSchnorrTest(t: GlobalTestState) { name: "rsa_dummy", }); - const { wallet, bank, exchange, merchant } = - await createSimpleTestkudosEnvironment(t, coinConfig); + const { walletClient, bank, exchange, merchant } = + await createSimpleTestkudosEnvironmentV2(t, coinConfig); // Withdraw digital cash into the wallet. - await withdrawViaBank(t, { wallet, bank, exchange, amount: "TESTKUDOS:20" }); + const wres = await withdrawViaBankV2(t, { + walletClient, + bank, + exchange, + amount: "TESTKUDOS:20", + }); + await wres.withdrawalFinishedCond; const order = { summary: "Buy me!", @@ -66,8 +73,8 @@ export async function runClauseSchnorrTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - await makeTestPayment(t, { wallet, merchant, order }); - await wallet.runUntilDone(); + await makeTestPaymentV2(t, { walletClient, merchant, order }); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); // Test JSON normalization of contract terms: Does the wallet // agree with the merchant? @@ -77,8 +84,8 @@ export async function runClauseSchnorrTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - await makeTestPayment(t, { wallet, merchant, order: order2 }); - await wallet.runUntilDone(); + await makeTestPaymentV2(t, { walletClient, merchant, order: order2 }); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); // Test JSON normalization of contract terms: Does the wallet // agree with the merchant? @@ -88,9 +95,8 @@ export async function runClauseSchnorrTest(t: GlobalTestState) { fulfillment_url: "taler://fulfillment-success/thx", }; - await makeTestPayment(t, { wallet, merchant, order: order3 }); - - await wallet.runUntilDone(); + await makeTestPaymentV2(t, { walletClient, merchant, order: order3 }); + await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {}); } runClauseSchnorrTest.suites = ["experimental-wallet"]; |