mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Fix flaky test crypto/decryption-failure.spec.ts "Decryption Failure Bar" (#10092)
This commit is contained in:
parent
39fe72e53a
commit
885d5098ab
@ -52,6 +52,8 @@ const handleVerificationRequest = (request: VerificationRequest): Chainable<Emoj
|
||||
verifier.on("show_sas", onShowSas);
|
||||
verifier.verify();
|
||||
}),
|
||||
// extra timeout, as this sometimes takes a while
|
||||
{ timeout: 30_000 },
|
||||
);
|
||||
};
|
||||
|
||||
@ -111,9 +113,8 @@ describe("Decryption Failure Bar", () => {
|
||||
})
|
||||
.then(() => {
|
||||
cy.botSendMessage(bot, roomId, "test");
|
||||
cy.wait(5000);
|
||||
cy.get(".mx_DecryptionFailureBar .mx_DecryptionFailureBar_message_headline").should(
|
||||
"have.text",
|
||||
cy.contains(
|
||||
".mx_DecryptionFailureBar .mx_DecryptionFailureBar_message_headline",
|
||||
"Verify this device to access all messages",
|
||||
);
|
||||
|
||||
@ -124,6 +125,7 @@ describe("Decryption Failure Bar", () => {
|
||||
|
||||
const verificationRequestPromise = waitForVerificationRequest(otherDevice);
|
||||
cy.get(".mx_CompleteSecurity_actionRow .mx_AccessibleButton").click();
|
||||
cy.contains("To proceed, please accept the verification request on your other device.");
|
||||
cy.wrap(verificationRequestPromise).then((verificationRequest: VerificationRequest) => {
|
||||
cy.wrap(verificationRequest.accept());
|
||||
handleVerificationRequest(verificationRequest).then((emojis) => {
|
||||
@ -170,9 +172,8 @@ describe("Decryption Failure Bar", () => {
|
||||
);
|
||||
|
||||
cy.botSendMessage(bot, roomId, "test");
|
||||
cy.wait(5000);
|
||||
cy.get(".mx_DecryptionFailureBar .mx_DecryptionFailureBar_message_headline").should(
|
||||
"have.text",
|
||||
cy.contains(
|
||||
".mx_DecryptionFailureBar .mx_DecryptionFailureBar_message_headline",
|
||||
"Reset your keys to prevent future decryption errors",
|
||||
);
|
||||
|
||||
|
@ -163,6 +163,8 @@ function setupBotClient(
|
||||
}
|
||||
})
|
||||
.then(() => cli),
|
||||
// extra timeout, as this sometimes takes a while
|
||||
{ timeout: 30_000 },
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user