diff --git a/cypress/e2e/crypto/crypto.spec.ts b/cypress/e2e/crypto/crypto.spec.ts index 5fd5671fac..4680a4b086 100644 --- a/cypress/e2e/crypto/crypto.spec.ts +++ b/cypress/e2e/crypto/crypto.spec.ts @@ -28,7 +28,6 @@ import { logOutOfElement, waitForVerificationRequest, } from "./utils"; -import { skipIfRustCrypto } from "../../support/util"; interface CryptoTestContext extends Mocha.Context { homeserver: HomeserverInstance; @@ -451,8 +450,6 @@ describe("Cryptography", function () { }); it("Should show a grey padlock for a key restored from backup", () => { - skipIfRustCrypto(); // doesn't work due to https://github.com/vector-im/element-web/issues/26393 - enableKeyBackup(); // bob sends a valid event @@ -465,6 +462,10 @@ describe("Cryptography", function () { // no e2e icon .should("not.have.descendants", ".mx_EventTile_e2eIcon"); + // It can take up to 10 seconds for the key to be backed up. We don't really have much option other than + // to wait :/ + cy.wait(10000); + /* log out, and back in */ logOutOfElement(); cy.get("@securityKey").then((securityKey) => { diff --git a/cypress/e2e/crypto/utils.ts b/cypress/e2e/crypto/utils.ts index 7372508601..d0264ec99c 100644 --- a/cypress/e2e/crypto/utils.ts +++ b/cypress/e2e/crypto/utils.ts @@ -155,6 +155,9 @@ export function logOutOfElement() { cy.get(".mx_Dialog .mx_QuestionDialog").within(() => { cy.findByRole("button", { name: "Sign out" }).click(); }); + + // Wait for the login page to load + cy.findByRole("heading", { name: "Sign in" }).click(); } /**