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

Commit 097ca43

Browse files
authored
Add cypress test for the composer emoji picker (#9505)
1 parent 625971a commit 097ca43

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cypress/e2e/composer/composer.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ describe("Composer", () => {
6464
cy.contains('.mx_EventTile_body strong', 'bold message');
6565
});
6666

67+
it("should allow user to input emoji via graphical picker", () => {
68+
cy.getComposer(false).within(() => {
69+
cy.get('[aria-label="Emoji"]').click();
70+
});
71+
72+
cy.get('[data-testid="mx_EmojiPicker"]').within(() => {
73+
cy.contains(".mx_EmojiPicker_item", "😇").click();
74+
});
75+
76+
cy.get(".mx_ContextualMenu_background").click(); // Close emoji picker
77+
cy.get('div[contenteditable=true]').type("{enter}"); // Send message
78+
79+
cy.contains(".mx_EventTile_body", "😇");
80+
});
81+
6782
describe("when Ctrl+Enter is required to send", () => {
6883
beforeEach(() => {
6984
cy.setSettingValue("MessageComposerInput.ctrlEnterToSend", null, SettingLevel.ACCOUNT, true);

0 commit comments

Comments
 (0)