-
Notifications
You must be signed in to change notification settings - Fork 30
CCD-6207 #2552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
patelila
wants to merge
29
commits into
master
Choose a base branch
from
CCD-6207_Retrieve_access-metadata-case-ID
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CCD-6207 #2552
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6ab4e63
FT changes for CCD-6207
patelila cf47b0d
fix Version of java helm chart below 5.3.0 is deprecated, please upgr…
patelila 9871159
Bumping chart version/ fixing aliases
hmcts-jenkins-a-to-c[bot] 002063d
empty commit to trigger build
patelila db1657c
Merge remote-tracking branch 'origin/CCD-6207_Retrieve_access-metadat…
patelila a3d4f19
empty commit to trigger build
patelila ae4b646
Added "organisationStatus", "organisationProfileIds" to expected resp…
patelila 035fa0b
empty commit to trigger build
patelila 2e58246
empty commit to trigger build
patelila 80fc27b
renamed caseMetadataResource to CaseAccessMetadataResource
patelila caf5de1
use caseAccessMetadata instead
patelila e489b7b
fix FT
patelila 1de4193
fix FT, revert change
patelila e813437
empty commit to trigger build
patelila 55e72ad
use the correct PR's of definition-store and data-store
patelila f868eb4
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 086a4ea
use correct pr no.
patelila 971a66b
Readme changes to make easy to copy commands
patelila 9601d64
empty commit to trigger build
patelila ab33692
Removed unnecessary code
patelila 87bc682
empty commit to trigger build
patelila 5b59fda
use normal pr's
patelila 6c278a6
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 7541779
fix pipline pointing to data-store-api PR-2552 and definition-store P…
patelila 595ae9f
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 992456d
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 176a29b
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 72c7ced
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
patelila 01bbf54
Merge branch 'master' into CCD-6207_Retrieve_access-metadata-case-ID
RebeccaBaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -27,7 +27,7 @@ java: | |
DATA_STORE_DB_PASSWORD: "{{ .Values.postgresql.auth.password}}" | ||
DATA_STORE_DB_OPTIONS: "?stringtype=unspecified" | ||
DATA_STORE_DB_MAX_POOL_SIZE: 10 | ||
DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-575-java/ | ||
DEFINITION_STORE_HOST: http://ccd-definition-store-api-pr-1540-java/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to be reverted prior to merging |
||
USER_PROFILE_HOST: http://ccd-user-profile-api-pr-399-java/ | ||
ELASTIC_SEARCH_ENABLED: true # enable whenever ES required on a particular PR | ||
ELASTIC_SEARCH_NODES_DISCOVERY_ENABLED: true | ||
|
52 changes: 52 additions & 0 deletions
52
src/aat/resources/features/F-065a - Get Case V2 Internal/F-065a.feature
This file contains hidden or 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,52 @@ | ||
#========================================================== | ||
@F-065a | ||
Feature: F-065a: Retrieve access metadata for a given case ID | ||
#========================================================== | ||
|
||
Background: Load test data for the scenario | ||
Given an appropriate test context as detailed in the test data source | ||
|
||
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
@S-065a.1 | ||
Scenario: must return case access metadata when the case reference exists | ||
|
||
Given a case that has just been created as in [Standard_Full_Case_Creation_Data], | ||
And a user with [an active profile in CCD], | ||
And a successful call [to get an event token for just created case] as in [S-065a-Prerequisite], | ||
And another successful call [to update case with the token just created] as in [S-065a-Prerequisite_Case_Update], | ||
|
||
When a request is prepared with appropriate values, | ||
And the request [contains a case that has just been created as in Standard_Full_Case_Creation_Data], | ||
And it is submitted to call the [Retrieve access metadata for a given case ID] operation of [CCD Data Store], | ||
|
||
Then a positive response is received, | ||
And the response [contains details of the case just created, along with an HTTP-200 OK], | ||
And the response [contains the case access metadata], | ||
And the response has all other details as expected. | ||
|
||
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
@S-065a.2 | ||
Scenario: must return null when case reference does NOT exist | ||
|
||
Given a user with [an active profile in CCD], | ||
|
||
When a request is prepared with appropriate values, | ||
And the request [uses case-reference which does not exist in CCD], | ||
And it is submitted to call the [Retrieve access metadata for a given case ID] operation of [CCD Data Store], | ||
|
||
Then a positive response is received, | ||
And the response [has an HTTP-200 OK], | ||
And the response [contains the case access metadata with null], | ||
|
||
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
@S-065a.3 | ||
Scenario: must return 400 when case reference is invalid | ||
|
||
Given a user with [an active profile in CCD], | ||
|
||
When a request is prepared with appropriate values, | ||
And the request [uses an invalid case-reference], | ||
And it is submitted to call the [Retrieve access metadata for a given case ID] operation of [CCD Data Store], | ||
|
||
Then a negative response is received, | ||
And the response [has an HTTP-400 code] |
31 changes: 31 additions & 0 deletions
31
...rces/features/F-065a - Get Case V2 Internal/F-065a_Test_Data_Access_Metadata_Base.td.json
This file contains hidden or 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,31 @@ | ||
{ | ||
"_guid_": "F-065a_Test_Data_Access_Metadata_Base", | ||
|
||
"productName": "CCD Data Store", | ||
"operationName": "Retrieve access metadata for a given case ID", | ||
|
||
"method": "GET", | ||
"uri": "/internal/cases/{cid}/access-metadata", | ||
|
||
"user": { | ||
"_extends_": "Common_User_For_Request" | ||
}, | ||
|
||
"request": { | ||
"_extends_": "Common_Request", | ||
"headers": { | ||
"experimental": true | ||
}, | ||
"pathVariables": { | ||
"cid": "1234567890123456" | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"headers": { | ||
"_extends_": "Common_Response_Headers", | ||
"Content-Type": "[[ANYTHING_PRESENT]]", | ||
"Content-Encoding": "gzip" | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/aat/resources/features/F-065a - Get Case V2 Internal/S-065a-Prerequisite.td.json
This file contains hidden or 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,44 @@ | ||
{ | ||
"_guid_": "S-065a-Prerequisite", | ||
"title": "should create an event token for correct inputs", | ||
|
||
"productName": "CCD Data Store", | ||
"operationName": "Retrieve a create token", | ||
|
||
"method": "GET", | ||
"uri": "/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/cases/{cid}/event-triggers/{etid}/token", | ||
|
||
"specs": [ | ||
"to get an event token for just created case" | ||
], | ||
|
||
"user": { | ||
"_extends_": "Common_User_For_Request" | ||
}, | ||
|
||
"request": { | ||
"headers": { | ||
"_extends_": "Common_Request_Headers" | ||
}, | ||
"pathVariables": { | ||
"uid": "[[DEFAULT_AUTO_VALUE]]", | ||
"jid": "AUTOTEST1", | ||
"ctid": "AAT_AUTH_15", | ||
"cid": "${[scenarioContext][parentContext][childContexts][Standard_Full_Case_Creation_Data][testData][actualResponse][body][id]}", | ||
"etid": "UPDATE" | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"_extends_": "Common_200_Response", | ||
"headers": { | ||
"Content-Encoding": "gzip", | ||
"Content-Length": "[[ANYTHING_PRESENT]]" | ||
}, | ||
"body": { | ||
"token": "[[ANYTHING_PRESENT]]", | ||
"case_details": "[[ANYTHING_PRESENT]]", | ||
"event_id": "UPDATE" | ||
} | ||
} | ||
} |
184 changes: 184 additions & 0 deletions
184
.../resources/features/F-065a - Get Case V2 Internal/S-065a-Prerequisite_Case_Update.td.json
This file contains hidden or 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,184 @@ | ||
{ | ||
"_guid_": "S-065a-Prerequisite_Case_Update", | ||
"title": "should update an existing case with correct inputs", | ||
|
||
"productName": "CCD Data Store", | ||
"operationName": "Submit update case event", | ||
|
||
"method": "POST", | ||
"uri": "/caseworkers/{uid}/jurisdictions/{jid}/case-types/{ctid}/cases/{cid}/events", | ||
|
||
"specs": [ | ||
"to update case with the token just created" | ||
], | ||
|
||
"user": { | ||
"_extends_": "Common_User_For_Request" | ||
}, | ||
|
||
"request": { | ||
"headers": { | ||
"_extends_": "Common_Request_Headers" | ||
}, | ||
"pathVariables": { | ||
"uid": "[[DEFAULT_AUTO_VALUE]]", | ||
"jid": "AUTOTEST1", | ||
"ctid": "AAT_AUTH_15", | ||
"cid": "${[scenarioContext][parentContext][childContexts][Standard_Full_Case_Creation_Data][testData][actualResponse][body][id]}" | ||
}, | ||
"body": { | ||
"data": { | ||
"MoneyGBPField": "4300", | ||
"FixedListField": "VALUE3", | ||
"AddressUKField": { | ||
"County": "Greater London", | ||
"Country": "UK", | ||
"PostCode": "SW1H 9AJ", | ||
"PostTown": "Westminster", | ||
"AddressLine1": "102 Petty France", | ||
"AddressLine2": "CCD", | ||
"AddressLine3": "c/o HMCTS Reform" | ||
}, | ||
"ComplexField": { | ||
"ComplexTextField": "Nested text", | ||
"ComplexFixedListField": "VALUE2" | ||
}, | ||
"DateTimeField": "1988-07-07T22:20:00", | ||
"PhoneUKField": "07123456789", | ||
"NumberField": "164528", | ||
"MultiSelectListField": [ | ||
"OPTION2", | ||
"OPTION4" | ||
], | ||
"YesOrNoField": "Yes", | ||
"EmailField": "[email protected]", | ||
"TextField": "Some Text", | ||
"DateField": "2017-02-13", | ||
"TextAreaField": "Line1\nLine2", | ||
"CollectionField": [ | ||
{ | ||
"id": "4926d94c-1fa3-4c16-b5ba-5a122d8c622d", | ||
"value": "Alias 1" | ||
}, | ||
{ | ||
"id": "936b6a65-a179-474f-bdff-1d4f961e9a8c", | ||
"value": "Alias 2" | ||
} | ||
] | ||
}, | ||
"event": { | ||
"id": "UPDATE", | ||
"summary": "", | ||
"description": "" | ||
}, | ||
"event_token": "${[scenarioContext][parentContext][childContexts][S-065a-Prerequisite][testData][actualResponse][body][token]}", | ||
"ignore_warning": false | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"_extends_": "Common_201_Response", | ||
"headers": { | ||
"vary": "accept-encoding", | ||
"Content-Length": "[[ANYTHING_PRESENT]]", | ||
"Content-Encoding": "gzip" | ||
}, | ||
"body": { | ||
"id": "[[ANYTHING_PRESENT]]", | ||
"jurisdiction": "AUTOTEST1", | ||
"state": "TODO", | ||
"version": 1, | ||
"case_type_id": "AAT_AUTH_15", | ||
"last_state_modified_date": "[[ANYTHING_PRESENT]]", | ||
"created_date": "[[ANYTHING_PRESENT]]", | ||
"last_modified": "[[ANYTHING_PRESENT]]", | ||
"security_classification": "PUBLIC", | ||
"case_data": { | ||
"MoneyGBPField": "[[ANYTHING_PRESENT]]", | ||
"FixedListField": "VALUE3", | ||
"AddressUKField": { | ||
"County": "Greater London", | ||
"Country": "UK", | ||
"PostCode": "SW1H 9AJ", | ||
"PostTown": "Westminster", | ||
"AddressLine1": "102 Petty France", | ||
"AddressLine2": "CCD", | ||
"AddressLine3": "c/o HMCTS Reform" | ||
}, | ||
"ComplexField": { | ||
"ComplexTextField": "Nested text", | ||
"ComplexFixedListField": "VALUE2" | ||
}, | ||
"DateTimeField": "[[ANYTHING_PRESENT]]", | ||
"PhoneUKField": "07123456789", | ||
"NumberField": "164528", | ||
"MultiSelectListField": [ | ||
"OPTION2", | ||
"OPTION4" | ||
], | ||
"YesOrNoField": "Yes", | ||
"EmailField": "[email protected]", | ||
"TextField": "Some Text", | ||
"DateField": "2017-02-13", | ||
"TextAreaField": "Line1\nLine2", | ||
"CollectionField": [ | ||
{ | ||
"value": "Alias 1", | ||
"id": "[[ANYTHING_PRESENT]]" | ||
}, | ||
{ | ||
"value": "Alias 2", | ||
"id": "[[ANYTHING_PRESENT]]" | ||
} | ||
] | ||
}, | ||
"data_classification": { | ||
"MoneyGBPField": "PUBLIC", | ||
"FixedListField": "PUBLIC", | ||
"AddressUKField": { | ||
"classification": "PUBLIC", | ||
"value": { | ||
"County": "PUBLIC", | ||
"Country": "PUBLIC", | ||
"PostCode": "PUBLIC", | ||
"PostTown": "PUBLIC", | ||
"AddressLine1": "PUBLIC", | ||
"AddressLine2": "PUBLIC", | ||
"AddressLine3": "PUBLIC" | ||
} | ||
}, | ||
"DateTimeField": "PUBLIC", | ||
"PhoneUKField": "PUBLIC", | ||
"NumberField": "PUBLIC", | ||
"MultiSelectListField": "PUBLIC", | ||
"YesOrNoField": "PUBLIC", | ||
"EmailField": "PUBLIC", | ||
"TextField": "PUBLIC", | ||
"DateField": "PUBLIC", | ||
"TextAreaField": "PUBLIC", | ||
"CollectionField": { | ||
"classification": "PUBLIC", | ||
"value": [ | ||
{ | ||
"__ordering__": "ordered" | ||
}, | ||
{ | ||
"id": "[[ANYTHING_PRESENT]]", | ||
"classification": "PUBLIC" | ||
}, | ||
{ | ||
"id": "[[ANYTHING_PRESENT]]", | ||
"classification": "PUBLIC" | ||
} | ||
] | ||
} | ||
}, | ||
"supplementary_data": null, | ||
"after_submit_callback_response": null, | ||
"callback_response_status_code": null, | ||
"callback_response_status": null, | ||
"delete_draft_response_status_code": null, | ||
"delete_draft_response_status": null | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/aat/resources/features/F-065a - Get Case V2 Internal/S-065a.1.td.json
This file contains hidden or 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,31 @@ | ||
{ | ||
"_guid_": "S-065a.1", | ||
"_extends_": "F-065a_Test_Data_Access_Metadata_Base", | ||
"title": "must return case view history when the case reference exists", | ||
|
||
"specs": [ | ||
"an active profile in CCD", | ||
"contains a case that has just been created as in Standard_Full_Case_Creation_Data", | ||
"contains details of the case just created, along with an HTTP-200 OK", | ||
"contains the case access metadata" | ||
], | ||
|
||
"request": { | ||
"pathVariables": { | ||
"cid": "${[scenarioContext][childContexts][Standard_Full_Case_Creation_Data][testData][actualResponse][body][id]}" | ||
} | ||
}, | ||
|
||
"expectedResponse": { | ||
"_extends_": "Common_200_Response", | ||
"headers": { | ||
"Vary": "Accept-Encoding", | ||
"Transfer-Encoding": "chunked", | ||
"Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-access-metadata.v2+json;charset=UTF-8" | ||
}, | ||
"body": { | ||
"accessGrants" : [ "STANDARD" ], | ||
"accessProcess" : "NONE" | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be reverted prior to merging