Fix up and enable a cypress test that uses key backup (#11958)

* Fix up and enable a cypress test that uses key backup

* fix imports
This commit is contained in:
Richard van der Hoff 2023-12-04 17:13:49 +00:00 committed by GitHub
parent 85c0a95fdf
commit 236ea44cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -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<string>("@securityKey").then((securityKey) => {

View file

@ -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();
}
/**