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:
@@ -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"));
|
||||
|
||||
+4
-4
@@ -56,7 +56,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
style="--cpd-icon-button-size: 100%;"
|
||||
>
|
||||
<svg
|
||||
aria-labelledby="_r_13s_"
|
||||
aria-labelledby="_r_14k_"
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -83,7 +83,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
style="--cpd-icon-button-size: 100%;"
|
||||
>
|
||||
<svg
|
||||
aria-labelledby="_r_141_"
|
||||
aria-labelledby="_r_14p_"
|
||||
fill="currentColor"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
@@ -98,7 +98,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
</button>
|
||||
<button
|
||||
aria-label="Threads"
|
||||
aria-labelledby="_r_146_"
|
||||
aria-labelledby="_r_14u_"
|
||||
class="_icon-button_1215g_8"
|
||||
data-kind="primary"
|
||||
role="button"
|
||||
@@ -125,7 +125,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
</button>
|
||||
<button
|
||||
aria-label="Room info"
|
||||
aria-labelledby="_r_14b_"
|
||||
aria-labelledby="_r_153_"
|
||||
class="_icon-button_1215g_8"
|
||||
data-kind="primary"
|
||||
role="button"
|
||||
|
||||
Reference in New Issue
Block a user