diff options
author | Sebastian <sebasjm@gmail.com> | 2023-04-14 14:16:08 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-04-14 14:16:25 -0300 |
commit | 6e060da237af35796b1b34dce108f05eef44ceb3 (patch) | |
tree | 6e21db09f1dd75f02821811ae165f056d2087be8 /packages/taler-wallet-webextension/src/test-utils.ts | |
parent | 5ea22a325c069fe497b2dc8a73d4de69fd8cc27b (diff) | |
download | wallet-core-6e060da237af35796b1b34dce108f05eef44ceb3.tar.xz |
some changes
using transaction context from web utils
alertContext.safely api change (easier to integrate)
using lang and localstorage from web utils
removing auto permission, from UI
adding settings
Diffstat (limited to 'packages/taler-wallet-webextension/src/test-utils.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/test-utils.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/test-utils.ts b/packages/taler-wallet-webextension/src/test-utils.ts index 085055a7e..d85d992b1 100644 --- a/packages/taler-wallet-webextension/src/test-utils.ts +++ b/packages/taler-wallet-webextension/src/test-utils.ts @@ -25,17 +25,18 @@ import { ComponentChildren, Fragment, FunctionalComponent, + VNode, h as create, options, render as renderIntoDom, - VNode, } from "preact"; import { render as renderToString } from "preact-render-to-string"; import { AlertProvider } from "./context/alert.js"; import { BackendProvider } from "./context/backend.js"; -import { TranslationProvider } from "./context/translation.js"; import { nullFunction } from "./mui/handlers.js"; import { BackgroundApiClient, wxApi } from "./wxApi.js"; +import { TranslationProvider } from "@gnu-taler/web-util/lib/index.browser"; +import { strings } from "./i18n/strings.js"; // When doing tests we want the requestAnimationFrame to be as fast as possible. // without this option the RAF will timeout after 100ms making the tests slower @@ -368,7 +369,11 @@ export function createWalletApiMock(): { }): VNode { let children = _cs; children = create(AlertProvider, { children }, children); - children = create(TranslationProvider, { children }, children); + children = create( + TranslationProvider, + { children, source: strings, initial: "en", forceLang: "en" }, + children, + ); return create( BackendProvider, { |