mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-06 22:48:21 +00:00
Promote "Share encrypted history" from labs (#33281)
* Promote "Share encrypted history" from labs * fix lint * Update labs.md * update snapshots * Update unit tests * update playwright screenshot
This commit is contained in:
committed by
GitHub
parent
c02b970d35
commit
c4638d1773
@@ -60,7 +60,6 @@ import WidgetStore, { type IApp } from "../../../../../../src/stores/WidgetStore
|
||||
import { UIFeature } from "../../../../../../src/settings/UIFeature";
|
||||
import { SettingLevel } from "../../../../../../src/settings/SettingLevel";
|
||||
import { ElementCallMemberEventType } from "../../../../../../src/call-types";
|
||||
import { defaultWatchManager } from "../../../../../../src/settings/Settings.tsx";
|
||||
|
||||
jest.mock("../../../../../../src/utils/ShieldUtils");
|
||||
jest.mock("../../../../../../src/hooks/right-panel/useCurrentPhase", () => ({
|
||||
@@ -723,25 +722,9 @@ describe("RoomHeader", () => {
|
||||
],
|
||||
{ addToState: true },
|
||||
);
|
||||
let featureEnabled = true;
|
||||
jest.spyOn(SettingsStore, "getValue").mockImplementation(
|
||||
(flag) => flag === "feature_share_history_on_invite" && featureEnabled,
|
||||
);
|
||||
|
||||
render(<RoomHeader room={room} />, getWrapper());
|
||||
await waitFor(() => getByLabelText(document.body, "New members see history"));
|
||||
|
||||
// Disable the labs flag and check the icon disappears
|
||||
featureEnabled = false;
|
||||
act(() =>
|
||||
defaultWatchManager.notifyUpdate(
|
||||
"feature_share_history_on_invite",
|
||||
null,
|
||||
SettingLevel.DEVICE,
|
||||
featureEnabled,
|
||||
),
|
||||
);
|
||||
expect(queryByLabelText(document.body, "New members see history")).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("shows a user icon if the room is encrypted and has world readable history", async () => {
|
||||
@@ -758,10 +741,6 @@ describe("RoomHeader", () => {
|
||||
],
|
||||
{ addToState: true },
|
||||
);
|
||||
const featureEnabled = true;
|
||||
jest.spyOn(SettingsStore, "getValue").mockImplementation(
|
||||
(flag) => flag === "feature_share_history_on_invite" && featureEnabled,
|
||||
);
|
||||
|
||||
render(<RoomHeader room={room} />, getWrapper());
|
||||
await waitFor(() => getByLabelText(document.body, "Anyone can see history"));
|
||||
|
||||
Reference in New Issue
Block a user