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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 00:12:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-20 00:12:42 +0300
commitc1ea2a91648ca8bfdb2e17e3ec7e3358da490dc8 (patch)
treef5770d2ec59e1fe0206fe56857e4349281566f5e /spec/features/incidents
parente4fc62c0af80cfaaa907aea83ae4012e06a1f9e4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/incidents')
-rw-r--r--spec/features/incidents/incident_details_spec.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/features/incidents/incident_details_spec.rb b/spec/features/incidents/incident_details_spec.rb
index 96f8cf0062c..b704a0515c8 100644
--- a/spec/features/incidents/incident_details_spec.rb
+++ b/spec/features/incidents/incident_details_spec.rb
@@ -49,4 +49,42 @@ RSpec.describe 'Incident details', :js do
end
end
end
+
+ context 'when an incident `issue_type` is edited by a signed in user' do
+ it 'routes the user to the incident details page when the `issue_type` is set to incident' do
+ wait_for_requests
+ project_path = "/#{project.full_path}"
+ click_button 'Edit title and description'
+ wait_for_requests
+
+ page.within('[data-testid="issuable-form"]') do
+ click_button 'Incident'
+ click_button 'Issue'
+ click_button 'Save changes'
+
+ wait_for_requests
+
+ expect(page).to have_current_path("#{project_path}/-/issues/#{incident.iid}")
+ end
+ end
+ end
+
+ context 'when incident details are edited by a signed in user' do
+ it 'routes the user to the incident details page when the `issue_type` is set to incident' do
+ wait_for_requests
+ project_path = "/#{project.full_path}"
+ click_button 'Edit title and description'
+ wait_for_requests
+
+ page.within('[data-testid="issuable-form"]') do
+ click_button 'Incident'
+ click_button 'Issue'
+ click_button 'Save changes'
+
+ wait_for_requests
+
+ expect(page).to have_current_path("#{project_path}/-/issues/#{incident.iid}")
+ end
+ end
+ end
end