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:
co-authored by
t3chguy
Florian Duros
parent
2128c1884c
commit
8a38a2fe4a
@@ -1086,10 +1086,10 @@ describe("<MatrixChat />", () => {
|
||||
getComponent();
|
||||
|
||||
// Then we are asked to verify our device
|
||||
await screen.findByRole("heading", { name: "Confirm your identity", level: 2 });
|
||||
await screen.findByRole("heading", { name: "Confirm your digital identity", level: 2 });
|
||||
|
||||
// Sanity: we are not racing with another screen update, so this heading stays visible
|
||||
await screen.findByRole("heading", { name: "Confirm your identity", level: 2 });
|
||||
await screen.findByRole("heading", { name: "Confirm your digital identity", level: 2 });
|
||||
});
|
||||
it("should not open app after cancelling device verify if unskippable verification is on", async () => {
|
||||
// See https://github.com/element-hq/element-web/issues/29230
|
||||
@@ -1106,7 +1106,7 @@ describe("<MatrixChat />", () => {
|
||||
getComponent();
|
||||
|
||||
// When we click "Use another device"
|
||||
await screen.findByRole("heading", { name: "Confirm your identity", level: 2 });
|
||||
await screen.findByRole("heading", { name: "Confirm your digital identity", level: 2 });
|
||||
const verify = screen.getByRole("button", { name: "Use another device" });
|
||||
act(() => verify.click());
|
||||
|
||||
@@ -1115,7 +1115,7 @@ describe("<MatrixChat />", () => {
|
||||
act(() => closeButton.click());
|
||||
|
||||
// Then we are not allowed in - we are still being asked to verify
|
||||
await screen.findByRole("heading", { name: "Confirm your identity", level: 2 });
|
||||
await screen.findByRole("heading", { name: "Confirm your digital identity", level: 2 });
|
||||
});
|
||||
|
||||
describe("when query params have a loginToken", () => {
|
||||
@@ -1160,7 +1160,7 @@ describe("<MatrixChat />", () => {
|
||||
);
|
||||
|
||||
// Then we are not allowed in - we are being asked to verify
|
||||
await screen.findByRole("heading", { name: "Confirm your identity", level: 2 });
|
||||
await screen.findByRole("heading", { name: "Confirm your digital identity", level: 2 });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1382,7 +1382,7 @@ describe("<MatrixChat />", () => {
|
||||
await getComponentAndLogin();
|
||||
|
||||
// Complete security begin screen is rendered
|
||||
await screen.findByText("Confirm your identity");
|
||||
await screen.findByText("Confirm your digital identity");
|
||||
|
||||
expect(loginClient.getCrypto()!.userHasCrossSigningKeys).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -53,7 +53,7 @@ describe("<UserMenu>", () => {
|
||||
|
||||
const spy = jest.spyOn(defaultDispatcher, "dispatch");
|
||||
screen.getByRole("button", { name: /User menu/i }).click();
|
||||
(await screen.findByRole("menuitem", { name: /Sign out/i })).click();
|
||||
(await screen.findByRole("menuitem", { name: /Remove this device/i })).click();
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalledWith({ action: "logout" });
|
||||
});
|
||||
@@ -77,7 +77,7 @@ describe("<UserMenu>", () => {
|
||||
|
||||
const spy = jest.spyOn(defaultDispatcher, "dispatch");
|
||||
screen.getByRole("button", { name: /User menu/i }).click();
|
||||
(await screen.findByRole("menuitem", { name: /Sign out/i })).click();
|
||||
(await screen.findByRole("menuitem", { name: /Remove this device/i })).click();
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalledWith({ action: "logout" });
|
||||
});
|
||||
@@ -103,7 +103,7 @@ describe("<UserMenu>", () => {
|
||||
|
||||
const spy = jest.spyOn(Modal, "createDialog");
|
||||
screen.getByRole("button", { name: /User menu/i }).click();
|
||||
(await screen.findByRole("menuitem", { name: /Sign out/i })).click();
|
||||
(await screen.findByRole("menuitem", { name: /Remove this device/i })).click();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(spy).toHaveBeenCalledWith(LogoutDialog);
|
||||
|
||||
@@ -92,7 +92,7 @@ describe("CompleteSecurity", () => {
|
||||
await act(async () => panel.getByRole("button", { name: "Can't confirm?" }).click());
|
||||
|
||||
// Then the reset identity dialog appears
|
||||
expect(screen.getByRole("heading", { name: "You need to reset your identity" })).toBeInTheDocument();
|
||||
expect(screen.getByRole("heading", { name: "You need to reset your digital identity" })).toBeInTheDocument();
|
||||
expect(panel.getByRole("button", { name: "Continue" })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -117,7 +117,7 @@ describe("CompleteSecurity", () => {
|
||||
// Then the reset identity dialog appears, and should have a different
|
||||
// title from when there were no verification methods available.
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Are you sure you want to reset your identity?" }),
|
||||
screen.getByRole("heading", { name: "Are you sure you want to reset your digital identity?" }),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
@@ -142,7 +142,7 @@ describe("CompleteSecurity", () => {
|
||||
// Then the reset identity dialog appears, and should have a different
|
||||
// title from when there were no verification methods available.
|
||||
expect(
|
||||
screen.getByRole("heading", { name: "Are you sure you want to reset your identity?" }),
|
||||
screen.getByRole("heading", { name: "Are you sure you want to reset your digital identity?" }),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -367,16 +367,16 @@ describe("<ForgotPassword>", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("and clicking »Sign out of all devices« and »Reset password«", () => {
|
||||
describe("and clicking »Remove other devices« and »Reset password«", () => {
|
||||
beforeEach(async () => {
|
||||
await click(screen.getByText("Sign out of all devices"));
|
||||
await click(screen.getByText("Remove other devices"));
|
||||
await click(screen.getByText("Reset password"));
|
||||
});
|
||||
|
||||
it("should show the sign out warning dialog", async () => {
|
||||
it("should show the removing warning dialog", async () => {
|
||||
await expect(
|
||||
screen.findByText(
|
||||
"Signing out your devices will delete the message encryption keys stored on them, making encrypted chat history unreadable.",
|
||||
"Removing your devices will delete the message encryption keys stored on them, making encrypted chat history unreadable.",
|
||||
),
|
||||
).resolves.toBeInTheDocument();
|
||||
|
||||
|
||||
+4
-4
@@ -71,7 +71,7 @@ exports[`CompleteSecurity Allows verifying with another device if one is availab
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Confirm your identity
|
||||
Confirm your digital identity
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
@@ -146,7 +146,7 @@ exports[`CompleteSecurity Allows verifying with another device if one is availab
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
Sign out
|
||||
Remove this device
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -263,7 +263,7 @@ exports[`CompleteSecurity Allows verifying with recovery key if one is available
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Confirm your identity
|
||||
Confirm your digital identity
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
@@ -327,7 +327,7 @@ exports[`CompleteSecurity Allows verifying with recovery key if one is available
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
Sign out
|
||||
Remove this device
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+3
-3
@@ -136,9 +136,9 @@ describe("useUserInfoHeaderViewModel", () => {
|
||||
danger: true,
|
||||
description: (
|
||||
<div>
|
||||
Deactivating this user will log them out and prevent them from logging back in. Additionally,
|
||||
they will leave all the rooms they are in. This action cannot be reversed. Are you sure you want
|
||||
to deactivate this user?
|
||||
Deactivating this user will remove their devices and prevent them from logging back in.
|
||||
Additionally, they will leave all the rooms they are in. This action cannot be reversed. Are you
|
||||
sure you want to deactivate this user?
|
||||
</div>
|
||||
),
|
||||
title: "Deactivate user?",
|
||||
|
||||
+2
-2
@@ -63,10 +63,10 @@ exports[`<MasUnlockCrossSigningAuthEntry/> should render 1`] = `
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Go to your account to reset your identity
|
||||
Go to your account to reset your digital identity
|
||||
</h2>
|
||||
<span>
|
||||
You're about to go to your matrix.org account to reset your identity. Once you have completed reset on your account, please return here and click Retry.
|
||||
You're about to go to your matrix.org account to reset your digital identity. Once you have completed reset on your account, please return here and click Retry.
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -41,7 +41,7 @@ describe("LogoutDialog", () => {
|
||||
it("shows a regular dialog when crypto is disabled", async () => {
|
||||
mocked(mockClient.getCrypto).mockReturnValue(undefined);
|
||||
const rendered = renderComponent();
|
||||
await rendered.findByText("Are you sure you want to sign out?");
|
||||
await rendered.findByText("Are you sure you want to remove this device?");
|
||||
expect(rendered.container).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -49,7 +49,7 @@ describe("LogoutDialog", () => {
|
||||
mockCrypto.getActiveSessionBackupVersion.mockResolvedValue("1");
|
||||
mockCrypto.isSecretStorageReady.mockResolvedValue(true);
|
||||
const rendered = renderComponent();
|
||||
await rendered.findByText("Are you sure you want to sign out?");
|
||||
await rendered.findByText("Are you sure you want to remove this device?");
|
||||
});
|
||||
|
||||
it("prompts user to set up recovery if backups are enabled but recovery isn't", async () => {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ exports[`ConfirmKeyStorageOffDialog renders 1`] = `
|
||||
</h2>
|
||||
</div>
|
||||
<span>
|
||||
If you sign out of all your devices you will lose your message history and will need to verify all your existing contacts again.
|
||||
If you remove all your devices you will lose your message history and will need to verify all your existing contacts again.
|
||||
<br />
|
||||
<a
|
||||
href="https://element.io/help#encryption5"
|
||||
|
||||
+7
-7
@@ -35,10 +35,10 @@ exports[`LogoutDialog Prompts user to go to settings if there is a backup on the
|
||||
Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.
|
||||
</p>
|
||||
<p>
|
||||
When you sign out, these keys will be deleted from this device, which means you won't be able to read encrypted messages unless you have the keys for them on your other devices, or backed them up to the server.
|
||||
When you remove this device you won't be able to read encrypted messages unless you have the keys for them on your other devices, or backed them up to the server.
|
||||
</p>
|
||||
<p>
|
||||
Back up your keys before signing out to avoid losing them.
|
||||
Back up your keys before removing this device to avoid losing them.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -136,10 +136,10 @@ exports[`LogoutDialog Prompts user to go to settings if there is no backup on th
|
||||
Encrypted messages are secured with end-to-end encryption. Only you and the recipient(s) have the keys to read these messages.
|
||||
</p>
|
||||
<p>
|
||||
When you sign out, these keys will be deleted from this device, which means you won't be able to read encrypted messages unless you have the keys for them on your other devices, or backed them up to the server.
|
||||
When you remove this device you won't be able to read encrypted messages unless you have the keys for them on your other devices, or backed them up to the server.
|
||||
</p>
|
||||
<p>
|
||||
Back up your keys before signing out to avoid losing them.
|
||||
Back up your keys before removing this device to avoid losing them.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -224,14 +224,14 @@ exports[`LogoutDialog shows a regular dialog when crypto is disabled 1`] = `
|
||||
class="mx_Heading_h3 mx_Dialog_title"
|
||||
id="mx_BaseDialog_title"
|
||||
>
|
||||
Sign out
|
||||
Remove this device
|
||||
</h1>
|
||||
</div>
|
||||
<div
|
||||
class="mx_Dialog_content"
|
||||
id="mx_Dialog_content"
|
||||
>
|
||||
Are you sure you want to sign out?
|
||||
Are you sure you want to remove this device?
|
||||
</div>
|
||||
<div
|
||||
class="mx_Dialog_buttons"
|
||||
@@ -250,7 +250,7 @@ exports[`LogoutDialog shows a regular dialog when crypto is disabled 1`] = `
|
||||
data-testid="dialog-primary-button"
|
||||
type="button"
|
||||
>
|
||||
Sign out
|
||||
Remove this device
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -309,7 +309,7 @@ describe("EventTile", () => {
|
||||
],
|
||||
[EventShieldReason.MISMATCHED_SENDER_KEY, "Encrypted by an unverified session"],
|
||||
[EventShieldReason.SENT_IN_CLEAR, "Not encrypted"],
|
||||
[EventShieldReason.VERIFICATION_VIOLATION, "Sender's verified identity was reset"],
|
||||
[EventShieldReason.VERIFICATION_VIOLATION, "Sender's verified digital identity was reset"],
|
||||
[
|
||||
EventShieldReason.MISMATCHED_SENDER,
|
||||
"The sender of the event does not match the owner of the device that sent it.",
|
||||
|
||||
@@ -145,7 +145,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
await userEvent.click(screen.getByRole("button")!);
|
||||
await waitFor(() => expect(crypto.pinCurrentUserIdentity).toHaveBeenCalledWith("@alice:example.org"));
|
||||
@@ -166,7 +166,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
expect(
|
||||
@@ -190,7 +190,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
await sleep(10); // give it some time to finish initialising
|
||||
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) identity was reset.")).toThrow();
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toThrow();
|
||||
});
|
||||
|
||||
// We don't display warnings in non-encrypted rooms, but if encryption is
|
||||
@@ -210,7 +210,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
|
||||
await sleep(10); // give it some time to finish initialising
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) identity was reset.")).toThrow();
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toThrow();
|
||||
|
||||
// Encryption gets enabled in the room. We should now warn that Alice's
|
||||
// identity changed.
|
||||
@@ -231,7 +231,7 @@ describe("UserIdentityWarning", () => {
|
||||
null,
|
||||
);
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -250,7 +250,9 @@ describe("UserIdentityWarning", () => {
|
||||
crypto.pinCurrentUserIdentity = jest.fn();
|
||||
renderComponent(client, room);
|
||||
|
||||
await waitFor(() => expect(getWarningByText("@a:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@a:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
|
||||
it("Ensure existing prompt stays even if a new violation with lower lexicographic order detected", async () => {
|
||||
@@ -266,7 +268,9 @@ describe("UserIdentityWarning", () => {
|
||||
crypto.pinCurrentUserIdentity = jest.fn();
|
||||
renderComponent(client, room);
|
||||
|
||||
await waitFor(() => expect(getWarningByText("@b:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@b:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Simulate a new member joined with lower lexico order and also in violation
|
||||
mockMembershipForRoom(room, ["@a:example.org", "@b:example.org"]);
|
||||
@@ -276,7 +280,9 @@ describe("UserIdentityWarning", () => {
|
||||
});
|
||||
|
||||
// We should still display the warning for @b:example.org
|
||||
await waitFor(() => expect(getWarningByText("@b:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@b:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -296,7 +302,7 @@ describe("UserIdentityWarning", () => {
|
||||
await sleep(50);
|
||||
});
|
||||
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) identity was reset.")).toThrow();
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toThrow();
|
||||
|
||||
// The user changes their identity, so we should show the warning.
|
||||
act(() => {
|
||||
@@ -306,7 +312,7 @@ describe("UserIdentityWarning", () => {
|
||||
});
|
||||
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Simulate the user's new identity having been approved, so we no
|
||||
@@ -317,7 +323,7 @@ describe("UserIdentityWarning", () => {
|
||||
client.emit(CryptoEvent.UserTrustStatusChanged, "@alice:example.org", newStatus);
|
||||
});
|
||||
await waitFor(() =>
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) identity was reset.")).toThrow(),
|
||||
expect(() => getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toThrow(),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -342,7 +348,7 @@ describe("UserIdentityWarning", () => {
|
||||
});
|
||||
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@alice:example.org's identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("@alice:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Bob is invited. His identity needs approval, so we should show a
|
||||
@@ -359,8 +365,12 @@ describe("UserIdentityWarning", () => {
|
||||
emitMembershipChange(client, "@alice:example.org", "leave");
|
||||
});
|
||||
|
||||
await waitFor(() => expect(() => getWarningByText("@alice:example.org's identity was reset.")).toThrow());
|
||||
await waitFor(() => expect(getWarningByText("@bob:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(() => getWarningByText("@alice:example.org's digital identity was reset.")).toThrow(),
|
||||
);
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@bob:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
|
||||
it("when invited users cannot see encrypted messages", async () => {
|
||||
@@ -382,7 +392,7 @@ describe("UserIdentityWarning", () => {
|
||||
emitMembershipChange(client, "@alice:example.org", "join");
|
||||
});
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@alice:example.org's identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("@alice:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Bob is invited. His identity needs approval, but we don't encrypt
|
||||
@@ -402,8 +412,12 @@ describe("UserIdentityWarning", () => {
|
||||
mockMembershipForRoom(room, [["@bob:example.org", "invited"]]);
|
||||
emitMembershipChange(client, "@alice:example.org", "leave");
|
||||
});
|
||||
await waitFor(() => expect(() => getWarningByText("@alice:example.org's identity was reset.")).toThrow());
|
||||
await waitFor(() => expect(() => getWarningByText("@bob:example.org's identity was reset.")).toThrow());
|
||||
await waitFor(() =>
|
||||
expect(() => getWarningByText("@alice:example.org's digital identity was reset.")).toThrow(),
|
||||
);
|
||||
await waitFor(() =>
|
||||
expect(() => getWarningByText("@bob:example.org's digital identity was reset.")).toThrow(),
|
||||
);
|
||||
});
|
||||
|
||||
it("when member leaves immediately after component is loaded", async () => {
|
||||
@@ -427,7 +441,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
await sleep(10);
|
||||
});
|
||||
expect(() => getWarningByText("@alice:example.org's identity was reset.")).toThrow();
|
||||
expect(() => getWarningByText("@alice:example.org's digital identity was reset.")).toThrow();
|
||||
});
|
||||
|
||||
it("when member leaves immediately after joining", async () => {
|
||||
@@ -475,7 +489,7 @@ describe("UserIdentityWarning", () => {
|
||||
null,
|
||||
);
|
||||
await sleep(10); // give it some time to finish
|
||||
expect(() => getWarningByText("@alice:example.org's identity was reset.")).toThrow();
|
||||
expect(() => getWarningByText("@alice:example.org's digital identity was reset.")).toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -495,7 +509,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
// We should warn about Alice's identity first.
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Simulate Alice's new identity having been approved, so now we warn
|
||||
@@ -511,7 +525,9 @@ describe("UserIdentityWarning", () => {
|
||||
});
|
||||
client.emit(CryptoEvent.UserTrustStatusChanged, "@alice:example.org", newStatus);
|
||||
});
|
||||
await waitFor(() => expect(getWarningByText("@bob:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@bob:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
|
||||
it("displays the next user when the verification requirement is withdrawn", async () => {
|
||||
@@ -531,7 +547,7 @@ describe("UserIdentityWarning", () => {
|
||||
renderComponent(client, room);
|
||||
// We should warn about Alice's identity first.
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("Alice's (@alice:example.org) identity was reset.")).toBeInTheDocument(),
|
||||
expect(getWarningByText("Alice's (@alice:example.org) digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
|
||||
// Simulate Alice's new identity having been approved, so now we warn
|
||||
@@ -550,6 +566,8 @@ describe("UserIdentityWarning", () => {
|
||||
new UserVerificationStatus(false, false, false, false),
|
||||
);
|
||||
});
|
||||
await waitFor(() => expect(getWarningByText("@bob:example.org's identity was reset.")).toBeInTheDocument());
|
||||
await waitFor(() =>
|
||||
expect(getWarningByText("@bob:example.org's digital identity was reset.")).toBeInTheDocument(),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -221,7 +221,7 @@ describe("ProfileSettings", () => {
|
||||
it("signs out directly if no rooms are encrypted", async () => {
|
||||
renderProfileSettings(toastRack, client);
|
||||
|
||||
const signOutButton = await screen.findByText("Sign out");
|
||||
const signOutButton = await screen.findByText("Remove this device");
|
||||
await userEvent.click(signOutButton);
|
||||
|
||||
expect(dis.dispatch).toHaveBeenCalledWith({ action: "logout" });
|
||||
@@ -238,7 +238,7 @@ describe("ProfileSettings", () => {
|
||||
|
||||
renderProfileSettings(toastRack, client);
|
||||
|
||||
const signOutButton = await screen.findByText("Sign out");
|
||||
const signOutButton = await screen.findByText("Remove this device");
|
||||
await userEvent.click(signOutButton);
|
||||
|
||||
expect(Modal.createDialog).toHaveBeenCalled();
|
||||
|
||||
+1
-1
@@ -120,7 +120,7 @@ HTMLCollection [
|
||||
<span
|
||||
class="mx_DeviceDetails_signOutButtonContent"
|
||||
>
|
||||
Sign out of this session
|
||||
Remove this session
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
+5
-5
@@ -110,7 +110,7 @@ exports[`<DeviceDetails /> renders a verified device 1`] = `
|
||||
<span
|
||||
class="mx_DeviceDetails_signOutButtonContent"
|
||||
>
|
||||
Sign out of this session
|
||||
Remove this session
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
@@ -174,7 +174,7 @@ exports[`<DeviceDetails /> renders device with metadata 1`] = `
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify or sign out from this session for best security and reliability.
|
||||
Verify or remove this session for best security and reliability.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -326,7 +326,7 @@ exports[`<DeviceDetails /> renders device with metadata 1`] = `
|
||||
<span
|
||||
class="mx_DeviceDetails_signOutButtonContent"
|
||||
>
|
||||
Sign out of this session
|
||||
Remove this session
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
@@ -390,7 +390,7 @@ exports[`<DeviceDetails /> renders device without metadata 1`] = `
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify or sign out from this session for best security and reliability.
|
||||
Verify or remove this session for best security and reliability.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -442,7 +442,7 @@ exports[`<DeviceDetails /> renders device without metadata 1`] = `
|
||||
<span
|
||||
class="mx_DeviceDetails_signOutButtonContent"
|
||||
>
|
||||
Sign out of this session
|
||||
Remove this session
|
||||
</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ exports[`<DeviceVerificationStatusCard /> renders an unverified device 1`] = `
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify or sign out from this session for best security and reliability.
|
||||
Verify or remove this session for best security and reliability.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ HTMLCollection [
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
<span>
|
||||
Consider signing out from old sessions (90 days or older) you don't use anymore.
|
||||
Consider removing old sessions (90 days or older) you don't use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -89,7 +89,7 @@ HTMLCollection [
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
<span>
|
||||
Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.
|
||||
Verify your sessions for enhanced secure messaging or remove from those you don't recognize or use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -142,7 +142,7 @@ HTMLCollection [
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
<span>
|
||||
For best security, sign out from any session that you don't recognize or use anymore.
|
||||
For best security, remove any session that you don't recognize or use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
|
||||
+6
-6
@@ -56,7 +56,7 @@ exports[`<SecurityRecommendations /> renders both cards when user has both unver
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.
|
||||
Verify your sessions for enhanced secure messaging or remove from those you don't recognize or use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -104,7 +104,7 @@ exports[`<SecurityRecommendations /> renders both cards when user has both unver
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Consider signing out from old sessions (90 days or older) you don't use anymore.
|
||||
Consider removing old sessions (90 days or older) you don't use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -188,7 +188,7 @@ exports[`<SecurityRecommendations /> renders inactive devices section when user
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.
|
||||
Verify your sessions for enhanced secure messaging or remove from those you don't recognize or use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -236,7 +236,7 @@ exports[`<SecurityRecommendations /> renders inactive devices section when user
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Consider signing out from old sessions (90 days or older) you don't use anymore.
|
||||
Consider removing old sessions (90 days or older) you don't use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -320,7 +320,7 @@ exports[`<SecurityRecommendations /> renders unverified devices section when use
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Verify your sessions for enhanced secure messaging or sign out from those you don't recognize or use anymore.
|
||||
Verify your sessions for enhanced secure messaging or remove from those you don't recognize or use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
@@ -368,7 +368,7 @@ exports[`<SecurityRecommendations /> renders unverified devices section when use
|
||||
<p
|
||||
class="mx_DeviceSecurityCard_description"
|
||||
>
|
||||
Consider signing out from old sessions (90 days or older) you don't use anymore.
|
||||
Consider removing old sessions (90 days or older) you don't use anymore.
|
||||
<div
|
||||
class="mx_AccessibleButton mx_LearnMore_button mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link_inline"
|
||||
role="button"
|
||||
|
||||
+8
-8
@@ -4,30 +4,30 @@ exports[`deleteDevices() opens interactive auth dialog when delete fails with 40
|
||||
{
|
||||
"m.login.sso": {
|
||||
"1": {
|
||||
"body": "Confirm logging out these devices by using Single Sign On to prove your identity.",
|
||||
"body": "Confirm removing these devices by using Single Sign On to prove your identity.",
|
||||
"continueKind": "primary",
|
||||
"continueText": "Single Sign On",
|
||||
"title": "Use Single Sign On to continue",
|
||||
},
|
||||
"2": {
|
||||
"body": "Click the button below to confirm signing out these devices.",
|
||||
"body": "Click the button below to confirm removing these devices.",
|
||||
"continueKind": "danger",
|
||||
"continueText": "Sign out devices",
|
||||
"title": "Confirm signing out these devices",
|
||||
"continueText": "Remove devices",
|
||||
"title": "Confirm removing these devices",
|
||||
},
|
||||
},
|
||||
"org.matrix.login.sso": {
|
||||
"1": {
|
||||
"body": "Confirm logging out these devices by using Single Sign On to prove your identity.",
|
||||
"body": "Confirm removing these devices by using Single Sign On to prove your identity.",
|
||||
"continueKind": "primary",
|
||||
"continueText": "Single Sign On",
|
||||
"title": "Use Single Sign On to continue",
|
||||
},
|
||||
"2": {
|
||||
"body": "Click the button below to confirm signing out these devices.",
|
||||
"body": "Click the button below to confirm removing these devices.",
|
||||
"continueKind": "danger",
|
||||
"continueText": "Sign out devices",
|
||||
"title": "Confirm signing out these devices",
|
||||
"continueText": "Remove devices",
|
||||
"title": "Confirm removing these devices",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
+2
-2
@@ -42,10 +42,10 @@ describe("<RecoveryPanel />", () => {
|
||||
const onChangeRecoveryKeyClick = jest.fn();
|
||||
const { asFragment } = renderRecoverPanel(onChangeRecoveryKeyClick);
|
||||
|
||||
await waitFor(() => screen.getByRole("button", { name: "Set up recovery" }));
|
||||
await waitFor(() => screen.getByRole("button", { name: "Get recovery key" }));
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
|
||||
await user.click(screen.getByRole("button", { name: "Set up recovery" }));
|
||||
await user.click(screen.getByRole("button", { name: "Get recovery key" }));
|
||||
expect(onChangeRecoveryKeyClick).toHaveBeenCalledWith(true);
|
||||
});
|
||||
|
||||
|
||||
+5
-5
@@ -212,7 +212,7 @@ exports[`<ChangeRecoveryKey /> flow to set up a recovery key should ask the user
|
||||
aria-current="page"
|
||||
class="_last-page_1xygz_30"
|
||||
>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -371,7 +371,7 @@ exports[`<ChangeRecoveryKey /> flow to set up a recovery key should ask the user
|
||||
aria-current="page"
|
||||
class="_last-page_1xygz_30"
|
||||
>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -552,7 +552,7 @@ exports[`<ChangeRecoveryKey /> flow to set up a recovery key should display info
|
||||
aria-current="page"
|
||||
class="_last-page_1xygz_30"
|
||||
>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
@@ -582,7 +582,7 @@ exports[`<ChangeRecoveryKey /> flow to set up a recovery key should display info
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</h2>
|
||||
<span>
|
||||
Your key storage is protected by a recovery key. If you need a new recovery key after setup, you can recreate it by selecting ‘Change recovery key’.
|
||||
@@ -669,7 +669,7 @@ exports[`<ChangeRecoveryKey /> flow to set up a recovery key should display the
|
||||
aria-current="page"
|
||||
class="_last-page_1xygz_30"
|
||||
>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</span>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ exports[`<DeleteKeyStoragePanel /> should match snapshot 1`] = `
|
||||
d="M6.293 6.293a1 1 0 0 1 1.414 0L12 10.586l4.293-4.293a1 1 0 1 1 1.414 1.414L13.414 12l4.293 4.293a1 1 0 0 1-1.414 1.414L12 13.414l-4.293 4.293a1 1 0 0 1-1.414-1.414L10.586 12 6.293 7.707a1 1 0 0 1 0-1.414"
|
||||
/>
|
||||
</svg>
|
||||
You will lose access to your encrypted messages if you are signed out of Element everywhere
|
||||
You will lose access to your encrypted messages if you're not signed in to any devices
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -12,9 +12,9 @@ exports[`<RecoveryPanel /> should allow to change the recovery key when everythi
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93 mx_SettingsHeader"
|
||||
>
|
||||
Recovery
|
||||
Backup
|
||||
</h2>
|
||||
Recover your cryptographic identity and message history with a recovery key if you’ve 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.
|
||||
</div>
|
||||
<button
|
||||
class="_button_13vu4_8 _has-icon_13vu4_60"
|
||||
@@ -53,9 +53,9 @@ exports[`<RecoveryPanel /> should ask to set up a recovery key when there is no
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93 mx_SettingsHeader mx_SettingsHeader_recommended"
|
||||
>
|
||||
Recovery
|
||||
Backup
|
||||
</h2>
|
||||
Recover your cryptographic identity and message history with a recovery key if you’ve 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.
|
||||
</div>
|
||||
<button
|
||||
class="_button_13vu4_8 _has-icon_13vu4_60"
|
||||
@@ -76,7 +76,7 @@ exports[`<RecoveryPanel /> should ask to set up a recovery key when there is no
|
||||
d="M7 14q-.824 0-1.412-.588A1.93 1.93 0 0 1 5 12q0-.825.588-1.412A1.93 1.93 0 0 1 7 10q.824 0 1.412.588Q9 11.175 9 12t-.588 1.412A1.93 1.93 0 0 1 7 14m0 4q-2.5 0-4.25-1.75T1 12t1.75-4.25T7 6q1.676 0 3.037.825A6.2 6.2 0 0 1 12.2 9h8.375q.2 0 .387.075.188.075.338.225l2 2q.15.15.212.325.063.175.063.375t-.062.375a.9.9 0 0 1-.213.325l-3.175 3.175a1 1 0 0 1-.3.2q-.175.075-.35.1a.8.8 0 0 1-.35-.025.9.9 0 0 1-.325-.175L17.5 15l-1.425 1.075a.95.95 0 0 1-.887.15.9.9 0 0 1-.288-.15L13.375 15H12.2a6.2 6.2 0 0 1-2.162 2.175Q8.675 18 7 18m0-2q1.4 0 2.463-.85A4.03 4.03 0 0 0 10.875 13H14l1.45 1.025L17.5 12.5l1.775 1.375L21.15 12l-1-1h-9.275a4.03 4.03 0 0 0-1.412-2.15Q8.4 8 7 8 5.35 8 4.175 9.175T3 12t1.175 2.825T7 16"
|
||||
/>
|
||||
</svg>
|
||||
Set up recovery
|
||||
Get recovery key
|
||||
</button>
|
||||
</div>
|
||||
</DocumentFragment>
|
||||
@@ -94,9 +94,9 @@ exports[`<RecoveryPanel /> should be in loading state when checking the recovery
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93 mx_SettingsHeader"
|
||||
>
|
||||
Recovery
|
||||
Backup
|
||||
</h2>
|
||||
Recover your cryptographic identity and message history with a recovery key if you’ve 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.
|
||||
</div>
|
||||
<svg
|
||||
aria-label="Loading…"
|
||||
|
||||
+2
-2
@@ -12,12 +12,12 @@ exports[`<RecoveyPanelOutOfSync /> should render 1`] = `
|
||||
<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 you’ve 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"
|
||||
>
|
||||
|
||||
+4
-4
@@ -80,7 +80,7 @@ exports[`<ResetIdentityPanel /> should display the 'forgot recovery key' variant
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Forgot your recovery key? You’ll need to reset your identity.
|
||||
Forgot your recovery key? You’ll need to reset your digital identity.
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
@@ -263,7 +263,7 @@ exports[`<ResetIdentityPanel /> should display the 'sync failed' variant correct
|
||||
<h2
|
||||
class="_typography_6v6n8_153 _font-heading-sm-semibold_6v6n8_93"
|
||||
>
|
||||
Failed to sync key storage. You need to reset your identity.
|
||||
Failed to sync key storage. You need to reset your digital identity.
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
@@ -446,7 +446,7 @@ exports[`<ResetIdentityPanel /> should reset the encryption when the continue bu
|
||||
<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
|
||||
@@ -632,7 +632,7 @@ exports[`<ResetIdentityPanel /> should reset the encryption when the continue bu
|
||||
<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
|
||||
|
||||
+15
-11
@@ -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? You’ll need to reset your identity." }),
|
||||
screen.getByRole("heading", {
|
||||
name: "Forgot your recovery key? You’ll 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? You’ll need to reset your identity.",
|
||||
name: "Forgot your recovery key? You’ll 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? You’ll need to reset your identity." }),
|
||||
screen.getByRole("heading", {
|
||||
name: "Forgot your recovery key? You’ll 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();
|
||||
});
|
||||
});
|
||||
|
||||
+7
-7
@@ -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);
|
||||
|
||||
|
||||
+4
-4
@@ -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 you’ve 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
|
||||
|
||||
+2
-2
@@ -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>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user