Fix wrench-tests by importing EmbeddedPage through sdk.getComponent

This commit is contained in:
Germain Souquet 2021-07-21 09:29:33 +02:00
parent 3372a77248
commit 54841d63dc

View file

@ -17,6 +17,7 @@ limitations under the License.
import React from 'react';
import classNames from "classnames";
import * as sdk from "../../../index";
import SdkConfig from '../../../SdkConfig';
import AuthPage from "./AuthPage";
import { _td } from "../../../languageHandler";
@ -24,7 +25,6 @@ import SettingsStore from "../../../settings/SettingsStore";
import { UIFeature } from "../../../settings/UIFeature";
import CountlyAnalytics from "../../../CountlyAnalytics";
import { replaceableComponent } from "../../../utils/replaceableComponent";
import EmbeddedPage from "../../structures/EmbeddedPage";
import LanguageSelector from "./LanguageSelector";
// translatable strings for Welcome pages
@ -43,6 +43,9 @@ export default class Welcome extends React.PureComponent<IProps> {
}
public render(): React.ReactNode {
// FIXME: Using an import will result in wrench-element-tests failures
const EmbeddedPage = sdk.getComponent("structures.EmbeddedPage");
const pagesConfig = SdkConfig.get().embeddedPages;
let pageUrl = null;
if (pagesConfig) {