aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/test.ts')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Withdraw/test.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts
index 3493415d9..f90f7bed7 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/test.ts
@@ -111,10 +111,19 @@ describe("Withdraw CTA states", () => {
WalletApiOperation.GetWithdrawalDetailsForUri,
undefined,
{
+ status: "pending",
+ operationId: "123",
amount: "EUR:2" as AmountString,
possibleExchanges: [],
},
);
+ handler.addWalletCallResponse(
+ WalletApiOperation.GetWithdrawalTransactionByUri,
+ undefined,
+ {
+ transactionId: "123"
+ } as any,
+ );
const hookBehavior = await tests.hookBehaveLikeThis(
useComponentStateFromURI,
@@ -147,12 +156,21 @@ describe("Withdraw CTA states", () => {
WalletApiOperation.GetWithdrawalDetailsForUri,
undefined,
{
+ status: "pending",
+ operationId: "123",
amount: "ARS:2" as AmountString,
possibleExchanges: exchanges,
defaultExchangeBaseUrl: exchanges[0].exchangeBaseUrl,
},
);
handler.addWalletCallResponse(
+ WalletApiOperation.GetWithdrawalTransactionByUri,
+ undefined,
+ {
+ transactionId: "123"
+ } as any,
+ );
+ handler.addWalletCallResponse(
WalletApiOperation.GetWithdrawalDetailsForAmount,
undefined,
{
@@ -217,6 +235,8 @@ describe("Withdraw CTA states", () => {
WalletApiOperation.GetWithdrawalDetailsForUri,
undefined,
{
+ status: "pending",
+ operationId: "123",
amount: "ARS:2" as AmountString,
possibleExchanges: exchangeWithNewTos,
defaultExchangeBaseUrl: exchangeWithNewTos[0].exchangeBaseUrl,
@@ -245,6 +265,8 @@ describe("Withdraw CTA states", () => {
WalletApiOperation.GetWithdrawalDetailsForUri,
undefined,
{
+ status: "pending",
+ operationId: "123",
amount: "ARS:2" as AmountString,
possibleExchanges: exchanges,
defaultExchangeBaseUrl: exchanges[0].exchangeBaseUrl,