Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit f60ba1c

Browse files
authored
Fix cypress test for events from unsigned devices (#11636)
1 parent d77b871 commit f60ba1c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cypress/e2e/crypto/crypto.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ describe("Cryptography", function () {
404404

405405
cy.get(".mx_EventTile_last")
406406
.should("contain", "test encrypted from unverified")
407-
.find(".mx_EventTile_e2eIcon", { timeout: 100000 })
407+
.find(".mx_EventTile_e2eIcon")
408408
.should("have.class", "mx_EventTile_e2eIcon_warning")
409-
.should("have.attr", "aria-label", "Encrypted by an unverified user.");
409+
.should("have.attr", "aria-label", "Encrypted by a device not verified by its owner.");
410410

411411
/* Should show a grey padlock for a message from an unknown device */
412412

@@ -415,10 +415,12 @@ describe("Cryptography", function () {
415415
.then(() => bobSecondDevice.logout(true))
416416
.then(() => cy.log(`Bob logged out second device`));
417417

418+
// some debate over whether this should have a red or a grey shield. Legacy crypto shows a grey shield,
419+
// Rust crypto a red one.
418420
cy.get(".mx_EventTile_last")
419421
.should("contain", "test encrypted from unverified")
420422
.find(".mx_EventTile_e2eIcon")
421-
.should("have.class", "mx_EventTile_e2eIcon_normal")
423+
//.should("have.class", "mx_EventTile_e2eIcon_normal")
422424
.should("have.attr", "aria-label", "Encrypted by an unknown or deleted device.");
423425
});
424426

@@ -437,7 +439,7 @@ describe("Cryptography", function () {
437439
// no e2e icon
438440
.should("not.have.descendants", ".mx_EventTile_e2eIcon");
439441

440-
/* log out, and back i */
442+
/* log out, and back in */
441443
logOutOfElement();
442444
cy.get<string>("@securityKey").then((securityKey) => {
443445
logIntoElement(homeserver.baseUrl, aliceCredentials.username, aliceCredentials.password, securityKey);

0 commit comments

Comments
 (0)