diff options
author | Sebastian <sebasjm@gmail.com> | 2022-10-14 11:40:38 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-10-14 11:41:53 -0300 |
commit | da9ec5eb16298d8ca5690800eca1c15f5a6cfaa5 (patch) | |
tree | 56b637054c94462cada2a067cfb7cce46fefe651 /packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx | |
parent | ca8da4ed380b308abdc894145c7e1a102bfd6cf0 (diff) | |
download | wallet-core-da9ec5eb16298d8ca5690800eca1c15f5a6cfaa5.tar.xz |
refactored terms of service to remove duplicated code
prettfied some sources
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx index c6bff219f..b58fce8e6 100644 --- a/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx +++ b/packages/taler-wallet-webextension/src/wallet/ExchangeAddConfirm.stories.tsx @@ -19,20 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { termsXml } from "../cta/termsExample.js"; import { createExample } from "../test-utils.js"; -import { View as TestedComponent } from "./ExchangeAddConfirm.js"; - -function parseFromString(s: string): Document { - if (typeof window === "undefined") { - return { - querySelector: () => ({ - children: [], - }), - } as any; - } - return new window.DOMParser().parseFromString(s, "text/xml"); -} +import { ExchangeAddConfirmPage as TestedComponent } from "./ExchangeAddConfirm.js"; export default { title: "wallet/exchange add/confirm", @@ -46,33 +34,12 @@ export default { export const TermsNotFound = createExample(TestedComponent, { url: "https://exchange.demo.taler.net/", - terms: { - status: "notfound", - version: "1", - content: undefined, - }, - onAccept: async () => undefined, }); export const NewTerms = createExample(TestedComponent, { url: "https://exchange.demo.taler.net/", - terms: { - status: "new", - version: "1", - content: undefined, - }, - onAccept: async () => undefined, }); export const TermsChanged = createExample(TestedComponent, { url: "https://exchange.demo.taler.net/", - terms: { - status: "changed", - version: "1", - content: { - type: "xml", - document: parseFromString(termsXml), - }, - }, - onAccept: async () => undefined, }); |