Disable URL Preview setting if disabled on the homeserver (#33279)
* Disallow URL Previews if disabled by homeserver. * Cleanup nonsense * cleanup * cleanup * fixes * Remove import * Add an error handler * cleanup
This commit is contained in:
+11
-1
@@ -12,7 +12,13 @@ import userEvent from "@testing-library/user-event";
|
||||
|
||||
import PreferencesUserSettingsTab from "../../../../../../../src/components/views/settings/tabs/user/PreferencesUserSettingsTab";
|
||||
import { MatrixClientPeg } from "../../../../../../../src/MatrixClientPeg";
|
||||
import { mockPlatformPeg, stubClient } from "../../../../../../test-utils";
|
||||
import {
|
||||
getMockClientWithEventEmitter,
|
||||
mockClientMethodsServer,
|
||||
mockClientMethodsUser,
|
||||
mockPlatformPeg,
|
||||
stubClient,
|
||||
} from "../../../../../../test-utils";
|
||||
import SettingsStore from "../../../../../../../src/settings/SettingsStore";
|
||||
import { SettingLevel } from "../../../../../../../src/settings/SettingLevel";
|
||||
import MatrixClientBackedController from "../../../../../../../src/settings/controllers/MatrixClientBackedController";
|
||||
@@ -29,6 +35,10 @@ describe("PreferencesUserSettingsTab", () => {
|
||||
};
|
||||
|
||||
it("should render", () => {
|
||||
MatrixClientBackedController.matrixClient = getMockClientWithEventEmitter({
|
||||
...mockClientMethodsServer(),
|
||||
...mockClientMethodsUser(),
|
||||
});
|
||||
const { asFragment } = renderTab();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user