You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/v2/case_management.feature
+195Lines changed: 195 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,60 @@ Feature: Case Management
90
90
When the request is sent
91
91
Then the response status is 200 OK
92
92
93
+
@generated@skip@team:DataDog/case-management
94
+
Scenario: Create Jira issue for case returns "Accepted" response
95
+
Given operation "CreateCaseJiraIssue" enabled
96
+
And new "CreateCaseJiraIssue" request
97
+
And request contains "case_id" parameter from "REPLACE.ME"
98
+
And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}}
99
+
When the request is sent
100
+
Then the response status is 202 Accepted
101
+
102
+
@generated@skip@team:DataDog/case-management
103
+
Scenario: Create Jira issue for case returns "Bad Request" response
104
+
Given operation "CreateCaseJiraIssue" enabled
105
+
And new "CreateCaseJiraIssue" request
106
+
And request contains "case_id" parameter from "REPLACE.ME"
107
+
And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}}
108
+
When the request is sent
109
+
Then the response status is 400 Bad Request
110
+
111
+
@generated@skip@team:DataDog/case-management
112
+
Scenario: Create Jira issue for case returns "Not Found" response
113
+
Given operation "CreateCaseJiraIssue" enabled
114
+
And new "CreateCaseJiraIssue" request
115
+
And request contains "case_id" parameter from "REPLACE.ME"
116
+
And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}}
117
+
When the request is sent
118
+
Then the response status is 404 Not Found
119
+
120
+
@generated@skip@team:DataDog/case-management
121
+
Scenario: Create ServiceNow ticket for case returns "Accepted" response
122
+
Given operation "CreateCaseServiceNowTicket" enabled
123
+
And new "CreateCaseServiceNowTicket" request
124
+
And request contains "case_id" parameter from "REPLACE.ME"
125
+
And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}}
126
+
When the request is sent
127
+
Then the response status is 202 Accepted
128
+
129
+
@generated@skip@team:DataDog/case-management
130
+
Scenario: Create ServiceNow ticket for case returns "Bad Request" response
131
+
Given operation "CreateCaseServiceNowTicket" enabled
132
+
And new "CreateCaseServiceNowTicket" request
133
+
And request contains "case_id" parameter from "REPLACE.ME"
134
+
And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}}
135
+
When the request is sent
136
+
Then the response status is 400 Bad Request
137
+
138
+
@generated@skip@team:DataDog/case-management
139
+
Scenario: Create ServiceNow ticket for case returns "Not Found" response
140
+
Given operation "CreateCaseServiceNowTicket" enabled
141
+
And new "CreateCaseServiceNowTicket" request
142
+
And request contains "case_id" parameter from "REPLACE.ME"
143
+
And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}}
144
+
When the request is sent
145
+
Then the response status is 404 Not Found
146
+
93
147
@team:DataDog/case-management
94
148
Scenario: Create a case returns "Bad Request" response
95
149
Given new "CreateCase" request
@@ -161,6 +215,33 @@ Feature: Case Management
161
215
When the request is sent
162
216
Then the response status is 404 Not Found
163
217
218
+
@generated@skip@team:DataDog/case-management
219
+
Scenario: Create investigation notebook for case returns "Bad Request" response
220
+
Given operation "CreateCaseNotebook" enabled
221
+
And new "CreateCaseNotebook" request
222
+
And request contains "case_id" parameter from "REPLACE.ME"
223
+
And body with value {"data": {"type": "notebook"}}
224
+
When the request is sent
225
+
Then the response status is 400 Bad Request
226
+
227
+
@generated@skip@team:DataDog/case-management
228
+
Scenario: Create investigation notebook for case returns "No Content" response
229
+
Given operation "CreateCaseNotebook" enabled
230
+
And new "CreateCaseNotebook" request
231
+
And request contains "case_id" parameter from "REPLACE.ME"
232
+
And body with value {"data": {"type": "notebook"}}
233
+
When the request is sent
234
+
Then the response status is 204 No Content
235
+
236
+
@generated@skip@team:DataDog/case-management
237
+
Scenario: Create investigation notebook for case returns "Not Found" response
238
+
Given operation "CreateCaseNotebook" enabled
239
+
And new "CreateCaseNotebook" request
240
+
And request contains "case_id" parameter from "REPLACE.ME"
241
+
And body with value {"data": {"type": "notebook"}}
242
+
When the request is sent
243
+
Then the response status is 404 Not Found
244
+
164
245
@generated@skip@team:DataDog/case-management
165
246
Scenario: Delete a notification rule returns "API error response" response
166
247
Given new "DeleteProjectNotificationRule" request
@@ -308,6 +389,93 @@ Feature: Case Management
308
389
When the request is sent
309
390
Then the response status is 200 OK
310
391
392
+
@generated@skip@team:DataDog/case-management
393
+
Scenario: Link existing Jira issue to case returns "Bad Request" response
394
+
Given operation "LinkJiraIssueToCase" enabled
395
+
And new "LinkJiraIssueToCase" request
396
+
And request contains "case_id" parameter from "REPLACE.ME"
397
+
And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}}
398
+
When the request is sent
399
+
Then the response status is 400 Bad Request
400
+
401
+
@generated@skip@team:DataDog/case-management
402
+
Scenario: Link existing Jira issue to case returns "Conflict" response
403
+
Given operation "LinkJiraIssueToCase" enabled
404
+
And new "LinkJiraIssueToCase" request
405
+
And request contains "case_id" parameter from "REPLACE.ME"
406
+
And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}}
407
+
When the request is sent
408
+
Then the response status is 409 Conflict
409
+
410
+
@generated@skip@team:DataDog/case-management
411
+
Scenario: Link existing Jira issue to case returns "No Content" response
412
+
Given operation "LinkJiraIssueToCase" enabled
413
+
And new "LinkJiraIssueToCase" request
414
+
And request contains "case_id" parameter from "REPLACE.ME"
415
+
And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}}
416
+
When the request is sent
417
+
Then the response status is 204 No Content
418
+
419
+
@generated@skip@team:DataDog/case-management
420
+
Scenario: Link existing Jira issue to case returns "Not Found" response
421
+
Given operation "LinkJiraIssueToCase" enabled
422
+
And new "LinkJiraIssueToCase" request
423
+
And request contains "case_id" parameter from "REPLACE.ME"
424
+
And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}}
425
+
When the request is sent
426
+
Then the response status is 404 Not Found
427
+
428
+
@generated@skip@team:DataDog/case-management
429
+
Scenario: Link incident to case returns "Bad Request" response
430
+
Given operation "LinkIncident" enabled
431
+
And new "LinkIncident" request
432
+
And request contains "case_id" parameter from "REPLACE.ME"
433
+
And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}}
434
+
When the request is sent
435
+
Then the response status is 400 Bad Request
436
+
437
+
@generated@skip@team:DataDog/case-management
438
+
Scenario: Link incident to case returns "Created" response
439
+
Given operation "LinkIncident" enabled
440
+
And new "LinkIncident" request
441
+
And request contains "case_id" parameter from "REPLACE.ME"
442
+
And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}}
443
+
When the request is sent
444
+
Then the response status is 201 Created
445
+
446
+
@generated@skip@team:DataDog/case-management
447
+
Scenario: Link incident to case returns "Not Found" response
448
+
Given operation "LinkIncident" enabled
449
+
And new "LinkIncident" request
450
+
And request contains "case_id" parameter from "REPLACE.ME"
451
+
And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}}
452
+
When the request is sent
453
+
Then the response status is 404 Not Found
454
+
455
+
@generated@skip@team:DataDog/case-management
456
+
Scenario: Remove Jira issue link from case returns "Bad Request" response
457
+
Given operation "UnlinkJiraIssue" enabled
458
+
And new "UnlinkJiraIssue" request
459
+
And request contains "case_id" parameter from "REPLACE.ME"
460
+
When the request is sent
461
+
Then the response status is 400 Bad Request
462
+
463
+
@generated@skip@team:DataDog/case-management
464
+
Scenario: Remove Jira issue link from case returns "No Content" response
465
+
Given operation "UnlinkJiraIssue" enabled
466
+
And new "UnlinkJiraIssue" request
467
+
And request contains "case_id" parameter from "REPLACE.ME"
468
+
When the request is sent
469
+
Then the response status is 204 No Content
470
+
471
+
@generated@skip@team:DataDog/case-management
472
+
Scenario: Remove Jira issue link from case returns "Not Found" response
473
+
Given operation "UnlinkJiraIssue" enabled
474
+
And new "UnlinkJiraIssue" request
475
+
And request contains "case_id" parameter from "REPLACE.ME"
476
+
When the request is sent
477
+
Then the response status is 404 Not Found
478
+
311
479
@generated@skip@team:DataDog/case-management
312
480
Scenario: Remove a project returns "API error response" response
313
481
Given new "DeleteProject" request
@@ -564,6 +732,33 @@ Feature: Case Management
564
732
Then the response status is 200 OK
565
733
And the response "data.attributes.priority" is equal to "P3"
566
734
735
+
@generated@skip@team:DataDog/case-management
736
+
Scenario: Update case project returns "Bad Request" response
737
+
Given operation "MoveCaseToProject" enabled
738
+
And new "MoveCaseToProject" request
739
+
And request contains "case_id" parameter from "REPLACE.ME"
740
+
And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}
741
+
When the request is sent
742
+
Then the response status is 400 Bad Request
743
+
744
+
@generated@skip@team:DataDog/case-management
745
+
Scenario: Update case project returns "Not Found" response
746
+
Given operation "MoveCaseToProject" enabled
747
+
And new "MoveCaseToProject" request
748
+
And request contains "case_id" parameter from "REPLACE.ME"
749
+
And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}
750
+
When the request is sent
751
+
Then the response status is 404 Not Found
752
+
753
+
@generated@skip@team:DataDog/case-management
754
+
Scenario: Update case project returns "OK" response
755
+
Given operation "MoveCaseToProject" enabled
756
+
And new "MoveCaseToProject" request
757
+
And request contains "case_id" parameter from "REPLACE.ME"
758
+
And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}
759
+
When the request is sent
760
+
Then the response status is 200 OK
761
+
567
762
@team:DataDog/case-management
568
763
Scenario: Update case status returns "Bad Request" response
0 commit comments