generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
178 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/functionalTest/resources/features/F-002/F-002_Test_Stream_Base.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"_guid_": "F-002_Test_Stream_Base", | ||
"_extends_": "F-002-Base-Root", | ||
"productName": "CCD Case Document AM API", | ||
"operationName": "Stream Binary Content by Document ID", | ||
"s2sClientId": "xui_webapp", | ||
"specs": [ | ||
"an active caseworker profile in CCD with full permissions on a document field" | ||
], | ||
"method": "GET", | ||
"uri": "/v2/cases/documents/{documentId}/binary" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"title": "must successfully stream a document's binary content", | ||
"_guid_": "S-024", | ||
"_extends_": "F-002_Test_Stream_Base", | ||
"specs": [ | ||
"contains the binary content for the uploaded document" | ||
], | ||
"request": { | ||
"pathVariables": { | ||
"documentId": "${[scenarioContext][childContexts][Default_Document_Upload_Data][customValues][documentIdInTheResponse]}" | ||
} | ||
}, | ||
"expectedResponse": { | ||
"_extends_": "Common_200_Response", | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Content-Disposition": "[[ANYTHING_PRESENT]]", | ||
"Content-Type": "[[ANYTHING_PRESENT]]", | ||
"data-source": "contentURI", | ||
"OriginalFileName": "[[ANYTHING_PRESENT]]", | ||
"Content-Encoding": "gzip", | ||
"Transfer-Encoding": "chunked" | ||
}, | ||
"body": { | ||
"__fileInBody__": { | ||
"fullPath": "file", | ||
"size": "[[ANYTHING_PRESENT]]", | ||
"contentHash": "hash" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"title": "must receive an error response from streaming endpoint for a non existing document id", | ||
"_guid_": "S-025", | ||
"_extends_": "F-002_Test_Stream_Base", | ||
"specs": [ | ||
"contains a non existing document id" | ||
], | ||
"request": { | ||
"pathVariables": { | ||
"documentId": "00000000-0000-0000-0000-000000000000" | ||
} | ||
}, | ||
"expectedResponse": { | ||
"_extends_": "AM_404_Response", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"error": "Meta data does not exist for documentId: 00000000-0000-0000-0000-000000000000" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"title": "must receive an error response from streaming endpoint for a malformed document ID", | ||
"_guid_": "S-026", | ||
"_extends_": "F-002_Test_Stream_Base", | ||
"specs": [ | ||
"contains a malformed document ID" | ||
], | ||
"request": { | ||
"pathVariables": { | ||
"documentId": "8de9957b-d7a6-40a1-@£$&-6aac30d33644" | ||
} | ||
}, | ||
"expectedResponse": { | ||
"_extends_": "AM_400_Response", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"error": "[[ANYTHING_PRESENT]]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"title": "must receive an error response from streaming endpoint for an active caseworker who does not have document access", | ||
"_guid_": "S-027", | ||
"_extends_": "F-002_Test_Stream_Base", | ||
"specs": [ | ||
"an active caseworker profile in CCD with limited permissions on a document field", | ||
"contains an active caseworker who does not have document access" | ||
], | ||
"users": { | ||
"invokingUser": { | ||
"username": "[email protected]", | ||
"password": "[[$CCD_BEFTA_CASEWORKER_2_SOLICITOR_1_PWD]]" | ||
} | ||
}, | ||
"request": { | ||
"pathVariables": { | ||
"documentId": "${[scenarioContext][childContexts][Default_Document_Upload_Data][customValues][documentIdInTheResponse]}" | ||
} | ||
}, | ||
"expectedResponse": { | ||
"_extends_": "AM_404_Response", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"error": "Case reference ${[scenarioContext][childContexts][S-027_Case_Create][testData][actualResponse][body][id]} not found for requested document." | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
src/functionalTest/resources/features/F-002/S-027_Case_Create.td.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"_guid_": "S-027_Case_Create", | ||
"_extends_": "Befta_Jurisdiction2_Default_Full_Case_Creation_Data" | ||
} |