diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx index 91b6b4b56..54d947e14 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - (C) 2021-2023 Taler Systems S.A. + (C) 2021-2024 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 @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { h, VNode, FunctionalComponent } from "preact"; -import { ConfigContextProvider } from "../../../context/config.js"; +import { MerchantApiProviderTesting } from "@gnu-taler/web-util/browser"; +import { FunctionalComponent, h } from "preact"; import { CreatePage as TestedComponent } from "./CreatePage.js"; export default { @@ -37,14 +37,33 @@ function createExample<Props>( props: Partial<Props>, ) { const r = (args: any) => ( - <ConfigContextProvider + <MerchantApiProviderTesting value={{ - currency: "ARS", - version: "1", + cancelRequest: () => {}, + changeBackend: () => {}, + config: { + currency: "ARS", + version: "1", + currencies: { + "ASD": { + name: "testkudos", + alt_unit_names: {}, + num_fractional_input_digits: 1, + num_fractional_normal_digits: 1, + num_fractional_trailing_zero_digits: 1, + } + }, + exchanges: [], + name: "taler-merchant" + }, + hints: [], + lib: {} as any, + onActivity: (() => {}) as any, + url: new URL("asdasd"), }} > <Component {...args} /> - </ConfigContextProvider> + </MerchantApiProviderTesting> ); r.args = props; return r; |