diff --git a/test/unit-tests/components/views/dialogs/__snapshots__/UserSettingsDialog-test.tsx.snap b/test/unit-tests/components/views/dialogs/__snapshots__/UserSettingsDialog-test.tsx.snap index 871d937681..de47330ddf 100644 --- a/test/unit-tests/components/views/dialogs/__snapshots__/UserSettingsDialog-test.tsx.snap +++ b/test/unit-tests/components/views/dialogs/__snapshots__/UserSettingsDialog-test.tsx.snap @@ -225,6 +225,32 @@ NodeList [ Security & Privacy , + ,
  • ", () => { + it("should render the component", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); + + it("should render the component with the recommended tag", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); +}); diff --git a/test/unit-tests/components/views/settings/SettingsSubheader-test.tsx b/test/unit-tests/components/views/settings/SettingsSubheader-test.tsx new file mode 100644 index 0000000000..e80029be23 --- /dev/null +++ b/test/unit-tests/components/views/settings/SettingsSubheader-test.tsx @@ -0,0 +1,28 @@ +/* + * Copyright 2024 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only + * Please see LICENSE files in the repository root for full details. + */ + +import React from "react"; +import { render } from "jest-matrix-react"; + +import { SettingsSubheader } from "../../../../../src/components/views/settings/SettingsSubheader"; + +describe("", () => { + it("should display a check icon when in success", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); + + it("should display an error icon when in error", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); + + it("should display a label", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + }); +}); diff --git a/test/unit-tests/components/views/settings/__snapshots__/SettingsHeader-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/SettingsHeader-test.tsx.snap new file mode 100644 index 0000000000..4098a55ed4 --- /dev/null +++ b/test/unit-tests/components/views/settings/__snapshots__/SettingsHeader-test.tsx.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render the component 1`] = ` + +

    + Settings Header +

    +
    +`; + +exports[` should render the component with the recommended tag 1`] = ` + +

    + Settings Header + + Recommended + +

    +
    +`; diff --git a/test/unit-tests/components/views/settings/__snapshots__/SettingsSubheader-test.tsx.snap b/test/unit-tests/components/views/settings/__snapshots__/SettingsSubheader-test.tsx.snap new file mode 100644 index 0000000000..dd76bc8adf --- /dev/null +++ b/test/unit-tests/components/views/settings/__snapshots__/SettingsSubheader-test.tsx.snap @@ -0,0 +1,77 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should display a check icon when in success 1`] = ` + +
    + + + + + Success! + +
    +
    +`; + +exports[` should display a label 1`] = ` + +
    + My label + + + + + Success! + +
    +
    +`; + +exports[` should display an error icon when in error 1`] = ` + +
    + + + + + Error! + +
    +
    +`; diff --git a/test/unit-tests/components/views/settings/encryption/EncryptionCard-test.tsx b/test/unit-tests/components/views/settings/encryption/EncryptionCard-test.tsx new file mode 100644 index 0000000000..757985ecb1 --- /dev/null +++ b/test/unit-tests/components/views/settings/encryption/EncryptionCard-test.tsx @@ -0,0 +1,22 @@ +/* + * Copyright 2024 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only + * Please see LICENSE files in the repository root for full details. + */ + +import React from "react"; +import { render } from "jest-matrix-react"; + +import { EncryptionCard } from "../../../../../../src/components/views/settings/encryption/EncryptionCard"; + +describe("", () => { + it("should render", () => { + const { asFragment } = render( + + Encryption card children + , + ); + expect(asFragment()).toMatchSnapshot(); + }); +}); diff --git a/test/unit-tests/components/views/settings/encryption/__snapshots__/EncryptionCard-test.tsx.snap b/test/unit-tests/components/views/settings/encryption/__snapshots__/EncryptionCard-test.tsx.snap new file mode 100644 index 0000000000..e523e57c09 --- /dev/null +++ b/test/unit-tests/components/views/settings/encryption/__snapshots__/EncryptionCard-test.tsx.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render 1`] = ` + +
    +
    +
    + + + +
    +

    + My title +

    + + My description + +
    + Encryption card children +
    +
    +`;