diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-12 21:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-12 21:08:31 +0300 |
commit | 884a65481f9e5365329f4ba371ac5b813c45a2f9 (patch) | |
tree | cc4030d36a739eaf91543d270db9a33093f51446 /spec/features/incidents/user_creates_new_incident_spec.rb | |
parent | b17f0b91a66f2101a54dd1efed0c4973f04b1daf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/incidents/user_creates_new_incident_spec.rb')
-rw-r--r-- | spec/features/incidents/user_creates_new_incident_spec.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/features/incidents/user_creates_new_incident_spec.rb b/spec/features/incidents/user_creates_new_incident_spec.rb new file mode 100644 index 00000000000..9b9cf396c0a --- /dev/null +++ b/spec/features/incidents/user_creates_new_incident_spec.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'Incident Management index', :js do + let_it_be(:project) { create(:project) } + let_it_be(:developer) { create(:user) } + let_it_be(:incident) { create(:incident, project: project) } + + before_all do + project.add_developer(developer) + end + + before do + sign_in(developer) + + visit project_incidents_path(project) + wait_for_requests + end + + context 'when a developer displays the incident list' do + it 'shows the create new issue button' do + expect(page).to have_selector('.create-incident-button') + end + + it 'shows the create issue page with the Incident type pre-selected when clicked' do + find('.create-incident-button').click + wait_for_requests + + expect(page).to have_selector(".dropdown-menu-toggle") + expect(page).to have_selector(".js-issuable-type-filter-dropdown-wrap") + + page.within('.js-issuable-type-filter-dropdown-wrap') do + expect(page).to have_content('Incident') + end + end + end +end |