diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/features/issues/user_views_issue_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/features/issues/user_views_issue_spec.rb')
-rw-r--r-- | spec/features/issues/user_views_issue_spec.rb | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/spec/features/issues/user_views_issue_spec.rb b/spec/features/issues/user_views_issue_spec.rb index dd04ac94105..2b610bab9f0 100644 --- a/spec/features/issues/user_views_issue_spec.rb +++ b/spec/features/issues/user_views_issue_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "User views issue" do +RSpec.describe "User views issue" do let(:project) { create(:project_empty_repo, :public) } let(:user) { create(:user) } let(:issue) { create(:issue, project: project, description: "# Description header", author: user) } @@ -35,18 +35,38 @@ describe "User views issue" do describe 'user status' do subject { visit(project_issue_path(project, issue)) } - describe 'showing status of the author of the issue' do + context 'when showing status of the author of the issue' do it_behaves_like 'showing user status' do let(:user_with_status) { issue.author } end end - describe 'showing status of a user who commented on an issue', :js do + context 'when showing status of a user who commented on an issue', :js do let!(:note) { create(:note, noteable: issue, project: project, author: user_with_status) } it_behaves_like 'showing user status' do let(:user_with_status) { create(:user) } end end + + context 'when status message has an emoji', :js do + let(:message) { 'My status with an emoji' } + let(:message_emoji) { 'basketball' } + + let!(:note) { create(:note, noteable: issue, project: project, author: user) } + let!(:status) { create(:user_status, user: user, emoji: 'smirk', message: "#{message} :#{message_emoji}:") } + + it 'correctly renders the emoji' do + tooltip_span = page.first(".user-status-emoji[title^='#{message}']") + + tooltip_span.hover + + tooltip = page.find('.tooltip .tooltip-inner') + + page.within(tooltip) do + expect(page).to have_emoji(message_emoji) + end + end + end end end |