diff options
author | Florian Dold <florian@dold.me> | 2021-06-17 13:34:59 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-17 13:35:08 +0200 |
commit | 5df7ddba97aa4482c781bfe8e87f60c3bc195ae4 (patch) | |
tree | 0956d310a83f0fafbb7d5a93001566f9035269a0 /packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts | |
parent | 0b4976601fe2ecb0462fe72ae188b5cbba06d9cc (diff) | |
download | wallet-core-5df7ddba97aa4482c781bfe8e87f60c3bc195ae4.tar.xz |
use the new wallet core API interface in all tests
Diffstat (limited to 'packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts index c2640bb22..b4276248e 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-gone.ts @@ -29,6 +29,7 @@ import { getTimestampNow, timestampTruncateToSecond, } from "@gnu-taler/taler-util"; +import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; /** * Run test for basic, bank-integrated withdrawal. @@ -74,16 +75,13 @@ export async function runRefundGoneTest(t: GlobalTestState) { // Make wallet pay for the order - const r1 = await wallet.apiRequest("preparePay", { + const r1 = await wallet.client.call(WalletApiOperation.PreparePayForUri, { talerPayUri: orderStatus.taler_pay_uri, }); - t.assertTrue(r1.type === "response"); - const r2 = await wallet.apiRequest("confirmPay", { - // FIXME: should be validated, don't cast! - proposalId: (r1.result as any).proposalId, + const r2 = await wallet.client.call(WalletApiOperation.ConfirmPay, { + proposalId: r1.proposalId, }); - t.assertTrue(r2.type === "response"); // Check if payment was successful. @@ -108,7 +106,7 @@ export async function runRefundGoneTest(t: GlobalTestState) { console.log(ref); - let rr = await wallet.applyRefund({ + let rr = await wallet.client.call(WalletApiOperation.ApplyRefund, { talerRefundUri: ref.talerRefundUri, }); @@ -117,11 +115,11 @@ export async function runRefundGoneTest(t: GlobalTestState) { await wallet.runUntilDone(); - let r = await wallet.apiRequest("getBalances", {}); + let r = await wallet.client.call(WalletApiOperation.GetBalances, {}); console.log(JSON.stringify(r, undefined, 2)); - r = await wallet.apiRequest("getTransactions", {}); - console.log(JSON.stringify(r, undefined, 2)); + const r3 = await wallet.client.call(WalletApiOperation.GetTransactions, {}); + console.log(JSON.stringify(r3, undefined, 2)); await t.shutdown(); } |