aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-forced-selection.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-08-24 18:29:54 +0200
committerFlorian Dold <florian@dold.me>2023-08-24 18:30:03 +0200
commit6cc3fb3d0466e89b67be271009a2fc95f3ed41ca (patch)
treefc21999997bcdbed6c66dc2970dfc473a85bfd37 /packages/taler-harness/src/integrationtests/test-forced-selection.ts
parentf5596767e1ad8f6461a6e64d61519783928624d2 (diff)
downloadwallet-core-6cc3fb3d0466e89b67be271009a2fc95f3ed41ca.tar.xz
harness: modernize some tests
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-forced-selection.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-forced-selection.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-forced-selection.ts b/packages/taler-harness/src/integrationtests/test-forced-selection.ts
index d0621f000..3425dadf1 100644
--- a/packages/taler-harness/src/integrationtests/test-forced-selection.ts
+++ b/packages/taler-harness/src/integrationtests/test-forced-selection.ts
@@ -20,7 +20,7 @@
import { j2s } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { GlobalTestState } from "../harness/harness.js";
-import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
+import { createSimpleTestkudosEnvironmentV2 } from "../harness/helpers.js";
/**
* Run test for forced denom/coin selection.
@@ -28,14 +28,14 @@ import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
export async function runForcedSelectionTest(t: GlobalTestState) {
// Set up test environment
- const { wallet, bank, exchange, merchant } =
- await createSimpleTestkudosEnvironment(t);
+ const { walletClient, bank, exchange, merchant } =
+ await createSimpleTestkudosEnvironmentV2(t);
- await wallet.client.call(WalletApiOperation.AddExchange, {
+ await walletClient.call(WalletApiOperation.AddExchange, {
exchangeBaseUrl: exchange.baseUrl,
});
- await wallet.client.call(WalletApiOperation.WithdrawTestBalance, {
+ await walletClient.call(WalletApiOperation.WithdrawTestBalance, {
exchangeBaseUrl: exchange.baseUrl,
amount: "TESTKUDOS:10",
bankAccessApiBaseUrl: bank.bankAccessApiBaseUrl,
@@ -49,13 +49,13 @@ export async function runForcedSelectionTest(t: GlobalTestState) {
},
});
- await wallet.runUntilDone();
+ await walletClient.call(WalletApiOperation.TestingWaitTransactionsFinal, {});
- const coinDump = await wallet.client.call(WalletApiOperation.DumpCoins, {});
+ const coinDump = await walletClient.call(WalletApiOperation.DumpCoins, {});
console.log(coinDump);
t.assertDeepEqual(coinDump.coins.length, 3);
- const payResp = await wallet.client.call(WalletApiOperation.TestPay, {
+ const payResp = await walletClient.call(WalletApiOperation.TestPay, {
amount: "TESTKUDOS:3",
merchantBaseUrl: merchant.makeInstanceBaseUrl(),
summary: "bla",