From 6e060da237af35796b1b34dce108f05eef44ceb3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 14 Apr 2023 14:16:08 -0300 Subject: 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 --- packages/taler-wallet-webextension/src/test-utils.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'packages/taler-wallet-webextension/src/test-utils.ts') 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, { -- cgit v1.2.3