Move Enterprise Erin tests from Puppeteer to Cypress (#8569)
* Move Enterprise Erin tests from Puppeteer to Cypress * delint * types * Fix double space * Better handle logout in Lifecycle * Fix test by awaiting the network request * Improve some logout handlings * Try try try again * Delint * Fix tests * Delint
This commit is contained in:
parent
7efd7b67ea
commit
655bca63e6
12 changed files with 131 additions and 150 deletions
|
@ -89,9 +89,7 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||
return;
|
||||
}
|
||||
this.started = false;
|
||||
if (this.verificationRequest) {
|
||||
this.verificationRequest.off(VerificationRequestEvent.Change, this.onVerificationRequestChange);
|
||||
}
|
||||
this.verificationRequest?.off(VerificationRequestEvent.Change, this.onVerificationRequestChange);
|
||||
if (MatrixClientPeg.get()) {
|
||||
MatrixClientPeg.get().removeListener(CryptoEvent.VerificationRequest, this.onVerificationRequest);
|
||||
MatrixClientPeg.get().removeListener(CryptoEvent.UserTrustStatusChanged, this.onUserTrustStatusChanged);
|
||||
|
@ -99,6 +97,7 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||
}
|
||||
|
||||
public async fetchKeyInfo(): Promise<void> {
|
||||
if (!this.started) return; // bail if we were stopped
|
||||
const cli = MatrixClientPeg.get();
|
||||
const keys = await cli.isSecretStored('m.cross_signing.master');
|
||||
if (keys === null || Object.keys(keys).length === 0) {
|
||||
|
@ -270,6 +269,7 @@ export class SetupEncryptionStore extends EventEmitter {
|
|||
}
|
||||
|
||||
private async setActiveVerificationRequest(request: VerificationRequest): Promise<void> {
|
||||
if (!this.started) return; // bail if we were stopped
|
||||
if (request.otherUserId !== MatrixClientPeg.get().getUserId()) return;
|
||||
|
||||
if (this.verificationRequest) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue