Commit 4d799818 authored by Fatih Acet's avatar Fatih Acet

Merge branch...

Merge branch '52888-status-emoji-should-not-be-added-to-awards-section-on-issue-page-2' into 'master'

Resolve "Status emoji should not update awards section on issue page"

Closes #52888

See merge request gitlab-org/gitlab-ce!23470
parents ca14b70d 78029952
...@@ -12,9 +12,8 @@ class EmojiMenuInModal extends AwardsHandler { ...@@ -12,9 +12,8 @@ class EmojiMenuInModal extends AwardsHandler {
this.bindEvents(); this.bindEvents();
} }
postEmoji($emojiButton, awardUrl, selectedEmoji, callback) { postEmoji($emojiButton, awardUrl, selectedEmoji) {
this.selectEmojiCallback(selectedEmoji, this.emoji.glEmojiTag(selectedEmoji)); this.selectEmojiCallback(selectedEmoji, this.emoji.glEmojiTag(selectedEmoji));
callback();
} }
} }
......
---
title: Prevent awards emoji being updated when updating status
merge_request: 23470
author:
type: fixed
...@@ -147,6 +147,9 @@ describe 'User edit profile' do ...@@ -147,6 +147,9 @@ describe 'User edit profile' do
end end
context 'user menu' do context 'user menu' do
let(:issue) { create(:issue, project: project)}
let(:project) { create(:project) }
def open_user_status_modal def open_user_status_modal
find('.header-user-dropdown-toggle').click find('.header-user-dropdown-toggle').click
...@@ -205,6 +208,17 @@ describe 'User edit profile' do ...@@ -205,6 +208,17 @@ describe 'User edit profile' do
end end
end end
it 'does not update the awards panel emoji' do
project.add_maintainer(user)
visit(project_issue_path(project, issue))
emoji = 'biohazard'
open_user_status_modal
select_emoji(emoji, true)
expect(page.all('.award-control .js-counter')).to all(have_content('0'))
end
it 'adds message to user status' do it 'adds message to user status' do
message = 'I have something to say' message = 'I have something to say'
open_user_status_modal open_user_status_modal
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment