Fix wrench-tests by importing EmbeddedPage through sdk.getComponent
parent
3372a77248
commit
54841d63dc
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
|
import * as sdk from "../../../index";
|
||||||
import SdkConfig from '../../../SdkConfig';
|
import SdkConfig from '../../../SdkConfig';
|
||||||
import AuthPage from "./AuthPage";
|
import AuthPage from "./AuthPage";
|
||||||
import { _td } from "../../../languageHandler";
|
import { _td } from "../../../languageHandler";
|
||||||
|
@ -24,7 +25,6 @@ import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import { UIFeature } from "../../../settings/UIFeature";
|
import { UIFeature } from "../../../settings/UIFeature";
|
||||||
import CountlyAnalytics from "../../../CountlyAnalytics";
|
import CountlyAnalytics from "../../../CountlyAnalytics";
|
||||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||||
import EmbeddedPage from "../../structures/EmbeddedPage";
|
|
||||||
import LanguageSelector from "./LanguageSelector";
|
import LanguageSelector from "./LanguageSelector";
|
||||||
|
|
||||||
// translatable strings for Welcome pages
|
// translatable strings for Welcome pages
|
||||||
|
@ -43,6 +43,9 @@ export default class Welcome extends React.PureComponent<IProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public render(): React.ReactNode {
|
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;
|
const pagesConfig = SdkConfig.get().embeddedPages;
|
||||||
let pageUrl = null;
|
let pageUrl = null;
|
||||||
if (pagesConfig) {
|
if (pagesConfig) {
|
||||||
|
|
Loading…
Reference in New Issue