diff options
Diffstat (limited to 'packages/taler-wallet-cli/src')
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts | 7 | ||||
-rw-r--r-- | packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts | 29 |
2 files changed, 19 insertions, 17 deletions
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts b/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts index ec1d9f64b..b5ecbee4a 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-denom-unoffered.ts @@ -17,13 +17,8 @@ /** * Imports. */ -import { - PreparePayResultType, - TalerErrorCode, - TalerErrorDetail, -} from "@gnu-taler/taler-util"; +import { PreparePayResultType, TalerErrorCode } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; -import { makeEventId } from "@gnu-taler/taler-wallet-core"; import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; import { createSimpleTestkudosEnvironment, diff --git a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts b/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts index 9378465a0..1099a8188 100644 --- a/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts +++ b/packages/taler-wallet-cli/src/integrationtests/test-payment-idempotency.ts @@ -18,7 +18,10 @@ * Imports. */ import { GlobalTestState, MerchantPrivateApi } from "../harness/harness.js"; -import { createSimpleTestkudosEnvironment, withdrawViaBank } from "../harness/helpers.js"; +import { + createSimpleTestkudosEnvironment, + withdrawViaBank, +} from "../harness/helpers.js"; import { PreparePayResultType } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -29,12 +32,8 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; export async function runPaymentIdempotencyTest(t: GlobalTestState) { // Set up test environment - const { - wallet, - bank, - exchange, - merchant, - } = await createSimpleTestkudosEnvironment(t); + const { wallet, bank, exchange, merchant } = + await createSimpleTestkudosEnvironment(t); // Withdraw digital cash into the wallet. @@ -83,10 +82,16 @@ export async function runPaymentIdempotencyTest(t: GlobalTestState) { const proposalId = preparePayResult.proposalId; - await wallet.client.call(WalletApiOperation.ConfirmPay, { - // FIXME: should be validated, don't cast! - proposalId: proposalId, - }); + const confirmPayResult = await wallet.client.call( + WalletApiOperation.ConfirmPay, + { + proposalId: proposalId, + }, + ); + + console.log("confirm pay result", confirmPayResult); + + await wallet.runUntilDone(); // Check if payment was successful. @@ -103,6 +108,8 @@ export async function runPaymentIdempotencyTest(t: GlobalTestState) { }, ); + console.log("result after:", preparePayResultAfter); + t.assertTrue( preparePayResultAfter.status === PreparePayResultType.AlreadyConfirmed, ); |