Welcome to mirror list, hosted at ThFree Co, Russian Federation.

incident_issue_spec.rb « issues « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 57dfb370bf458a0247287a81d8e0f7d53f75f25b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'Incident Detail', :js do
  let(:user)      { create(:user) }
  let(:project)   { create(:project, :public) }
  let(:incident)  { create(:issue, project: project, author: user, issue_type: 'incident', description: 'hello') }

  context 'when user displays the incident' do
    before do
      visit project_issue_path(project, incident)
      wait_for_requests
    end

    it 'shows the incident tabs' do
      page.within('.issuable-details') do
        incident_tabs = find('[data-testid="incident-tabs"]')

        expect(find('h2')).to have_content(incident.title)
        expect(incident_tabs).to have_content('Summary')
        expect(incident_tabs).to have_content(incident.description)
      end
    end
  end
end