Fix cypress RTE flaky test (#9920)
* Update @matrix-org/matrix-wysiwyg to 0.19.0 * Press {enter} to send message
This commit is contained in:
parent
70d3d03c15
commit
e4a9684d76
4 changed files with 9 additions and 10 deletions
|
@ -120,9 +120,8 @@ describe("Composer", () => {
|
|||
|
||||
// Type another
|
||||
cy.get("div[contenteditable=true]").type("my message 1");
|
||||
// Press enter. Would be nice to just use {enter} but we can't because Cypress
|
||||
// does not trigger an insertParagraph when you do that.
|
||||
cy.get("div[contenteditable=true]").trigger("input", { inputType: "insertParagraph" });
|
||||
// Send message
|
||||
cy.get("div[contenteditable=true]").type("{enter}");
|
||||
// It was sent
|
||||
cy.contains(".mx_EventTile_body", "my message 1");
|
||||
});
|
||||
|
@ -141,7 +140,7 @@ describe("Composer", () => {
|
|||
it("only sends when you press Ctrl+Enter", () => {
|
||||
// Type a message and press Enter
|
||||
cy.get("div[contenteditable=true]").type("my message 3");
|
||||
cy.get("div[contenteditable=true]").trigger("input", { inputType: "insertParagraph" });
|
||||
cy.get("div[contenteditable=true]").type("{enter}");
|
||||
// It has not been sent yet
|
||||
cy.contains(".mx_EventTile_body", "my message 3").should("not.exist");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue