Cypress test for incoming verification requests (#11123)
* Cypress: move verification tests to their own file * Remove redundant cypress test This does nothing that the verification test doesn't do better. * Factor `beginKeyVerification` call out of `doTwoWaySasVerification` ... for more flexibility. This allows us to have tests where the other side picks the verification method. * Cypress test for incoming verification requests
This commit is contained in:
parent
9f580a8680
commit
35f8c525aa
6 changed files with 227 additions and 140 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
|||
/// <reference types="cypress" />
|
||||
|
||||
import "cypress-each";
|
||||
import EventEmitter from "events";
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
|
@ -75,3 +76,10 @@ export function skipIfRustCrypto() {
|
|||
export function isRustCryptoEnabled(): boolean {
|
||||
return !!Cypress.env("RUST_CRYPTO");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Promise which will resolve when the given event emitter emits a given event
|
||||
*/
|
||||
export function emitPromise(e: EventEmitter, k: string | symbol) {
|
||||
return new Promise((r) => e.once(k, r));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue