Add cypress test for the composer emoji picker (#9505)

This commit is contained in:
Michael Telatynski 2022-10-26 13:58:40 +01:00 committed by GitHub
parent 625971acb5
commit 097ca43420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);