From f9e99ed3023ed0d36208b154e87e1796ace6142d Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Tue, 23 May 2023 10:24:15 +0100 Subject: [PATCH] Cypress: fix dodgy use of string as event name (#10963) --- cypress/e2e/crypto/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress/e2e/crypto/utils.ts b/cypress/e2e/crypto/utils.ts index aeb15eab11..5d4d9dc304 100644 --- a/cypress/e2e/crypto/utils.ts +++ b/cypress/e2e/crypto/utils.ts @@ -49,12 +49,15 @@ export function waitForVerificationRequest(cli: MatrixClient): Promise { return new Promise((resolve) => { const onShowSas = (event: ISasEvent) => { + // @ts-ignore VerifierEvent is a pain to get at here as we don't have a reference to matrixcs; + // using the string value here verifier.off("show_sas", onShowSas); event.confirm(); resolve(event.sas.emoji); }; const verifier = request.beginKeyVerification("m.sas.v1"); + // @ts-ignore as above, avoiding reference to VerifierEvent verifier.on("show_sas", onShowSas); verifier.verify(); });