Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add comments to explain how the message was edited
Browse files Browse the repository at this point in the history
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed Mar 23, 2023
1 parent 743da81 commit b930982
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cypress/e2e/editing/editing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe("Editing", () => {
.realHover()
.get('.mx_EventTile_last [aria-label="Edit"]')
.click({ force: false });
// Edit the message from "Message" to "Massage"
cy.get(".mx_BasicMessageComposer_input").type("{selectAll}{del}Massage{enter}");
});

Expand Down Expand Up @@ -114,10 +115,11 @@ describe("Editing", () => {
// Assert that the edited message is rendered
cy.get("li:nth-child(2) .mx_EventTile").within(() => {
cy.get(".mx_EventTile_content").within(() => {
// Assert that the edited message body consists of both deleted character and inserted character
// Above the first "e" of "Message" was replaced with "a"
cy.get(".mx_EventTile_body").should("have.text", "Meassage");

cy.get(".mx_EventTile_body").within(() => {
// "e" was replaced with "a"
cy.get(".mx_EditHistoryMessage_deletion").should("have.text", "e");
cy.get(".mx_EditHistoryMessage_insertion").should("have.text", "a");
});
Expand Down

0 comments on commit b930982

Please sign in to comment.