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
@@ -85,6 +85,9 @@ describe("<AccountUserSettingsTab />", () => {
stores = new SdkContextClass();
stores.client = mockClient;
// HealthChat's ExtendedProfileSettings (mounted via UserProfileSettings) reads the global
// SdkContextClass.instance.userProfilesStore, which requires the singleton client to be set.
SdkContextClass.instance.client = mockClient;
// stub out this store completely to avoid mocking initialisation
const mockOidcClientStore = {} as unknown as OidcClientStore;
jest.spyOn(stores, "oidcClientStore", "get").mockReturnValue(mockOidcClientStore);
@@ -42,14 +42,14 @@ exports[`<AccountUserSettingsTab /> 3pids should display 3pid email addresses an
>
<input
autocomplete="email"
id="mx_Field_3"
id="mx_Field_113"
label="Email Address"
placeholder="Email Address"
type="text"
value=""
/>
<label
for="mx_Field_3"
for="mx_Field_113"
>
Email Address
</label>
@@ -154,14 +154,14 @@ exports[`<AccountUserSettingsTab /> 3pids should display 3pid email addresses an
</span>
<input
autocomplete="tel-national"
id="mx_Field_4"
id="mx_Field_114"
label="Phone Number"
placeholder="Phone Number"
type="text"
value=""
/>
<label
for="mx_Field_4"
for="mx_Field_114"
>
Phone Number
</label>