summaryrefslogtreecommitdiff
path: root/spec/features/issues/incident_issue_spec.rb
blob: d004ee85dd83ffc209f44d11b8d98db5935c3699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'Incident Detail', :js do
  context 'when user displays the incident' do
    it 'shows the incident tabs' do
      project = create(:project, :public)
      incident = create(:incident, project: project, description: 'hello')

      visit project_issue_path(project, incident)
      wait_for_requests

      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