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

Commit

Permalink
Cypress: beginKeyVerification -> startVerification
Browse files Browse the repository at this point in the history
matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification
  • Loading branch information
richvdh committed Jun 30, 2023
1 parent 8738cf5 commit 23d6600
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/crypto/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ const verify = function (this: CryptoTestContext) {
// this requires creating a DM, so can take a while. Give it a longer timeout.
cy.findByRole("button", { name: "Verify by emoji", timeout: 30000 }).click();

cy.wrap(bobsVerificationRequestPromise).then((request: VerificationRequest) => {
cy.wrap(bobsVerificationRequestPromise).then(async (request: VerificationRequest) => {
// the bot user races with the Element user to hit the "verify by emoji" button
const verifier = request.beginKeyVerification("m.sas.v1");
const verifier = request.startVerification("m.sas.v1");
doTwoWaySasVerification(verifier);
});
cy.findByRole("button", { name: "They match" }).click();
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/crypto/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export function handleSasVerification(verifier: Verifier): Promise<EmojiMapping[

// @ts-ignore as above, avoiding reference to VerifierEvent
verifier.on("show_sas", onShowSas);
verifier.verify();
});
}

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/crypto/verification.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ describe("Device verification", () => {

// Handle emoji SAS verification
cy.get(".mx_InfoDialog").within(() => {
cy.get<VerificationRequest>("@verificationRequest").then((request: VerificationRequest) => {
cy.get<VerificationRequest>("@verificationRequest").then(async (request: VerificationRequest) => {
// the bot chooses to do an emoji verification
const verifier = request.beginKeyVerification("m.sas.v1");
const verifier = await request.startVerification("m.sas.v1");

// Handle emoji request and check that emojis are matching
doTwoWaySasVerification(verifier);
Expand Down

0 comments on commit 23d6600

Please sign in to comment.