diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb')
-rw-r--r-- | spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb b/spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb index 5167d27f8b9..3f1a98ca08e 100644 --- a/spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb +++ b/spec/support/shared_examples/quick_actions/issue/promote_to_incident_quick_action_shared_examples.rb @@ -36,5 +36,33 @@ RSpec.shared_examples 'promote_to_incident quick action' do expect(page).to have_content('Could not apply promote_to_incident command') end end + + context 'on issue creation' do + it 'promotes issue to incident' do + visit new_project_issue_path(project) + fill_in('Title', with: 'Title') + fill_in('Description', with: '/promote_to_incident') + click_button('Create issue') + + wait_for_all_requests + + expect(page).to have_content("Incident created just now by #{user.name}") + end + + context 'when incident is selected for issue type' do + it 'promotes issue to incident' do + visit new_project_issue_path(project) + fill_in('Title', with: 'Title') + find('.js-issuable-type-filter-dropdown-wrap').click + click_link('Incident') + fill_in('Description', with: '/promote_to_incident') + click_button('Create issue') + + wait_for_all_requests + + expect(page).to have_content("Incident created just now by #{user.name}") + end + end + end end end |