diff options
Diffstat (limited to 'spec/features/issues/incident_issue_spec.rb')
-rw-r--r-- | spec/features/issues/incident_issue_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/issues/incident_issue_spec.rb b/spec/features/issues/incident_issue_spec.rb new file mode 100644 index 00000000000..57dfb370bf4 --- /dev/null +++ b/spec/features/issues/incident_issue_spec.rb @@ -0,0 +1,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 |