Skip to content
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

AM-3058: FTA for ET Judicial ORG roles. #1686

Merged
merged 10 commits into from
Dec 13, 2023
42 changes: 42 additions & 0 deletions src/functionalTest/resources/features/F-010/F-010.feature
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,45 @@ Feature: F-010 : Create Role Assignments for EmploymentTribunal Caseworker and J
Then a positive response is received,
And the response has all other details as expected
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-105_DeleteDataForRoleAssignments].

@S-106
@FeatureToggle(DB:employment_wa_1_0=on)
Scenario: must successfully create judicial role mapping for Regional Employment Judge - Salaried appointment
Given a user with [an active IDAM profile with full permissions],
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-106_DeleteDataForRoleAssignments],
And a successful call [to publish existing JRD user ids to endpoint] as in [S-106_PushMessageToJRDService],
And a successful call [to provide adequate time for RAS to create records] as in [WaitForRASProcessing],
And the request [contains the actorIds of the user just published],
When a request is prepared with appropriate values,
And it is submitted to call the [Fetch Assignment From Role Assignment Service] operation of [Role Assignment Service],
Then a positive response is received,
And the response has all other details as expected
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-106_DeleteDataForRoleAssignments].

@S-107
@FeatureToggle(DB:employment_wa_1_0=on)
Scenario: must successfully create judicial role mapping for Employment Judge - Fee Paid appointment
Given a user with [an active IDAM profile with full permissions],
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-107_DeleteDataForRoleAssignments],
And a successful call [to publish existing JRD user ids to endpoint] as in [S-107_PushMessageToJRDService],
And a successful call [to provide adequate time for RAS to create records] as in [WaitForRASProcessing],
And the request [contains the actorIds of the user just published],
When a request is prepared with appropriate values,
And it is submitted to call the [Fetch Assignment From Role Assignment Service] operation of [Role Assignment Service],
Then a positive response is received,
And the response has all other details as expected
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-107_DeleteDataForRoleAssignments].

@S-108
@FeatureToggle(DB:employment_wa_1_0=on)
Scenario: must successfully create judicial role mapping for Tribunal Member - Fee Paid appointment
Given a user with [an active IDAM profile with full permissions],
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-108_DeleteDataForRoleAssignments],
And a successful call [to publish existing JRD user ids to endpoint] as in [S-108_PushMessageToJRDService],
And a successful call [to provide adequate time for RAS to create records] as in [WaitForRASProcessing],
And the request [contains the actorIds of the user just published],
When a request is prepared with appropriate values,
And it is submitted to call the [Fetch Assignment From Role Assignment Service] operation of [Role Assignment Service],
Then a positive response is received,
And the response has all other details as expected
And a successful call [to delete existing role assignments corresponding to the test actorId] as in [S-108_DeleteDataForRoleAssignments].
182 changes: 182 additions & 0 deletions src/functionalTest/resources/features/F-010/S-106.td.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
{
"_guid_": "S-106",
"title": "must successfully create judicial role mapping for Regional Employment Judge - Salaried appointment",
"_extends_": "F-010_Test_Data_Base",
"specs": [
"contains the actorIds of the user just published"
],
"method": "POST",
"uri": "{{ROLE_ASSIGNMENT_URL}}/am/role-assignments/query",
"request": {
"headers": {
"sort": "roleName",
"direction": "ASC",
"Content-Type": "application/vnd.uk.gov.hmcts.role-assignment-service.post-assignment-query-request+json;charset=UTF-8;version=2.0"
},
"body": {
"queryRequests":[
{
"actorId": "${[scenarioContext][childContexts][S-106_DeleteDataForRoleAssignments][testData][request][body][userIds]}",
"roleName": ["hmcts-judiciary"],
"attributes": {
"contractType": ["Salaried"]
}
},
{
"actorId": "${[scenarioContext][childContexts][S-106_DeleteDataForRoleAssignments][testData][request][body][userIds]}",
"attributes": {
"jurisdiction": ["EMPLOYMENT"]
}
}
]
}
},
"expectedResponse": {
"_extends_": "Common_200_Response",
"body": {
"roleAssignmentResponse": [
{
"id" : "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "case-allocator",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime" : "[[ANYTHING_PRESENT]]",
"created" : "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"contractType": "Salaried",
"primaryLocation" : "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
},
{
"id" : "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "hearing-viewer",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime" : "[[ANYTHING_PRESENT]]",
"created" : "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"primaryLocation" : "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
},
{
"id": "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "hmcts-judiciary",
"classification": "PRIVATE",
"grantType": "BASIC",
"roleCategory": "JUDICIAL",
"readOnly": true,
"beginTime" : "[[ANYTHING_PRESENT]]",
"created" : "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"contractType": "Salaried"
}
},
{
"id": "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "judge",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime": "[[ANYTHING_PRESENT]]",
"created": "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "Y",
"contractType": "Salaried",
"primaryLocation": "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT",
"region": "[[ANYTHING_PRESENT]]",
"workTypes": "hearing_work,decision_making_work,routine_work,applications,amendments"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
},
{
"id": "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "leadership-judge",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime": "[[ANYTHING_PRESENT]]",
"created": "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "Y",
"contractType": "Salaried",
"primaryLocation": "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT",
"region": "[[ANYTHING_PRESENT]]"
},
"authorisations": "[[ANYTHING_PRESENT]]"
},
{
"id": "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "specific-access-approver-judiciary",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime": "[[ANYTHING_PRESENT]]",
"created": "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"contractType": "Salaried",
"primaryLocation": "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT",
"region": "[[ANYTHING_PRESENT]]",
"workTypes": "access_requests"
},
"authorisations": "[[ANYTHING_PRESENT]]"
},
{
"id" : "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][1][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "task-supervisor",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime" : "[[ANYTHING_PRESENT]]",
"created" : "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"contractType": "Salaried",
"primaryLocation" : "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"_guid_": "S-106_DeleteDataForRoleAssignments",
"productName": "Role Assignment Service",
"operationName": "Delete Role Assignments by Process",
"method": "DELETE",
"uri": "{{ROLE_ASSIGNMENT_URL}}/am/role-assignments?process={process}&reference={reference}",
"specs": [
"to delete role assignments just created above",
SivaKanukolluQA marked this conversation as resolved.
Show resolved Hide resolved
"to delete existing role assignments corresponding to the test actorId"
],
"users": {
"invokingUser": {
"_extends_": "AmBeftaUser1"
}
},
"request": {
"headers": {
"Authorization": "[[DEFAULT_AUTO_VALUE]]",
"ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]",
"X-Correlation-ID": "003352d0-e699-48bc-b6f5-5810411e60af"
},
"pathVariables": {
"process": "staff-organisational-role-mapping",
SivaKanukolluQA marked this conversation as resolved.
Show resolved Hide resolved
"reference":"${[scenarioContext][testData][request][body][userIds][0]}"
},
"body": {
"_extends_": "S-106_JRDEmploymentJudgeSalariedUser"
}
},

"expectedResponse": {
"headers": {
"Content-Length": "[[ANYTHING_PRESENT]]",
"Content-Type": "application/json"
},
"_extends_": "Common_204_Response"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"_guid_": "S-106_JRDEmploymentJudgeSalariedUser",

"userIds": [
"6548dbf7-fde6-4ad0-b7aa-511e39f824fb"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"_guid_": "S-106_PushMessageToJRDService",
"_extends_": "PushMessageToJRDProfileProcess",

"request": {
"body": {
"_extends_": "S-106_JRDEmploymentJudgeSalariedUser"
}
}
}
76 changes: 76 additions & 0 deletions src/functionalTest/resources/features/F-010/S-107.td.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"_guid_": "S-107",
"title": "must successfully create judicial role mapping for Employment Judge - Fee Paid appointment",
"_extends_": "F-010_Test_Data_Base",
"specs": [
"contains the actorIds of the user just published"
],
"method": "POST",
"uri": "{{ROLE_ASSIGNMENT_URL}}/am/role-assignments/query",
"request": {
"headers": {
"sort": "roleName",
"direction": "ASC",
"Content-Type": "application/vnd.uk.gov.hmcts.role-assignment-service.post-assignment-query-request+json;charset=UTF-8;version=2.0"
},
"body": {
"queryRequests":[
{
"actorId": "${[scenarioContext][childContexts][S-107_DeleteDataForRoleAssignments][testData][request][body][userIds]}",
"attributes": {
"jurisdiction": ["EMPLOYMENT"]
}
}
]
}
},
"expectedResponse": {
"_extends_": "Common_200_Response",
"body": {
"roleAssignmentResponse": [
{
"id": "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][0][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "fee-paid-judge",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime": "[[ANYTHING_PRESENT]]",
"endTime" : "[[ANYTHING_PRESENT]]",
"created": "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"contractType": "Fee-Paid",
"primaryLocation": "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT",
"workTypes": "hearing_work,decision_making_work,routine_work,applications,amendments"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
},
{
"id" : "[[ANYTHING_PRESENT]]",
"actorIdType": "IDAM",
"actorId": "${[scenarioContext][testData][request][body][queryRequests][0][actorId][0]}",
"roleType": "ORGANISATION",
"roleName": "hearing-viewer",
"classification": "PUBLIC",
"grantType": "STANDARD",
"roleCategory": "JUDICIAL",
"readOnly": false,
"beginTime" : "[[ANYTHING_PRESENT]]",
"endTime" : "[[ANYTHING_PRESENT]]",
"created" : "[[ANYTHING_PRESENT]]",
"attributes": {
"substantive": "N",
"primaryLocation" : "[[ANYTHING_PRESENT]]",
"jurisdiction": "EMPLOYMENT"
},
"authorisations" : "[[ANYTHING_PRESENT]]"
}
]
}
}
}
Loading