2021-07-14 20:21:40 +02:00
|
|
|
/*
|
|
|
|
This file is part of GNU Taler
|
|
|
|
(C) 2021 Taler Systems S.A.
|
|
|
|
|
|
|
|
GNU Taler is free software; you can redistribute it and/or modify it under the
|
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 3, or (at your option) any later version.
|
|
|
|
|
|
|
|
GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
|
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2021-11-15 15:18:58 +01:00
|
|
|
*
|
|
|
|
* @author Sebastian Javier Marchano (sebasjm)
|
|
|
|
*/
|
2021-07-14 20:21:40 +02:00
|
|
|
|
2022-03-29 04:41:07 +02:00
|
|
|
import { createExample } from "../test-utils.js";
|
|
|
|
import { BalanceView as TestedComponent } from "./BalancePage.js";
|
2021-07-14 20:21:40 +02:00
|
|
|
|
|
|
|
export default {
|
2021-11-15 15:18:58 +01:00
|
|
|
title: "popup/balance",
|
2021-07-14 20:21:40 +02:00
|
|
|
component: TestedComponent,
|
2021-11-15 15:18:58 +01:00
|
|
|
argTypes: {},
|
2021-07-14 20:21:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export const EmptyBalance = createExample(TestedComponent, {
|
2022-01-10 20:04:53 +01:00
|
|
|
balances: [],
|
2021-07-14 20:21:40 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export const SomeCoins = createExample(TestedComponent, {
|
2022-01-10 20:04:53 +01:00
|
|
|
balances: [
|
|
|
|
{
|
|
|
|
available: "USD:10.5",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
2021-07-14 20:21:40 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
],
|
2021-07-14 20:21:40 +02:00
|
|
|
});
|
|
|
|
|
2022-01-10 20:04:53 +01:00
|
|
|
export const SomeCoinsInTreeCurrencies = createExample(TestedComponent, {
|
|
|
|
balances: [
|
|
|
|
{
|
|
|
|
available: "EUR:1",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
2021-07-14 20:21:40 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
{
|
|
|
|
available: "TESTKUDOS:2000",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
2021-10-11 20:59:55 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
{
|
|
|
|
available: "JPY:4",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "EUR:15",
|
|
|
|
pendingOutgoing: "EUR:0",
|
|
|
|
requiresUserInput: false,
|
2021-10-11 20:59:55 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
],
|
2021-10-11 20:59:55 +02:00
|
|
|
});
|
|
|
|
|
2022-01-10 20:04:53 +01:00
|
|
|
export const NoCoinsInTreeCurrencies = createExample(TestedComponent, {
|
|
|
|
balances: [
|
|
|
|
{
|
|
|
|
available: "EUR:3",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
2021-10-11 20:59:55 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
{
|
|
|
|
available: "USD:2",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "ARS:1",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "EUR:15",
|
|
|
|
pendingOutgoing: "EUR:0",
|
|
|
|
requiresUserInput: false,
|
2021-10-11 20:59:55 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
],
|
2021-10-11 20:59:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export const SomeCoinsInFiveCurrencies = createExample(TestedComponent, {
|
2022-01-10 20:04:53 +01:00
|
|
|
balances: [
|
|
|
|
{
|
|
|
|
available: "USD:0",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "ARS:13451",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "EUR:202.02",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "EUR:0",
|
|
|
|
pendingOutgoing: "EUR:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "JPY:0",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "EUR:0",
|
|
|
|
pendingOutgoing: "EUR:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "JPY:51223233",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "EUR:0",
|
|
|
|
pendingOutgoing: "EUR:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "DEMOKUDOS:6",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:0",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
available: "TESTKUDOS:6",
|
|
|
|
hasPendingTransactions: false,
|
|
|
|
pendingIncoming: "USD:5",
|
|
|
|
pendingOutgoing: "USD:0",
|
|
|
|
requiresUserInput: false,
|
2021-07-14 20:21:40 +02:00
|
|
|
},
|
2022-01-10 20:04:53 +01:00
|
|
|
],
|
2021-07-14 20:21:40 +02:00
|
|
|
});
|