Skip to content

Commit

Permalink
review: Small updates, remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Jan 31, 2025
1 parent d1509b9 commit c263c81
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ describe("UserIdentityWarning", () => {
);
});

describe("Warning are displayed in consistent order", () => {
describe("Warnings are displayed in consistent order", () => {
it("Ensure lexicographic order for prompt", async () => {
// members are not returned lexicographic order
mockMembershipForRoom(room, ["@b:example.org", "@a:example.org"]);
Expand Down Expand Up @@ -340,10 +340,6 @@ describe("UserIdentityWarning", () => {
it("when invited users can see encrypted messages", async () => {
// Nobody in the room yet
mockMembershipForRoom(room, []);
// jest.spyOn(room, "getEncryptionTargetMembers").mockResolvedValue([]);
// jest.spyOn(room, "getMember").mockImplementation((userId) => {
// return null;
// });
jest.spyOn(room, "shouldEncryptForInvitedMembers").mockReturnValue(true);
const crypto = client.getCrypto()!;
jest.spyOn(crypto, "getUserVerificationStatus").mockResolvedValue(
Expand Down Expand Up @@ -613,20 +609,14 @@ describe("UserIdentityWarning", () => {
renderComponent(client, room);
await sleep(10); // give it some time to finish initialising

// jest.spyOn(crypto, "getUserVerificationStatus").mockImplementation(async () => {
act(() => {
// jest.spyOn(crypto, "getUserVerificationStatus").mockResolvedValue(
// new UserVerificationStatus(false, false, false, true),
// );
client.emit(
CryptoEvent.UserTrustStatusChanged,
"@alice:example.org",
new UserVerificationStatus(false, false, false, true),
);
firstStatusPromise.resolve(undefined);
});
// return Promise.resolve(new UserVerificationStatus(false, false, false, false));
// });
await waitFor(() =>
expect(
getWarningByText("Alice's (@alice:example.org) identity appears to have changed."),
Expand Down

0 comments on commit c263c81

Please sign in to comment.