Skip to content

Commit

Permalink
Merge branch 'feat/composer' of github.com:RocketChat/Rocket.Chat int…
Browse files Browse the repository at this point in the history
…o feat/composer
  • Loading branch information
ggazzo committed Dec 16, 2022
2 parents 9e55993 + f312a2f commit d487b08
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions apps/meteor/app/emoji/client/lib/EmojiPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,9 @@ export const EmojiPicker = {
this.source.focus();
},
pickEmoji(emoji) {
this.pickCallback(emoji);

this.close();
this.addRecent(emoji);
this.pickCallback(emoji);
},
addRecent(_emoji) {
const pos = this.recent.indexOf(_emoji);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const createComposerAPI = (input: HTMLTextAreaElement, storageID: string)
emitter.emit('quotedMessagesUpdate');
};

input.value = Meteor._localStorage.getItem(storageID) ?? '';
input.addEventListener('input', persist);

const release = (): void => {
Expand Down Expand Up @@ -164,6 +163,8 @@ export const createComposerAPI = (input: HTMLTextAreaElement, storageID: string)
setEditing(editing);
};

setText(Meteor._localStorage.getItem(storageID) ?? '');

return {
release,
get text(): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export const MessageBox = ({
<AudioMessageRecorder rid={rid} tmid={tmid} />

<MessageComposerAction
data-qa-id='menu-more-actions'
onClick={(event): void => {
const groups = messageBox.actions.get();
const config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class HomeContent {
}

async pickEmoji(emoji: string, section = 'icon-people') {
await this.page.locator('role=toolbar[name="Composer Secondary Actions"] role=button[name="Emoji"]').click();
await this.page.locator('role=toolbar[name="Composer Secondary Actions"] >> role=button[name="Emoji"]').click();
await this.page.locator(`//*[contains(@class, "emoji-picker")]//*[contains(@class, "${section}")]`).click();
await this.page.locator(`//*[contains(@class, "emoji-picker")]//*[contains(@class, "${emoji}")]`).first().click();
}
Expand Down

0 comments on commit d487b08

Please sign in to comment.