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

Commit

Permalink
Add cypress test for the composer emoji picker (#9505)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Oct 26, 2022
1 parent 625971a commit 097ca43
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cypress/e2e/composer/composer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ describe("Composer", () => {
cy.contains('.mx_EventTile_body strong', 'bold message');
});

it("should allow user to input emoji via graphical picker", () => {
cy.getComposer(false).within(() => {
cy.get('[aria-label="Emoji"]').click();
});

cy.get('[data-testid="mx_EmojiPicker"]').within(() => {
cy.contains(".mx_EmojiPicker_item", "😇").click();
});

cy.get(".mx_ContextualMenu_background").click(); // Close emoji picker
cy.get('div[contenteditable=true]').type("{enter}"); // Send message

cy.contains(".mx_EventTile_body", "😇");
});

describe("when Ctrl+Enter is required to send", () => {
beforeEach(() => {
cy.setSettingValue("MessageComposerInput.ctrlEnterToSend", null, SettingLevel.ACCOUNT, true);
Expand Down

0 comments on commit 097ca43

Please sign in to comment.