diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-13 17:31:20 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-13 17:31:20 -0300 |
commit | 8e8bada643b73b78991cde9abc375825a18bf9d9 (patch) | |
tree | 707a161e20960f697d97f708dd9db4cb2659231b /packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts | |
parent | 767f1a9d671d426b0c5b32626900ab26d93f13d4 (diff) | |
download | wallet-core-8e8bada643b73b78991cde9abc375825a18bf9d9.tar.xz |
fix deposit navigation
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts b/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts index 0054ab5af..42b76cf50 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage/test.ts @@ -34,6 +34,7 @@ import { createWalletApiMock } from "../../test-utils.js"; import { useComponentState } from "./state.js"; const currency = "EUR"; +const amount = `${currency}:0`; const withoutFee = (): DepositGroupFees => ({ coin: Amounts.stringify(`${currency}:0`), wire: Amounts.stringify(`${currency}:0`), @@ -49,7 +50,7 @@ const withSomeFee = (): DepositGroupFees => ({ describe("DepositPage states", () => { it("should have status 'no-enough-balance' when balance is empty", async () => { const { handler, TestingContext } = createWalletApiMock(); - const props = { currency, onCancel: nullFunction, onSuccess: nullFunction }; + const props = { amount, onCancel: nullFunction, onSuccess: nullFunction }; handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ @@ -90,7 +91,7 @@ describe("DepositPage states", () => { it("should have status 'no-accounts' when balance is not empty and accounts is empty", async () => { const { handler, TestingContext } = createWalletApiMock(); - const props = { currency, onCancel: nullFunction, onSuccess: nullFunction }; + const props = { amount, onCancel: nullFunction, onSuccess: nullFunction }; handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ @@ -144,7 +145,7 @@ describe("DepositPage states", () => { it("should have status 'ready' but unable to deposit ", async () => { const { handler, TestingContext } = createWalletApiMock(); - const props = { currency, onCancel: nullFunction, onSuccess: nullFunction }; + const props = { amount, onCancel: nullFunction, onSuccess: nullFunction }; handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ @@ -198,7 +199,7 @@ describe("DepositPage states", () => { it("should not be able to deposit more than the balance ", async () => { const { handler, TestingContext } = createWalletApiMock(); - const props = { currency, onCancel: nullFunction, onSuccess: nullFunction }; + const props = { amount, onCancel: nullFunction, onSuccess: nullFunction }; handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ @@ -273,7 +274,7 @@ describe("DepositPage states", () => { it("should calculate the fee upon entering amount ", async () => { const { handler, TestingContext } = createWalletApiMock(); - const props = { currency, onCancel: nullFunction, onSuccess: nullFunction }; + const props = { amount, onCancel: nullFunction, onSuccess: nullFunction }; handler.addWalletCallResponse(WalletApiOperation.GetBalances, undefined, { balances: [ |