mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
test: adapt unit tests to HealthChat fork customizations
This commit is contained in:
@@ -33,6 +33,7 @@ import { getPowerLevels } from "../../../../../src/components/viewmodels/right_p
|
||||
import { RightPanelPhases } from "../../../../../src/stores/right-panel/RightPanelStorePhases";
|
||||
import { MatrixClientPeg } from "../../../../../src/MatrixClientPeg";
|
||||
import MatrixClientContext from "../../../../../src/contexts/MatrixClientContext";
|
||||
import { SdkContextClass } from "../../../../../src/contexts/SDKContext";
|
||||
import Modal from "../../../../../src/Modal";
|
||||
import { clearAllModals, flushPromises } from "../../../../test-utils";
|
||||
import ErrorDialog from "../../../../../src/components/views/dialogs/ErrorDialog";
|
||||
@@ -134,6 +135,9 @@ beforeEach(() => {
|
||||
|
||||
jest.spyOn(MatrixClientPeg, "get").mockReturnValue(mockClient);
|
||||
jest.spyOn(MatrixClientPeg, "safeGet").mockReturnValue(mockClient);
|
||||
// HealthChat's UserExtendedProfileInfo reads SdkContextClass.instance.userProfilesStore,
|
||||
// which requires the singleton client to be set (it is, on login, in the real app).
|
||||
SdkContextClass.instance.client = mockClient;
|
||||
});
|
||||
|
||||
describe("<UserInfo />", () => {
|
||||
|
||||
Reference in New Issue
Block a user