# frozen_string_literal: true require 'spec_helper' RSpec.describe 'Issue Detail', :js, feature_category: :team_planning do let_it_be_with_refind(:project) { create(:project, :public) } let(:user) { create(:user) } let(:issue) { create(:issue, project: project, author: user) } let(:incident) { create(:incident, project: project, author: user) } context 'when user displays the issue' do before do visit project_issue_path(project, issue) wait_for_requests end it 'shows the issue' do page.within('.issuable-details') do expect(find('h1')).to have_content(issue.title) end end end context 'when user displays the issue as an incident' do before do visit project_issue_path(project, incident) wait_for_requests end it 'does not show design management' do expect(page).not_to have_selector('.js-design-management') end end context 'when issue description has emojis' do let(:issue) { create(:issue, project: project, author: user, description: 'hello world :100:') } before do sign_in(user) visit project_issue_path(project, issue) end it 'renders gl-emoji tag' do page.within('.description') do expect(page).to have_selector('gl-emoji', count: 1) end end end context 'when issue description has task list items' do before do description = '- [ ] I am a task | Table | |-------| |