Skip to content

Commit aeca538

Browse files
committed
add case creation support
1 parent 7d5631f commit aeca538

File tree

7 files changed

+14
-43
lines changed

7 files changed

+14
-43
lines changed

src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL
2424
And the response has all other details as expected
2525
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today]
2626

27-
@S-1015.1.repeat
27+
@S-1015.1.repeat
2828
Scenario: TTLIncrement is set to "20" for the Case Event and Start Event is invoked on v1_external#/case-details-endpoint/startEventForCaseworkerUsingGET
2929
Given a user with [an active profile in CCD],
3030
And a successful call [to create a case] as in [F-1015_CreateCasePreRequisiteCaseworker_noTTL]
@@ -461,7 +461,7 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL
461461
And the request [has a TTLIncrement of 20 days configured]
462462
And the request [is configured to trigger an About to Start callback that changes TTL.OverrideTTL]
463463
And it is submitted to call the [Start event creation process to update a case (v1_int caseworker)] operation of [CCD Data Store]
464-
464+
465465
Then a negative response is received
466466
And the response has all other details as expected
467467
And the response [contains the error message indicating unauthorised change to the TTL values]

src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017.feature

+6-12
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Feature: F-1017: Validate Event to Update TTL
252252
# #CCD-3535 & #CCD-3562: Trigger a mid-event callback that makes permitted changes to the TTL values: v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1
253253
#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
254254

255-
@S-1017.21 #CCD-3535
255+
@S-1017.21 @Smoke #CCD-3535
256256
Scenario: Trigger a mid event callback that changes TTL.Suspended (null -> missing). Mid Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1
257257
Given a user with [an active profile in CCD]
258258
And a user with [a caseworker with an active profile in CCD]
@@ -270,11 +270,9 @@ Feature: F-1017: Validate Event to Update TTL
270270

271271
Then a positive response is received
272272
And the response has all other details as expected
273-
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today]
274-
And the response [contains the TTL.OverrideTTL from the previouse data]
275-
And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)]
273+
And the response [does not contain the TTL as citizen user has no access]
276274

277-
@S-1017.22 #CCD-3535
275+
@S-1017.22 @Smoke #CCD-3535
278276
Scenario: Trigger a mid event callback that changes TTL.Suspended (No -> NO). Mid Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1
279277
Given a user with [an active profile in CCD]
280278
And a user with [a caseworker with an active profile in CCD]
@@ -293,9 +291,7 @@ Feature: F-1017: Validate Event to Update TTL
293291

294292
Then a positive response is received
295293
And the response has all other details as expected
296-
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today]
297-
And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)]
298-
And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)]
294+
And the response [does not contain the TTL as citizen user has no access]
299295

300296
@S-1017.23 #CCD-3535
301297
Scenario: Trigger a mid event callback that changes TTL.Suspended (Yes -> YES). Mid Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1
@@ -316,9 +312,7 @@ Feature: F-1017: Validate Event to Update TTL
316312

317313
Then a positive response is received
318314
And the response has all other details as expected
319-
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today]
320-
And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)]
321-
And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)]
315+
And the response [does not contain the TTL as citizen user has no access]
322316

323317

324318
@S-1017.25 #CCD-3562
@@ -335,7 +329,7 @@ Feature: F-1017: Validate Event to Update TTL
335329

336330
Then a positive response is received
337331
And the response has all other details as expected
338-
And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today]
332+
And the response [does not contain the TTL as citizen user has no access]
339333

340334
@S-1017.26 #CCD-3562
341335
Scenario: Trigger a mid event callback that changes TTL set to null. Mid Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1

src/aat/resources/features/F-1017 - Validate Event to Update TTL/S-1017.21.td.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"has a TTLIncrement of 20 days configured",
1919
"is configured to trigger a mid event callback that changes the TTL.Suspended value (null -> missing)",
2020

21-
"contains the TTL.SystemTTL for the case, that has been set to 20 days from today",
22-
"contains the TTL.OverrideTTL from the previouse data",
23-
"does not contain the TTL.Suspended as removed by callback (null -> missing)"
21+
"does not contain the TTL as citizen user has no access"
2422
],
2523

2624
"users": {
@@ -62,10 +60,6 @@
6260
"expectedResponse": {
6361
"body": {
6462
"data": {
65-
"TTL": {
66-
"SystemTTL": "${[scenarioContext][customValues][dateTwentyDaysFromToday]}",
67-
"OverrideTTL": "${[scenarioContext][customValues][dateGreaterThanTTLGuardDate]}"
68-
},
6963
"TextField" : "[[ANYTHING_PRESENT]]"
7064
}
7165
}

src/aat/resources/features/F-1017 - Validate Event to Update TTL/S-1017.22.td.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"is configured to trigger a mid event callback that changes the TTL.OverrideTTL value (null -> missing)",
2020
"is configured to trigger a mid event callback that changes the TTL.Suspended value (No -> NO)",
2121

22-
"contains the TTL.SystemTTL for the case, that has been set to 20 days from today",
23-
"does not contain the TTL.OverrideTTL as removed by callback (null -> missing)",
24-
"contains the adjusted TTL.Suspended from the callback (No -> NO)"
22+
"does not contain the TTL as citizen user has no access"
2523
],
2624

2725
"users": {
@@ -63,10 +61,6 @@
6361
"expectedResponse": {
6462
"body": {
6563
"data": {
66-
"TTL": {
67-
"SystemTTL": "${[scenarioContext][customValues][dateTwentyDaysFromToday]}",
68-
"Suspended": "NO"
69-
},
7064
"TextField" : "[[ANYTHING_PRESENT]]"
7165
}
7266
}

src/aat/resources/features/F-1017 - Validate Event to Update TTL/S-1017.23.td.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"is configured to trigger a mid event callback that changes the TTL.OverrideTTL value (null -> missing)",
2020
"is configured to trigger a mid event callback that changes the TTL.Suspended value (Yes -> YES)",
2121

22-
"contains the TTL.SystemTTL for the case, that has been set to 20 days from today",
23-
"does not contain the TTL.OverrideTTL as removed by callback (null -> missing)",
24-
"contains the adjusted TTL.Suspended from the callback (Yes -> YES)"
22+
"does not contain the TTL as citizen user has no access"
2523
],
2624

2725
"users": {
@@ -63,10 +61,6 @@
6361
"expectedResponse": {
6462
"body": {
6563
"data": {
66-
"TTL": {
67-
"SystemTTL": "${[scenarioContext][customValues][dateTwentyDaysFromToday]}",
68-
"Suspended": "YES"
69-
},
7064
"TextField" : "[[ANYTHING_PRESENT]]"
7165
}
7266
}

src/aat/resources/features/F-1017 - Validate Event to Update TTL/S-1017.25.td.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"has a TTLIncrement of 20 days configured",
1717
"is configured to trigger a mid event callback that responds with TTL missing",
1818

19-
"contains the TTL.SystemTTL for the case, that has been set to 20 days from today"
19+
"does not contain the TTL as citizen user has no access"
2020
],
2121

2222
"users": {
@@ -52,11 +52,6 @@
5252
"expectedResponse": {
5353
"body": {
5454
"data": {
55-
"TTL" : {
56-
"SystemTTL" : "${[scenarioContext][customValues][dateTwentyDaysFromToday]}",
57-
"OverrideTTL" : null,
58-
"Suspended" : "No"
59-
},
6055
"TextField" : "[[ANYTHING_PRESENT]]"
6156
}
6257
}

src/main/java/uk/gov/hmcts/ccd/domain/service/validate/AuthorisedValidateCaseFieldsOperation.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public Map<String, JsonNode> validateCaseDetails(OperationContext operationConte
6363
content.setData(JacksonUtils.convertValue(data));
6464

6565
String caseReference = content.getCaseReference();
66-
Set<AccessProfile> accessProfiles = StringUtils.isNotEmpty(caseReference)?
67-
caseAccessService.getAccessProfilesByCaseReference(caseReference) :
66+
Set<AccessProfile> accessProfiles = StringUtils.isNotEmpty(caseReference)
67+
? caseAccessService.getAccessProfilesByCaseReference(caseReference) :
6868
caseAccessService.getCaseCreationRoles(caseTypeId);
6969

7070
verifyReadAccess(caseTypeId, content, accessProfiles);

0 commit comments

Comments
 (0)