From 097ca43420b892cff1c89b481c9e963ee395f7d3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 26 Oct 2022 13:58:40 +0100 Subject: [PATCH] Add cypress test for the composer emoji picker (#9505) --- cypress/e2e/composer/composer.spec.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cypress/e2e/composer/composer.spec.ts b/cypress/e2e/composer/composer.spec.ts index f3fc374cf02..6fe562e12a7 100644 --- a/cypress/e2e/composer/composer.spec.ts +++ b/cypress/e2e/composer/composer.spec.ts @@ -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);