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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-26 04:34:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-26 04:34:24 +0300
commit5b4b2ed55320932ddaecbb7ce7f957235a1c73cf (patch)
tree0e43d59e017203aefec60f5024d4049033ac150c /spec
parent3216f7a4aefb8d2e9f45faea40786c0ebe2f302e (diff)
Add latest changes from gitlab-org/gitlab@16-2-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/features/incidents/incident_details_spec.rb30
1 files changed, 21 insertions, 9 deletions
diff --git a/spec/features/incidents/incident_details_spec.rb b/spec/features/incidents/incident_details_spec.rb
index a166ff46177..2be0c95addd 100644
--- a/spec/features/incidents/incident_details_spec.rb
+++ b/spec/features/incidents/incident_details_spec.rb
@@ -7,13 +7,20 @@ RSpec.describe 'Incident details', :js, feature_category: :incident_management d
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user) }
- let_it_be(:incident) { create(:incident, project: project, author: developer, description: 'description') }
- let_it_be(:issue) { create(:issue, project: project, author: developer, description: 'Issue description') }
- let_it_be(:escalation_status) { create(:incident_management_issuable_escalation_status, issue: incident) }
let_it_be(:confidential_incident) do
create(:incident, confidential: true, project: project, author: developer, description: 'Confidential')
end
+ let_it_be_with_reload(:incident) do
+ create(:incident, project: project, author: developer, description: 'description')
+ end
+
+ let_it_be(:escalation_status) { create(:incident_management_issuable_escalation_status, issue: incident) }
+
+ let_it_be_with_reload(:issue) do
+ create(:issue, project: project, author: developer, description: 'Issue description')
+ end
+
before_all do
project.add_developer(developer)
end
@@ -105,12 +112,15 @@ RSpec.describe 'Incident details', :js, feature_category: :incident_management d
page.within('[data-testid="issuable-form"]') do
click_button 'Issue'
find('[data-testid="issue-type-list-item"]', text: 'Incident').click
+
click_button 'Save changes'
+ end
- wait_for_requests
+ wait_for_requests
- expect(page).to have_current_path("#{project_path}/-/issues/incident/#{issue.iid}")
- end
+ expect(issue.reload.issue_type).to eq('incident')
+ expect(page).to have_current_path("#{project_path}/-/issues/incident/#{issue.iid}")
+ expect(page).to have_content(issue.title)
end
it 'routes the user to the issue details page when the `issue_type` is set to issue' do
@@ -126,11 +136,13 @@ RSpec.describe 'Incident details', :js, feature_category: :incident_management d
click_button 'Incident'
find('[data-testid="issue-type-list-item"]', text: 'Issue').click
click_button 'Save changes'
+ end
- wait_for_requests
+ wait_for_requests
- expect(page).to have_current_path("#{project_path}/-/issues/#{incident.iid}")
- end
+ expect(incident.reload.issue_type).to eq('issue')
+ expect(page).to have_current_path("#{project_path}/-/issues/#{incident.iid}")
+ expect(page).to have_content(incident.title)
end
it 'displays the confidential badge on the sticky header when the incident is confidential' do