test: adapt unit tests to HealthChat fork customizations

This commit is contained in:
2026-06-06 15:14:12 +02:00
parent 2685821bdc
commit d72b973d01
9 changed files with 36 additions and 58 deletions
@@ -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 />", () => {