Localazy Download (#32808)

* [create-pull-request] automated change

* test: update SC tests

* test: update SC screenshots

* test: update EW snapshots

* test: update EW tests

* test: update EW e2e tests

---------

Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
This commit is contained in:
ElementRobot
2026-03-18 15:53:28 +00:00
committed by GitHub
co-authored by t3chguy Florian Duros
parent 2128c1884c
commit 8a38a2fe4a
105 changed files with 535 additions and 836 deletions
@@ -71,7 +71,7 @@ describe("<EncryptionUserSettingsTab />", () => {
it("should display the recovery panel when key storage is enabled", async () => {
jest.spyOn(matrixClient.getCrypto()!, "getActiveSessionBackupVersion").mockResolvedValue("1");
renderComponent();
await waitFor(() => expect(screen.getByText("Recovery")).toBeInTheDocument());
await waitFor(() => expect(screen.getByText("Backup")).toBeInTheDocument());
});
it("should not display the recovery panel when key storage is not enabled", async () => {
@@ -92,7 +92,9 @@ describe("<EncryptionUserSettingsTab />", () => {
await user.click(screen.getByRole("button", { name: "Forgot recovery key?" }));
expect(
screen.getByRole("heading", { name: "Forgot your recovery key? Youll need to reset your identity." }),
screen.getByRole("heading", {
name: "Forgot your recovery key? Youll need to reset your digital identity.",
}),
).toBeVisible();
});
@@ -117,11 +119,11 @@ describe("<EncryptionUserSettingsTab />", () => {
const { asFragment } = renderComponent();
await waitFor(() => {
const button = screen.getByRole("button", { name: "Set up recovery" });
const button = screen.getByRole("button", { name: "Get recovery key" });
expect(button).toBeInTheDocument();
user.click(button);
});
await waitFor(() => expect(screen.getByText("Set up recovery")).toBeInTheDocument());
await waitFor(() => expect(screen.getByText("Get recovery key")).toBeInTheDocument());
expect(asFragment()).toMatchSnapshot();
});
@@ -137,7 +139,7 @@ describe("<EncryptionUserSettingsTab />", () => {
user.click(button);
});
await waitFor(() =>
expect(screen.getByText("Are you sure you want to reset your identity?")).toBeInTheDocument(),
expect(screen.getByText("Are you sure you want to reset your digital identity?")).toBeInTheDocument(),
);
expect(asFragment()).toMatchSnapshot();
});
@@ -149,7 +151,7 @@ describe("<EncryptionUserSettingsTab />", () => {
expect(
await screen.findByRole("heading", {
name: "Forgot your recovery key? Youll need to reset your identity.",
name: "Forgot your recovery key? Youll need to reset your digital identity.",
}),
).toBeVisible();
});
@@ -161,7 +163,7 @@ describe("<EncryptionUserSettingsTab />", () => {
expect(
await screen.findByRole("heading", {
name: "Failed to sync key storage. You need to reset your identity.",
name: "Failed to sync key storage. You need to reset your digital identity.",
}),
).toBeVisible();
});
@@ -171,7 +173,7 @@ describe("<EncryptionUserSettingsTab />", () => {
renderComponent();
await expect(await screen.findByRole("heading", { name: "Recovery" })).toBeVisible();
await expect(await screen.findByRole("heading", { name: "Backup" })).toBeVisible();
jest.spyOn(matrixClient.getCrypto()!, "getActiveSessionBackupVersion").mockResolvedValue(null);
@@ -180,7 +182,7 @@ describe("<EncryptionUserSettingsTab />", () => {
});
await waitFor(() => {
expect(screen.queryByRole("heading", { name: "Recovery" })).toBeNull();
expect(screen.queryByRole("heading", { name: "Backup" })).toBeNull();
});
});
@@ -192,7 +194,9 @@ describe("<EncryptionUserSettingsTab />", () => {
renderComponent({ initialState: "reset_identity_forgot" });
expect(
screen.getByRole("heading", { name: "Forgot your recovery key? Youll need to reset your identity." }),
screen.getByRole("heading", {
name: "Forgot your recovery key? Youll need to reset your digital identity.",
}),
).toBeVisible();
await user.click(screen.getByRole("button", { name: "Back" }));
@@ -211,6 +215,6 @@ describe("<EncryptionUserSettingsTab />", () => {
expect(asFragment()).toMatchSnapshot();
await user.click(screen.getByRole("button", { name: "Continue with reset" }));
expect(screen.getByRole("heading", { name: "You need to reset your identity" })).toBeVisible();
expect(screen.getByRole("heading", { name: "You need to reset your digital identity" })).toBeVisible();
});
});
@@ -806,7 +806,7 @@ describe("<SessionManagerTab />", () => {
});
fireEvent.click(getByTestId("current-session-menu"));
fireEvent.click(getByLabelText("Sign out"));
fireEvent.click(getByLabelText("Remove this device"));
// logout dialog opened
expect(modalSpy).toHaveBeenCalledWith(LogoutDialog, {}, undefined, false, true);
@@ -823,7 +823,7 @@ describe("<SessionManagerTab />", () => {
});
fireEvent.click(getByTestId("current-session-menu"));
expect(queryByLabelText("Sign out of all other sessions")).toBeFalsy();
expect(queryByLabelText("Remove all other sessions")).toBeFalsy();
});
it("signs out of all other devices from current session context menu", async () => {
@@ -837,7 +837,7 @@ describe("<SessionManagerTab />", () => {
});
fireEvent.click(getByTestId("current-session-menu"));
fireEvent.click(getByLabelText("Sign out of all other sessions (2)"));
fireEvent.click(getByLabelText("Remove all other sessions (2)"));
await confirmSignout(getByTestId);
// other devices deleted, excluding current device
@@ -878,7 +878,7 @@ describe("<SessionManagerTab />", () => {
expect(mockClient.deleteAccountData).not.toHaveBeenCalled();
fireEvent.click(getByTestId("current-session-menu"));
fireEvent.click(getByLabelText("Sign out of all other sessions (2)"));
fireEvent.click(getByLabelText("Remove all other sessions (2)"));
await confirmSignout(getByTestId);
// only called once for signed out device with account data event
@@ -1165,7 +1165,7 @@ describe("<SessionManagerTab />", () => {
});
fireEvent.click(getByTestId("other-sessions-menu"));
fireEvent.click(getByLabelText("Sign out of 2 sessions"));
fireEvent.click(getByLabelText("Remove 2 sessions"));
await confirmSignout(getByTestId);
// other devices deleted, excluding current device
@@ -1219,7 +1219,7 @@ describe("<SessionManagerTab />", () => {
});
fireEvent.click(getByTestId("current-session-menu"));
expect(screen.queryByLabelText("Sign out of all other sessions (2)")).not.toBeInTheDocument();
expect(screen.queryByLabelText("Remove all other sessions (2)")).not.toBeInTheDocument();
});
describe("other devices", () => {
@@ -1534,7 +1534,7 @@ describe("<SessionManagerTab />", () => {
expect(isSelectAllChecked(getByTestId)).toBeTruthy();
// sign out of all selected sessions
// Remove of all selected sessions
fireEvent.click(getByTestId("sign-out-selection-cta"));
await confirmSignout(getByTestId);
@@ -118,7 +118,7 @@ exports[`<EncryptionUserSettingsTab /> should display the identity needs reset p
d="M12 17q.424 0 .713-.288A.97.97 0 0 0 13 16a.97.97 0 0 0-.287-.713A.97.97 0 0 0 12 15a.97.97 0 0 0-.713.287A.97.97 0 0 0 11 16q0 .424.287.712.288.288.713.288m0-4q.424 0 .713-.287A.97.97 0 0 0 13 12V8a.97.97 0 0 0-.287-.713A.97.97 0 0 0 12 7a.97.97 0 0 0-.713.287A.97.97 0 0 0 11 8v4q0 .424.287.713.288.287.713.287m0 9a9.7 9.7 0 0 1-3.9-.788 10.1 10.1 0 0 1-3.175-2.137q-1.35-1.35-2.137-3.175A9.7 9.7 0 0 1 2 12q0-2.075.788-3.9a10.1 10.1 0 0 1 2.137-3.175q1.35-1.35 3.175-2.137A9.7 9.7 0 0 1 12 2q2.075 0 3.9.788a10.1 10.1 0 0 1 3.175 2.137q1.35 1.35 2.137 3.175A9.7 9.7 0 0 1 22 12a9.7 9.7 0 0 1-.788 3.9 10.1 10.1 0 0 1-2.137 3.175q-1.35 1.35-3.175 2.137A9.7 9.7 0 0 1 12 22"
/>
</svg>
You have to reset your cryptographic identity in order to ensure access to your message history
You have to reset your digital identity in order to ensure access to your chat history
</span>
</div>
</div>
@@ -158,12 +158,12 @@ exports[`<EncryptionUserSettingsTab /> should display the recovery out of sync p
<h2
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93 mx_SettingsHeader"
>
Recovery
Backup
</h2>
<div
class="mx_SettingsSubheader"
>
Recover your cryptographic identity and message history with a recovery key if youve lost all your existing devices.
Your chats are automatically backed up with end-to-end encryption. To restore this backup and retain your digital identity when you lose access to all your devices, you will need your recovery key.
<span
class="mx_SettingsSubheader_error"
>
@@ -309,7 +309,7 @@ exports[`<EncryptionUserSettingsTab /> should display the reset identity panel w
<h2
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
>
Are you sure you want to reset your identity?
Are you sure you want to reset your digital identity?
</h2>
</div>
<div
@@ -55,7 +55,7 @@ exports[`<SessionManagerTab /> Sign out Signs out of current device 1`] = `
<span
class="mx_DeviceDetails_signOutButtonContent"
>
Sign out of this session
Remove this session
</span>
</div>
`;
@@ -70,7 +70,7 @@ exports[`<SessionManagerTab /> Sign out for an OIDC-aware server Signs out of cu
<span
class="mx_DeviceDetails_signOutButtonContent"
>
Sign out of this session
Remove this session
</span>
</div>
`;