mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-23 07:10:24 +03:00
9d79a934bf
* Flatten Vector-override components Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Improve coverage Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Ie Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
/*
|
|
Copyright 2024 New Vector Ltd.
|
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
Please see LICENSE files in the repository root for full details.
|
|
*/
|
|
|
|
import * as React from "react";
|
|
import { render } from "jest-matrix-react";
|
|
|
|
import AuthPage from "../../../../../src/components/views/auth/AuthPage";
|
|
import { setupLanguageMock } from "../../../../setup/setupLanguage";
|
|
import SdkConfig from "../../../../../src/SdkConfig.ts";
|
|
|
|
describe("<AuthPage />", () => {
|
|
beforeEach(() => {
|
|
setupLanguageMock();
|
|
SdkConfig.reset();
|
|
// @ts-ignore private access
|
|
AuthPage.welcomeBackgroundUrl = undefined;
|
|
});
|
|
|
|
it("should match snapshot", () => {
|
|
const { asFragment } = render(<AuthPage />);
|
|
expect(asFragment()).toMatchSnapshot();
|
|
});
|
|
|
|
it("should use configured background url", () => {
|
|
SdkConfig.add({ branding: { welcome_background_url: ["https://example.com/image.png"] } });
|
|
const { container } = render(<AuthPage />);
|
|
expect(container.querySelector(".mx_AuthPage")).toHaveStyle({
|
|
background: "center/cover fixed url(https://example.com/image.png)",
|
|
});
|
|
});
|
|
});
|