diff --git a/src/aat/resources/features/F-045 - Grant Access V1/F-045.feature b/src/aat/resources/features/F-045 - Grant Access V1/F-045.feature index 7865641f15..b1f31463f4 100644 --- a/src/aat/resources/features/F-045 - Grant Access V1/F-045.feature +++ b/src/aat/resources/features/F-045 - Grant Access V1/F-045.feature @@ -23,6 +23,8 @@ Scenario: must return 201 if the grant is successful for a user to a valid case And the response [has the 201 return code], And the response has all other details as expected, And a call [to verify testUser has been granted a case role for the case] will get the expected response as in [F-045_Verify_Granted_Case_Role_for_Case]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-045_S-151_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-152 @@ -117,5 +119,7 @@ Scenario: must grant without removing other case roles And the response [has the 201 return code], And the response has all other details as expected, And a call [to verify testUser has been granted multiple case roles for the case] will get the expected response as in [F-045_Verify_Granted_Multiple_Case_Roles_for_Case]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-045_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-045 - Grant Access V1/F-045_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-045 - Grant Access V1/F-045_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..9923d7deb9 --- /dev/null +++ b/src/aat/resources/features/F-045 - Grant Access V1/F-045_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,40 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-045_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F-045_Befta_Jurisdiction2_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F-045_Befta_Jurisdiction2_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][testUser][id]}", + "case_role": "[DEFENDANT]" + } + + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-045 - Grant Access V1/F-045_S-151_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-045 - Grant Access V1/F-045_S-151_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..ac42bf99d7 --- /dev/null +++ b/src/aat/resources/features/F-045 - Grant Access V1/F-045_S-151_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,35 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-045_S-151_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker1" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][Standard_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-047 - Get Case IDs/F-047.feature b/src/aat/resources/features/F-047 - Get Case IDs/F-047.feature index 99bac758fd..f3da504362 100644 --- a/src/aat/resources/features/F-047 - Get Case IDs/F-047.feature +++ b/src/aat/resources/features/F-047 - Get Case IDs/F-047.feature @@ -21,6 +21,8 @@ Scenario: must return 200 and a list of case ids a user has access to Then a positive response is received, And the response [contains a list of case ids, along with an HTTP-200 OK], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-047_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-098 diff --git a/src/aat/resources/features/F-047 - Get Case IDs/F-047_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-047 - Get Case IDs/F-047_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..696e1e5112 --- /dev/null +++ b/src/aat/resources/features/F-047 - Get Case IDs/F-047_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,35 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-047_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker1" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][Standard_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053.feature b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053.feature index dad9c99a63..dcd6025212 100644 --- a/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053.feature +++ b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053.feature @@ -19,7 +19,9 @@ Scenario: must create case successfully and return positive response HTTP-201 f Then a positive response is received, And the response [code is HTTP-201], - And the response has all other details as expected. + And the response has all other details as expected, + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-053_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-270 @Ignore # wrong scenario in Excel @@ -173,5 +175,7 @@ Scenario: must create and update successfully the respective fields with ACL per And the response has all other details as expected, And another successful call [to get an update event token for the case just created] as in [S-578-Prerequisite_Citizen_Token_For_Update_Case], And a call [to update the DocumentField4 of same case by Citizen who doesn't have privilege to update DocumentField4] will get the expected response as in [S-578_Later_Case_Update_By_Citizen]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-053_578_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_578_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_578_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..29fbbee53b --- /dev/null +++ b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_578_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-053_578_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..e106549491 --- /dev/null +++ b/src/aat/resources/features/F-053 - Create Case Citizen V1 External/F-053_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-053_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054.feature b/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054.feature index 5015541099..e473e39b30 100644 --- a/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054.feature +++ b/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054.feature @@ -20,7 +20,10 @@ Scenario: must return 200 and list of case data for the given case id Then a positive response is received, And the response [code is HTTP-200], - And the response has all other details as expected. + And the response has all other details as expected, + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-054_Remove_Case_Assigned_User_role_for_Case]. + #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-094 @Ignore # Response code mismatch, expected: 401, actual: 403 (defect RDM-6628) @@ -114,6 +117,8 @@ Scenario: must return negative response HTTP-403 when request contains a non-ex Then a negative response is received, And the response [code is HTTP-403], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-054_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-566 @Ignore # Response code mismatch, expected: 400, actual: 200 / RDM-7066 @@ -179,5 +184,7 @@ Scenario: must return negative response HTTP-403 when request contains a malfor Then a negative response is received, And the response [code is HTTP-403], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-054_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f3c9ab2037 --- /dev/null +++ b/src/aat/resources/features/F-054 - Get Case Data Citizen V1 External/F-054_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-054_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor3" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][Citizen_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055.feature b/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055.feature index ef109b2047..3f54dbb458 100644 --- a/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055.feature +++ b/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055.feature @@ -21,6 +21,8 @@ Scenario: must return 200 if start event trigger is successful for a case Then a positive response is received, And the response [contains an event token for the triggered event, along with a HTTP 200 OK], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-055_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-252 @Ignore # expected 401 but got 403 (defect RDM-6628) @@ -81,5 +83,7 @@ Scenario: must return 422 when start event trigger has failed Then a negative response is received, And the response [contains a HTTP 422 Unprocessable Entity], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-055_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..2c19424438 --- /dev/null +++ b/src/aat/resources/features/F-055 - Start Event Creation Citizen V1 External/F-055_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-055_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor3" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][Citizen_Full_Case_Creation_Data][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-053_584_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-053_584_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..22ebd7e3c0 --- /dev/null +++ b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-053_584_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-053_584_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056.feature b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056.feature index 046d07bec6..0a21345451 100644 --- a/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056.feature +++ b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056.feature @@ -70,6 +70,8 @@ Scenario: must return 201 when start event creation process for appropriate inpu Then a positive response is received, And the response [includes the case detail for the updated case, along with a HTTP 200 OK], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-056_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @S-584 @@ -92,6 +94,8 @@ Scenario: must update successfully the respective fields with ACL permissions fo And the response has all other details as expected, And another successful call [to get an update event token for the case just created] as in [S-584-Prerequisite_Citizen_Token_For_Update_Case], And a call [to update the values for DocumentField4 from the same case, which the user does not have update permissions for] will get the expected response as in [S-584_Later_Case_Update_By_Citizen]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-053_584_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f8e5d709e2 --- /dev/null +++ b/src/aat/resources/features/F-056 - Submit Event Citizen V1 External/F-056_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-056_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004.feature b/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004.feature index bee6dd24cd..1d0fa766d5 100644 --- a/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004.feature +++ b/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004.feature @@ -23,6 +23,8 @@ Feature: F-1004: Global Search - Create and update cases And it is submitted to call the [Submit case creation as Citizen] operation of [CCD Data Store] Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.3 Scenario: Update the Data Store for "case create" using V2: /case-types/{caseTypeId}/cases endpoint @@ -55,6 +57,8 @@ Feature: F-1004: Global Search - Create and update cases And it is submitted to call the [Submit case update event creation as a Citizen (V1)] operation of [CCD Data Store] Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.6 Scenario: Update the Data Store for "case update" using V2: /cases/{caseId}/events endpoint @@ -88,6 +92,8 @@ Feature: F-1004: Global Search - Create and update cases Then a positive response is received And the response [contains a SearchCriteria with SearchParty excluding the Dates] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.9 Scenario: "Successfully creates a case with wrong data type for Date fields using V2: /case-types/{caseTypeId}/cases endpoint", @@ -123,6 +129,8 @@ Feature: F-1004: Global Search - Create and update cases Then a positive response is received And the response [contains a SearchCriteria with SearchParty excluding the Dates] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.12 Scenario: Successfully updates a case with wrong data type for Date fields using V2: /cases/{caseId}/events @@ -178,6 +186,8 @@ Feature: F-1004: Global Search - Create and update cases And it is submitted to call the [Submit case creation as Citizen] operation of [CCD Data Store] Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.17 Scenario: Update the Data Store for "case create" when valid data has been entered correctly in the CollectionFieldName using V2: /case-types/{caseTypeId}/cases endpoint @@ -212,6 +222,8 @@ Feature: F-1004: Global Search - Create and update cases Then a positive response is received, And the response [contains updated data including the search party fields in the collection fields as specified by the CollectionFieldName], And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1004_Remove_Case_Assigned_User_role_for_Case]. @S-1004.20 Scenario: Update the Data Store for "case update" when valid data has been entered correctly in the CollectionFieldName using V2: /cases/{caseId}/events endpoint diff --git a/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..fcb84d99a4 --- /dev/null +++ b/src/aat/resources/features/F-1004 - GlobalSearch - Create and update cases/F-1004_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1004_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-101 - Grant Access V2/F-101.feature b/src/aat/resources/features/F-101 - Grant Access V2/F-101.feature index 76b4ab759c..a8b636ede4 100644 --- a/src/aat/resources/features/F-101 - Grant Access V2/F-101.feature +++ b/src/aat/resources/features/F-101 - Grant Access V2/F-101.feature @@ -16,8 +16,11 @@ Feature: F-101: Grant access to case by updating User Roles Then a positive response is received, And the response [has the 204 return code], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-101_Remove_Case_Assigned_User_role_for_Case]. -@S-531 + + @S-531 Scenario: must return 204 when revoke is successful for a user to a valid case ID Given a user with [an active solicitor profile in CCD], And a user with [another active solicitor profile in CCD], diff --git a/src/aat/resources/features/F-101 - Grant Access V2/F-101_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-101 - Grant Access V2/F-101_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..15ccdbcac5 --- /dev/null +++ b/src/aat/resources/features/F-101 - Grant Access V2/F-101_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,40 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-101_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "username": "befta.caseworker.2.solicitor.2@gmail.com", + "password": "[[$CCD_CASEWORKER_AUTOTEST_PASSWORD]]" + }, + "solicitor3": { + "username": "befta.caseworker.2.solicitor.3@gmail.com", + "password": "[[$CCD_CASEWORKER_AUTOTEST_PASSWORD]]" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F101_Case_Data_Solicitor][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][solicitor3][id]}", + "case_role": "[DEFENDANT]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015.feature b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015.feature index 395f23e8a4..346f9ab7d0 100644 --- a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015.feature +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015.feature @@ -54,6 +54,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_Remove_Case_Assigned_User_role_for_Case]. @S-1015.2.repeat Scenario: TTLIncrement is set to "20" for the Case Event and Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -70,6 +72,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_2_repeat_Remove_Case_Assigned_User_role_for_Case]. @S-1015.3 #AC-3 Scenario: TTLIncrement is set to "20" for the Case Event and Start Event is invoked on v2_external#/start-event-controller/getStartEventTriggerUsingGET @@ -198,6 +202,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected And the response [contains the TTL.SystemTTL for the case, that has not been modified] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_Remove_Case_Assigned_User_role_for_Case]. @S-1015.8 #AC-8 Scenario: TTLIncrement is blank (Null) for the Case Event and Start Event is invoked on v2_external#/start-event-controller/getStartEventTriggerUsingGET @@ -414,6 +420,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_Remove_Case_Assigned_User_role_for_Case]. @S-1015.21 #AC-21 Scenario: TTLIncrement is set to "20" for the Case Event, TTL.SystemTTL has changed after About to Start Callback. Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -429,6 +437,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_Remove_Case_Assigned_User_role_for_Case]. @S-1015.22 #AC-22 Scenario: TTLIncrement is set to "20" for the Case Event, TTL.suspended has changed after About to Start Callback. Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -445,6 +455,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -521,6 +533,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_31_Remove_Case_Assigned_User_role_for_Case]. @S-1015.32 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (No -> NO). Start Event is invoked on v1_external#/case-details-endpoint/startEventForCaseworkerUsingGET @@ -542,6 +556,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_31_Remove_Case_Assigned_User_role_for_Case]. @S-1015.33 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (Yes -> YES). Start Event is invoked on v1_external#/case-details-endpoint/startEventForCaseworkerUsingGET @@ -563,6 +579,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_31_Remove_Case_Assigned_User_role_for_Case]. @S-1015.35 #CCD-3562 @@ -617,6 +635,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_41_Remove_Case_Assigned_User_role_for_Case]. @S-1015.42 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (No -> NO). Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -636,6 +656,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_41_Remove_Case_Assigned_User_role_for_Case]. @S-1015.43 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (Yes -> YES). Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -655,6 +677,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_41_Remove_Case_Assigned_User_role_for_Case]. @S-1015.45 #CCD-3562 @@ -670,6 +694,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_45_Remove_Case_Assigned_User_role_for_Case]. @S-1015.46 #CCD-3562 Scenario: Trigger a start event callback that changes TTL set to null. Start Event is invoked on v1_external#/case-details-endpoint/startEventForCitizenUsingGET @@ -685,6 +711,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_45_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -710,6 +738,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.52 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (No -> NO). Start Event is invoked on v2_external#/start-event-controller/getStartEventTriggerUsingGET @@ -731,6 +761,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.53 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (Yes -> YES). Start Event is invoked on v2_external#/start-event-controller/getStartEventTriggerUsingGET @@ -752,6 +784,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.55 #CCD-3562 @@ -808,6 +842,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.62 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (No -> NO). Start Event is invoked on v1_internal#/query-endpoint/getEventTriggerForCaseUsingGET @@ -829,6 +865,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.63 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (Yes -> YES). Start Event is invoked on v1_internal#/query-endpoint/getEventTriggerForCaseUsingGET @@ -850,6 +888,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.65 #CCD-3562 @@ -906,6 +946,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.72 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (No -> NO). Start Event is invoked on v2_internal#/ui-start-trigger-controller/getCaseUpdateViewEventUsingGET @@ -927,6 +969,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.73 #CCD-3535 Scenario: Trigger a start event callback that changes TTL.Suspended (Yes -> YES). Start Event is invoked on v2_internal#/ui-start-trigger-controller/getCaseUpdateViewEventUsingGET @@ -948,6 +992,8 @@ Feature: F-1015: Update Case - Start Case Event - Update Code for TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1015_51_Remove_Case_Assigned_User_role_for_Case]. @S-1015.75 #CCD-3562 diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_2_repeat_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_2_repeat_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..3014ecadb7 --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_2_repeat_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_2_repeat_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1015_CreateCasePreRequisiteCitizen_noTTL][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_31_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_31_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..bec266cba7 --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_31_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_31_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaMasterSolicitorBecky" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_41_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_41_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f8da395789 --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_41_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,46 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_41_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaMasterSolicitorBecky" + }, + "testUser1": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser1][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_45_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_45_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..0f7fb409c4 --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_45_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_45_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_51_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_51_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f41e5d89df --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_51_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_51_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaMasterSolicitorBecky" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..1d5ceab8f2 --- /dev/null +++ b/src/aat/resources/features/F-1015 - Start Case Event TTL/F-1015_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1015_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1015_CreateCasePreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016.feature b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016.feature index 6570e9009d..648f502b15 100644 --- a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016.feature +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016.feature @@ -398,6 +398,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And a successful call [to verify that the TTL.Suspended value has not changed in the database] as in [F-1016_GetCaseDetails_Citizen] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.15.repeat Scenario: TTL.Suspended changed to null, SystemTTL and OverrideTTL less than Guard value and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -416,6 +418,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And a successful call [to verify that the TTL.Suspended value has not changed in the database] as in [F-1016_GetCaseDetails_Citizen] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.15.repeat.SystemTTL Scenario: TTL.Suspended changed to "No", SystemTTL less than Guard value, OverrideTTL NULL and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -434,6 +438,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And a successful call [to verify that the TTL.Suspended value has not changed in the database] as in [F-1016_GetCaseDetails_Citizen] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.15.repeat.OverrideTTL Scenario: TTL.Suspended changed to "No", SystemTTL greater than Guard value, OverrideTTL less than Guard value and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -452,6 +458,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And a successful call [to verify that the TTL.Suspended value has not changed in the database] as in [F-1016_GetCaseDetails_Citizen] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.16 #AC-2 #AC-10 Scenario: TTL.Suspended changed to "No", SystemTTL and OverrideTTL are NULL and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -468,6 +476,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.16.repeat Scenario: TTL.Suspended changed to null, SystemTTL and OverrideTTL are NULL and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -485,6 +495,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.17 #AC-3 #AC-10 Scenario: TTL.Suspended changed to "No", SystemTTL greater than TTLGuard, OverrideTTL is NULL and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -501,6 +513,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.18 #AC-4 #AC-10 Scenario: TTL.Suspended changed to "No", SystemTTL is NULL, OverrideTTL is greater than TTLGuard and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -517,6 +531,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.19 #AC-5 #AC-10 Scenario: TTL.Suspended changed to "No", SystemTTL is less than TTLGuard, OverrideTTL is greater than TTLGuard and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -533,6 +549,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. @S-1016.20 #AC-6 #AC-10 Scenario: TTL.Suspended changed to "Yes" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -547,6 +565,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_20_Remove_Case_Assigned_User_role_for_Case]. @S-1016.21 #AC-7 #AC-8 #AC-9 #AC-10 Scenario: TTL.Suspended changed to "No", SystemTTL and OverrideTTL greater than Guard value and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -564,6 +584,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_15_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -763,6 +785,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_34_Remove_Case_Assigned_User_role_for_Case]. @S-1016.35 #CCD-3459 Scenario: OverrideTTL changed to a date greater than Guard value, SystemTTL is null and TTL.Suspended is "No" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -777,6 +801,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_34_Remove_Case_Assigned_User_role_for_Case]. @S-1016.36 #CCD-3459 Scenario: OverrideTTL is added with a date less than Guard value, SystemTTL is null and TTL.Suspended is "No" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -791,6 +817,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_20_Remove_Case_Assigned_User_role_for_Case]. @S-1016.37 #CCD-3459 Scenario: OverrideTTL is added with a date greater than Guard value, SystemTTL is null and TTL.Suspended is "No" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -805,6 +833,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_20_Remove_Case_Assigned_User_role_for_Case]. @S-1016.38 #CCD-3459 Scenario: OverrideTTL is removed, SystemTTL is less than Guard value and TTL.Suspended is "No" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -820,6 +850,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_34_Remove_Case_Assigned_User_role_for_Case]. @S-1016.39 #CCD-3459 Scenario: OverrideTTL is removed, SystemTTL is greater than Guard value and TTL.Suspended is "No" and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -835,6 +867,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_34_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -873,6 +907,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.53 #CCD-3476 Scenario: Attempt to update SystemTTL without permissions and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST @@ -892,6 +928,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And another call [to verify that the TTL data is unchanged] will get the expected response as in [S-1016.53.VerifyTtlUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # CCD-3476: TTL Increment tests when data not present in event data or permission restricted: v2_external#/case-controller/createEventUsingPOST @@ -929,6 +967,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.63 #CCD-3476 Scenario: Attempt to update SystemTTL without permissions and Submit Event is invoked on v2_external#/case-controller/createEventUsingPOST @@ -948,6 +988,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And another call [to verify that the TTL data is unchanged] will get the expected response as in [S-1016.63.VerifyTtlUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # CCD-3476: TTL Increment tests when data not present in event data or permission restricted: v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -969,6 +1011,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.71.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_71_Remove_Case_Assigned_User_role_for_Case]. @S-1016.72 #CCD-3476 Scenario: Update TTL value when TTL data not present in event data and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -989,6 +1033,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.72.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_72_Remove_Case_Assigned_User_role_for_Case]. @S-1016.73 #CCD-3476 Scenario: Attempt to update SystemTTL without permissions and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1009,6 +1055,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And another call [to verify that the TTL data is unchanged] will get the expected response as in [S-1016.73.VerifyTtlUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_72_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -1124,6 +1172,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_Remove_Case_Assigned_User_role_for_Case]. @S-1016.92 #CCD-3510 Scenario: Set TTL Override (TTL Guard pass) for first time when TTL data not present in case data and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1138,6 +1188,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_Remove_Case_Assigned_User_role_for_Case]. @S-1016.93 #CCD-3510 Scenario: Set TTL Override and Suspend=Yes (TTL Guard pass) for first time when TTL data not present in case data and Submit Event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1153,6 +1205,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -1179,6 +1233,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.102 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (No -> NO). Submit event is invoked on v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST @@ -1201,6 +1257,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.103 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (Yes -> YES). Submit event is invoked on v1_external#/case-details-endpoint/createCaseEventForCaseWorkerUsingPOST @@ -1223,6 +1281,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.105 #CCD-3562 @@ -1281,6 +1341,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.111.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_72_Remove_Case_Assigned_User_role_for_Case]. @S-1016.112 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (No -> NO). Submit event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1302,6 +1364,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.112.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_72_Remove_Case_Assigned_User_role_for_Case]. @S-1016.113 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (Yes -> YES). Submit event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1323,6 +1387,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.113.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_72_Remove_Case_Assigned_User_role_for_Case]. @S-1016.115 #CCD-3562 @@ -1340,6 +1406,8 @@ Feature: F-1016: Submit Event to Update TTL Then a positive response is received And the response has all other details as expected And another call [to verify that the TTL data has changed] will get the expected response as in [S-1016.115.VerifyCaseDetails] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_71_Remove_Case_Assigned_User_role_for_Case]. @S-1016.116 #CCD-3562 Scenario: Trigger a submit event callback that changes TTL set to null. Submit event is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -1356,6 +1424,8 @@ Feature: F-1016: Submit Event to Update TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_71_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -1382,6 +1452,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.122 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (No -> NO). Submit event is invoked on v2_external#/case-controller/createEventUsingPOST @@ -1404,6 +1476,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.123 #CCD-3535 Scenario: Trigger a submit event callback that changes TTL.Suspended (Yes -> YES). Submit event is invoked on v2_external#/case-controller/createEventUsingPOST @@ -1426,6 +1500,8 @@ Feature: F-1016: Submit Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1016_52_Remove_Case_Assigned_User_role_for_Case]. @S-1016.125 #CCD-3562 diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_15_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_15_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..499fb20f38 --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_15_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_15_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1016_CreateSuspendedCasePreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_20_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_20_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..3f423bf651 --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_20_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_20_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1016_CreateCasePreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_34_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_34_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..24aa3a65fb --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_34_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_34_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1016_CreateCaseOverrideTTLPreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_52_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_52_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f380c2014b --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_52_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_52_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaMasterSolicitorBecky" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_71_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_71_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..349605b679 --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_71_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_71_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_72_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_72_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..7b3a347e46 --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_72_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,46 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_72_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + }, + "testUser1": { + "_extends_": "BeftaMasterSolicitorBecky" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser1][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..290443c0a3 --- /dev/null +++ b/src/aat/resources/features/F-1016 - Submit Event to Update TTL/F-1016_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1016_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-1016_CreateCasePreRequisiteCitizen_noTTL][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017.feature b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017.feature index 0e4b167e2a..31a648c589 100644 --- a/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017.feature +++ b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017.feature @@ -68,6 +68,8 @@ Feature: F-1017: Validate Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_Remove_Case_Assigned_User_role_for_Case]. @S-1017.5 #AC-5 Scenario: TTL.SystemTTL changed after returning from Mid Event Callback and Validate Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1 @@ -82,6 +84,8 @@ Feature: F-1017: Validate Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_Remove_Case_Assigned_User_role_for_Case]. @S-1017.6 #AC-6 Scenario: TTL.OverrideTTL changed after returning from Mid Event Callback and Validate Event is invoked on v1_external#/citizen/case-details-endpoint/validateCaseDetailsUsingPOST_1 @@ -96,6 +100,8 @@ Feature: F-1017: Validate Event to Update TTL Then a negative response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -169,6 +175,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.12 #CCD-3535 Scenario: Trigger a mid event callback that changes TTL.Suspended (No -> NO). Mid Event is invoked on v1_external#/caseworker/case-details-endpoint/validateCaseDetailsUsingPOST @@ -191,6 +199,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.13 #CCD-3535 Scenario: Trigger a mid event callback that changes TTL.Suspended (Yes -> YES). Mid Event is invoked on v1_external#/caseworker/case-details-endpoint/validateCaseDetailsUsingPOST @@ -213,7 +223,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] - + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.15 #CCD-3562 Scenario: Trigger a mid event callback that has TTL missing. Mid Event is invoked on v1_external#/caseworker/case-details-endpoint/validateCaseDetailsUsingPOST @@ -352,6 +363,8 @@ Feature: F-1017: Validate Event to Update TTL Then a negative response is received And the response has all other details as expected And the response [contains the error message indicating unauthorised change to the TTL values] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_26_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -378,6 +391,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [contains the TTL.OverrideTTL from the previouse data] And the response [does not contain the TTL.Suspended as removed by callback (null -> missing)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.32 #CCD-3535 Scenario: Trigger a mid event callback that changes TTL.Suspended (No -> NO). Mid Event is invoked on v2_external#/case-data-validator-controller/validateUsingPOST @@ -400,6 +415,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (No -> NO)] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.33 #CCD-3535 Scenario: Trigger a mid event callback that changes TTL.Suspended (Yes -> YES). Mid Event is invoked on v2_external#/case-data-validator-controller/validateUsingPOST @@ -422,7 +439,8 @@ Feature: F-1017: Validate Event to Update TTL And the response [contains the TTL.SystemTTL for the case, that has been set to 20 days from today] And the response [does not contain the TTL.OverrideTTL as removed by callback (null -> missing)] And the response [contains the adjusted TTL.Suspended from the callback (Yes -> YES)] - + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1017_11_Remove_Case_Assigned_User_role_for_Case]. @S-1017.35 #CCD-3562 Scenario: Trigger a mid event callback that has TTL missing. Mid Event is invoked on v2_external#/case-data-validator-controller/validateUsingPOST diff --git a/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_11_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_11_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..10038fbd04 --- /dev/null +++ b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_11_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1017_11_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaMasterSolicitorBecky" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][CreateCase_TTLCaseType_PreRequisiteCaseworker][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_26_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_26_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..c106b4d446 --- /dev/null +++ b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_26_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1017_26_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][CreateCase_TTLCaseType_PreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..35cb189334 --- /dev/null +++ b/src/aat/resources/features/F-1017 - Validate Event to Update TTL/F-1017_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1017_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1017_CreateSuspendedCasePreRequisiteCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018.feature b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018.feature index 9538b8fc54..f82bbf3d07 100644 --- a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018.feature +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018.feature @@ -322,6 +322,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1018.21-VerifyCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_Remove_Case_Assigned_User_role_for_Case]. @S-1018.22 #AC-22 Scenario: Case Link value changed and CaseLink field in the Request contains CaseReference value and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -337,6 +339,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1018.22-VerifyCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_22_Remove_Case_Assigned_User_role_for_Case]. @S-1018.23 #AC-23 Scenario: CaseLink in database exists but CaseLink field in the Request contains blank/null value and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -351,6 +355,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that no Case Links exist in the CASE_LINK table] as in [F-1018_VerifyRemovedCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_23_Remove_Case_Assigned_User_role_for_Case]. @S-1018.24 #AC-24 Scenario: CaseLink in database exists and CaseLink field in the Request is unchanged and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -365,6 +371,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1018_VerifyCitizenLinkedCaseLinksUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_23_Remove_Case_Assigned_User_role_for_Case]. @S-1018.25 #AC-25 Scenario: CaseLink in database Does NOT exist and CaseLink field in the Request is blank and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -378,6 +386,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that no Case Links exist in the CASE_LINK table] as in [F-1018_VerifyBlankCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_25_Remove_Case_Assigned_User_role_for_Case]. @S-1018.26 #AC-26 Scenario: Case Link does not exist at present and CaseLink field in the Request contains INVALID CaseReference value and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -391,6 +401,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a negative response is received And the response has all other details as expected And a successful call [to verify that no Case Links exist in the CASE_LINK table] as in [F-1018_VerifyBlankCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_25_Remove_Case_Assigned_User_role_for_Case]. @S-1018.27 #AC-27 Scenario: Case Link value changed and CaseLink field in the Request contains INVALID CaseReference value and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -405,6 +417,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a negative response is received And the response has all other details as expected And a successful call [to verify that the Case Links in the CASE_LINK table are unchanged] as in [F-1018_VerifyCitizenLinkedCaseLinksUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_23_Remove_Case_Assigned_User_role_for_Case]. @S-1018.28 #AC-28 Scenario: CaseLink in database exists but CaseLink field in the Request contains blank/null value, some invalid case data is submitted and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -419,6 +433,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a negative response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1018_VerifyCitizenLinkedCaseLinksUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_23_Remove_Case_Assigned_User_role_for_Case]. @S-1018.29 #AC-29 Scenario: Case Link does not exist at present and CaseLink field in the Request contains CaseReference value but Invalid Case data and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -434,6 +450,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a negative response is received And the response has all other details as expected And a successful call [to verify that no Case Links exist in the CASE_LINK table] as in [F-1018_VerifyBlankCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_Remove_Case_Assigned_User_role_for_Case]. @S-1018.30 #AC-30 Scenario: Case Link value changed and CaseLink field in the Request contains CaseReference value, but Invalid case data and Submit Event Creation is invoked on v1_external#/case-details-endpoint/createCaseEventForCitizenUsingPOST @@ -450,6 +468,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a negative response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1018_VerifyCitizenLinkedCaseLinksUnchanged] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_22_Remove_Case_Assigned_User_role_for_Case]. #======================================= @@ -627,6 +647,8 @@ Feature: F-1018: Submit Event Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1018_VerifyMultipleCaseLinksUsingStandardLinkField_Citizen] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1018_42_Remove_Case_Assigned_User_role_for_Case]. @S-1018.43 Scenario: Standard CaseLinks field should generate caseLink records with StandardLink set to true when Submit Event Creation is invoked on v2_external#/case-controller/createEventUsingPOST diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_22_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_22_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f38d92a988 --- /dev/null +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_22_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,48 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1018_22_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateAnotherCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-1018_CreateLinkedCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_23_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_23_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f0e5478567 --- /dev/null +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_23_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,43 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1018_23_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-1018_CreateLinkedCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_25_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_25_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..1e8c5c16c5 --- /dev/null +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_25_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1018_25_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_42_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_42_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..fe3017c3e7 --- /dev/null +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_42_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,83 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1018_42_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedViaSimpleField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedViaCollection][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedViaBothCollectionAndStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedToMigrateFromStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedViaStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedViaBothCollectionAndStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedToMigrateToStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedToAddToStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${}${[scenarioContext][parentContext][childContexts][F-1018_CreateCaseWithStandardCaseLinksByCitizen][childContexts][CaseLinkedToRemoveFromStandardCaseLinksField][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..e7b1131081 --- /dev/null +++ b/src/aat/resources/features/F-1018 - Submit Event Creation Handle Case Links/F-1018_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,43 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1018_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateAnotherCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1018_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019.feature b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019.feature index 6500c013f6..54ceaf43ce 100644 --- a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019.feature +++ b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019.feature @@ -80,6 +80,8 @@ Feature: F-1019: Submit Case Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Link has been created in the CASE_LINK table with correct value] as in [F-1019-VerifyCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1019_Remove_Case_Assigned_User_role_for_Case]. @S-1019.7 #AC-7 Scenario: CaseLink field contains blank value and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST @@ -90,6 +92,8 @@ Feature: F-1019: Submit Case Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that no Case Links have been created in the CASE_LINK table] as in [F-1019-VerifyCaseLinksNotInserted] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1019_7_Remove_Case_Assigned_User_role_for_Case]. @S-1019.8 #AC-8 Scenario: CaseLink field contains Invalid CaseReference value and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST @@ -112,6 +116,8 @@ Feature: F-1019: Submit Case Creation Handle Case Links Then a negative response is received, And the response [has the 422 return code], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1019_9_Remove_Case_Assigned_User_role_for_Case]. @S-1019.10 #AC-10 Scenario: Collection of CaseLink fields contains CaseReference value and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST @@ -125,6 +131,8 @@ Feature: F-1019: Submit Case Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCitizenCaseLinks] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1019_10_Remove_Case_Assigned_User_role_for_Case]. #======================================= @@ -192,7 +200,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links # Submit Event Creation: extra tests for Standard CaseLinks field and flag in CaseLinks table #======================================= - @S-1019.16 + @S-1019.16 Scenario: Standard CaseLinks field should generate caseLink records with StandardLink set to true when Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST Given a user with [an active profile in CCD] And a successful call [to create many cases to link to] as in [F-1019_CreateManyTestsCasesCaseworker] @@ -203,7 +211,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCaseLinksUsingStandardLinkField] - @S-1019.17 + @S-1019.17 Scenario: Standard CaseLinks field should generate caseLink records with StandardLink set to true when Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST Given a user with [an active profile in CCD] And a successful call [to create many cases to link to] as in [F-1019_CreateManyTestsCasesCaseworker] @@ -213,8 +221,10 @@ Feature: F-1019: Submit Case Creation Handle Case Links Then a positive response is received And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCaseLinksUsingStandardLinkField] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1019_7_Remove_Case_Assigned_User_role_for_Case]. - @S-1019.18 + @S-1019.18 Scenario: Standard CaseLinks field should generate caseLink records with StandardLink set to true when Submit Case Creation Event is invoked on v2_external#/case-controller/createCaseUsingPOST Given a user with [an active profile in CCD] And a successful call [to create many cases to link to] as in [F-1019_CreateManyTestsCasesCaseworker] @@ -230,7 +240,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links # Complex case links: extra tests for extracting CaseLinks from more complex fields #======================================= - @S-1019.19 + @S-1019.19 Scenario: Collection of complex fields with CaseLinks should generate caseLink records when Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST Given a user with [an active profile in CCD] And a successful call [to create a case] as in [F-1019_CreateCasePreRequisiteCaseworkerBase] @@ -244,7 +254,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCaseLinks] - @S-1019.20 + @S-1019.20 Scenario: Collection of complex fields with CaseLinks should generate caseLink records when Submit Case Creation Event is invoked on v2_external#/case-controller/createCaseUsingPOST Given a user with [an active profile in CCD] And a successful call [to create a case] as in [F-1019_CreateCasePreRequisiteCaseworkerBase] @@ -258,7 +268,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCaseLinks] - @S-1019.21 + @S-1019.21 Scenario: Nested complex fields with CaseLinks should generate caseLink records when Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST Given a user with [an active profile in CCD] And a successful call [to create a case] as in [F-1019_CreateCasePreRequisiteCaseworkerBase] @@ -272,7 +282,7 @@ Feature: F-1019: Submit Case Creation Handle Case Links And the response has all other details as expected And a successful call [to verify that the Case Links have been created in the CASE_LINK table with correct values] as in [F-1019-VerifyMultipleCaseLinks] - @S-1019.22 + @S-1019.22 Scenario: Nested complex fields with CaseLinks should generate caseLink records when Submit Case Creation Event is invoked on v2_external#/case-controller/createCaseUsingPOST Given a user with [an active profile in CCD] And a successful call [to create a case] as in [F-1019_CreateCasePreRequisiteCaseworkerBase] diff --git a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_10_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_10_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..b5af782c2c --- /dev/null +++ b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_10_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,48 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1019_10_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1019_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1019_CreateAnotherCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_7_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_7_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..b6a0874715 --- /dev/null +++ b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_7_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1019_7_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_9_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_9_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..41c5ca0bbc --- /dev/null +++ b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_9_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1019_9_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1019_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..d5c71c6d8f --- /dev/null +++ b/src/aat/resources/features/F-1019 - Submit Case Creation Handle Case Links/F-1019_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,43 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1019_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1019_CreateCasePreRequisiteCitizenBase][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + }, + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023.feature b/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023.feature index 54b46e3494..d08982ba60 100644 --- a/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023.feature +++ b/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023.feature @@ -83,6 +83,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected And the response [contains updated values for case_data and data_classification] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. @S-1023.7 #AC-7 #AC-08 of CCD-5324 Scenario: Invoke saveCaseDetailsForCitizenUsingPOST and caseAccessGroupId not created when caseGroupType != CCD:all-cases-access @@ -95,6 +97,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected And the response [contains updated values for case_data and data_classification] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. @S-1023.8 #AC-8 #AC-09 of CCD-5324 Scenario: CaseAccessGroups field contains Invalid caseAccessGroupType value and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST @@ -108,6 +112,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected And the response [contains updated values for case_data and data_classification] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. @S-1023.9 #AC-9 #AC-10 of CCD-5324 Scenario: CaseAccessGroups field contains valid caseAccessGroupType value but case data invalid and Submit Case Creation Event is invoked on v1_external#/case-details-endpoint/saveCaseDetailsForCitizenUsingPOST @@ -119,6 +125,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected And the response [contains updated values for case_data and data_classification] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. @S-1023.10 #Testing Blank value Scenario: Invoke saveCaseDetailsForCitizenUsingPOST and caseAccessGroups field contains blank value @@ -129,6 +137,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected And the response [contains updated values for case_data and data_classification] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. #======================================= # Submit Event Creation: v2_external#/case-controller/createCaseUsingPOST @@ -230,6 +240,8 @@ Feature: F-1023: Submit Case Creation Handle CaseAccessGroups Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1023_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # v2_external#/case-controller/createEventUsingPOST diff --git a/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..d0b4c23f3f --- /dev/null +++ b/src/aat/resources/features/F-1023 - Case update with caseAccessGroups/F-1023_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1023_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024.feature b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024.feature index 689a94f39c..bdc0a17b0d 100644 --- a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024.feature +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024.feature @@ -40,6 +40,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 200 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_Remove_Case_Assigned_User_role_for_Case]. @S-1024.4 Scenario: About to start callback changes the value of TTL during case creation for v1_external#/case-details-endpoint/startCaseForCaseworkerUsingGET @@ -74,6 +76,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_6_Remove_Case_Assigned_User_role_for_Case]. @S-1024.7 Scenario: Value of TTL is not null before case creation for v1_external#/case-details-endpoint/startCaseForCaseworkerUsingGET @@ -111,6 +115,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_6_Remove_Case_Assigned_User_role_for_Case]. @S-1024.10 Scenario: During validation, adjust any validation on TTL for v1_external#/case-details-endpoint/validateCaseDetailsUsingPOST @@ -137,6 +143,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 200 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_11_Remove_Case_Assigned_User_role_for_Case]. @S-1024.12 Scenario: During validation, adjust any validation on TTL for v2_external#/case-data-validator-controller/validateUsingPOST @@ -150,6 +158,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 200 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_11_Remove_Case_Assigned_User_role_for_Case]. @S-1024.13 Scenario: During validation, Mid-event callback updates TTL value for v1_external#/case-details-endpoint/validateCaseDetailsUsingPOST @@ -175,6 +185,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 400 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_14_Remove_Case_Assigned_User_role_for_Case]. @S-1024.15 Scenario: During validation, Mid-event callback updates TTL value for v2_external#/case-data-validator-controller/validateUsingPOST @@ -187,6 +199,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_14_Remove_Case_Assigned_User_role_for_Case]. @S-1024.16 Scenario: Value of TTL is not null before validation for v1_external#/case-details-endpoint/validateCaseDetailsUsingPOST @@ -213,6 +227,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_11_Remove_Case_Assigned_User_role_for_Case]. @S-1024.18 Scenario: Value of TTL is not null before validation for v2_external#/case-data-validator-controller/validateUsingPOST @@ -226,6 +242,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_11_Remove_Case_Assigned_User_role_for_Case]. @S-1024.19 Scenario: During Submit case creation adjust any validation on TTL for v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST @@ -254,6 +272,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 200 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_20_Remove_Case_Assigned_User_role_for_Case]. @S-1024.21 Scenario: During Submit case creation adjust any validation on TTL for v2_external#/case-controller/createCaseUsingPOST @@ -268,6 +288,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault And the response [has the 200 OK code] And the response has all other details as expected And the response [contains the TTL set to null] + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_20_Remove_Case_Assigned_User_role_for_Case]. @S-1024.22 Scenario: During Submit case creation About to submit callback updates TTL value for v1_external#/case-details-endpoint/saveCaseDetailsForCaseWorkerUsingPOST @@ -294,6 +316,8 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_23_Remove_Case_Assigned_User_role_for_Case]. @S-1024.24 Scenario: During Submit case creation About to submit callback updates TTL value for v2_external#/case-controller/createCaseUsingPOST @@ -307,4 +331,6 @@ Feature: F-1024: Update Case - Start Case Event - NullifyByDefault Then a negative response is received And the response [has the 400 OK code] And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1024_23_Remove_Case_Assigned_User_role_for_Case]. diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_11_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_11_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..f3753b1eab --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_11_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_11_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_CreateCasePreRequisiteCitizen_MidEvent][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_14_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_14_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..514cb893f3 --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_14_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_14_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_CreateCasePreRequisiteCitizen_MidEventUpdate][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_20_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_20_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..ed6d8c4a50 --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_20_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_20_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_CreateCasePreRequisiteCitizen_AboutToSubmit][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_23_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_23_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..52af57c745 --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_23_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_23_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_CreateCasePreRequisiteCitizen_AboutToSubmit_NotNull][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_6_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_6_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..5b326d69f9 --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_6_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_6_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_StartCaseTrigger_Case_Creation_NotNull][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..89a2992ac4 --- /dev/null +++ b/src/aat/resources/features/F-1024- NullifyByDefault/F-1024_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1024_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen2" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][F-1024_StartCaseTrigger_Case_Creation][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature index a9771f3a9c..99401246d0 100644 --- a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025.feature @@ -24,6 +24,8 @@ Background: Then a negative response is received, And the response [contains HTTP 403 Forbidden], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-1025_Remove_Case_Assigned_User_role_for_Case]. #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..e84f43fa67 --- /dev/null +++ b/src/aat/resources/features/F-1025 - Get Case Event V2 Data internal staff member or an external user/F-1025_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-1025_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "ExternalCaseworkerSolicitor" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][Private_Autotest_Case_Data_Extension_External][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-103 - Get Case Users V2/F-103.1.feature b/src/aat/resources/features/F-103 - Get Case Users V2/F-103.1.feature index c89e556b9e..a926bf48ff 100644 --- a/src/aat/resources/features/F-103 - Get Case Users V2/F-103.1.feature +++ b/src/aat/resources/features/F-103 - Get Case Users V2/F-103.1.feature @@ -20,6 +20,8 @@ Feature: F-103.1: Search Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_Remove_Case_Assigned_User_role_for_Case_C1]. @S-598.1 Scenario: when the invoking user is not a privileged user but the request includes his/her own User ID, then the invoker's case roles for the case should be returned @@ -37,6 +39,8 @@ Feature: F-103.1: Search Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_Remove_Case_Assigned_User_role_for_Case_C1]. @S-599.1 Scenario: when no User ID is supplied for a specific case ID, then the case roles relating to all users with access to that case must be returned @@ -56,6 +60,8 @@ Feature: F-103.1: Search Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil & Steve, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1]. @S-600.1 Scenario: when no User ID is supplied for a list of Case IDs, then the case roles relating to all users with access to all listed cases must be returned @@ -81,6 +87,8 @@ Feature: F-103.1: Search Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil & Steve for C1, C2 & C3, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1]. @S-601.1 Scenario: must return an error response for a missing Case ID diff --git a/src/aat/resources/features/F-103 - Get Case Users V2/F-103.feature b/src/aat/resources/features/F-103 - Get Case Users V2/F-103.feature index 70ef676f30..9168874317 100644 --- a/src/aat/resources/features/F-103 - Get Case Users V2/F-103.feature +++ b/src/aat/resources/features/F-103 - Get Case Users V2/F-103.feature @@ -18,6 +18,8 @@ Feature: F-103: Get Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_Remove_Case_Assigned_User_role_for_Case_C1]. @S-598 Scenario: when the invoking user is not a privileged user but the request includes his/her own User ID, then the invoker's case roles for the case should be returned @@ -33,6 +35,8 @@ Feature: F-103: Get Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_Remove_Case_Assigned_User_role_for_Case_C1]. @S-599 Scenario: when no User ID is supplied for a specific case ID, then the case roles relating to all users with access to that case must be returned @@ -50,6 +54,8 @@ Feature: F-103: Get Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil & Steve, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1]. @S-600 Scenario: when no User ID is supplied for a list of Case IDs, then the case roles relating to all users with access to all listed cases must be returned @@ -73,6 +79,8 @@ Feature: F-103: Get Case-Assigned Users and Roles Then a positive response is received, And the response [contains the list of case roles just granted to Dil & Steve for C1, C2 & C3, as per above], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1]. @S-601 Scenario: must return an error response for a missing Case ID diff --git a/src/aat/resources/features/F-103 - Get Case Users V2/F-103_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..99c61741a9 --- /dev/null +++ b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,43 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-103_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "invokingUser": { + "_extends_": "F-103_User_Jamal" + }, + "userDil": { + "_extends_": "F-103_User_Dil" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[COLLABORATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..c56cf61cbf --- /dev/null +++ b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,55 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-103_S-599_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "invokingUser": { + "_extends_": "F-103_User_Jamal" + }, + "userSteve": { + "_extends_": "F-103_User_Steve" + }, + "userDil": { + "_extends_": "F-103_User_Dil" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[COLLABORATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..6abc341b1e --- /dev/null +++ b/src/aat/resources/features/F-103 - Get Case Users V2/F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,92 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-103_S-600_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "invokingUser": { + "_extends_": "F-103_User_Jamal" + }, + "userSteve": { + "_extends_": "F-103_User_Steve" + }, + "userDil": { + "_extends_": "F-103_User_Dil" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[COLLABORATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[CREATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C3][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C3][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[CREATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C2][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C2][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userDil][id]}", + "case_role": "[COLLABORATOR]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C3][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C3][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[CREATOR]" + }, { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C2][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[DEFENDANT]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F103_Case_Data_Create_C2][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userSteve][id]}", + "case_role": "[COLLABORATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature index 7fe0109e34..0a34cba358 100644 --- a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/F-105.feature @@ -18,6 +18,8 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a positive response is received, And the response has all the details as expected, And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.1_Get_Case_Roles_for_Case_C1]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-105_Remove_Case_Assigned_User_role_for_Case_C1]. # RDM-8606/8806 AC-2 @S-105.2 @@ -182,7 +184,9 @@ Feature: F-105: Add Case-Assigned Users and Roles And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], Then a positive response is received, And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.12_Get_Case_Roles_for_Case_C1]. + And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.12_Get_Case_Roles_for_Case_C1], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-105_Remove_Case_Assigned_User_role_for_Case_C1]. # RDM-8606 multiple @S-105.13 @@ -198,7 +202,9 @@ Feature: F-105: Add Case-Assigned Users and Roles And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], Then a positive response is received, And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-1 and CR-2 over the case C1] will get the expected response as in [S-105.13_Get_Case_Roles_for_Case_C1]. + And a call [to verify Olawale's reception of the role CR-1 and CR-2 over the case C1] will get the expected response as in [S-105.13_Get_Case_Roles_for_Case_C1], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1 and CR-2] as in [F-105_Remove_Case_Assigned_User_role_for_Case_C1_C2]. # RDM-8842 AC-1 @S-105.14 @@ -220,7 +226,9 @@ Feature: F-105: Add Case-Assigned Users and Roles And a call [to repeat the same request as above] will get the expected response as in [S-105.14_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles], And a call [to verify the count of users assigned to C1 has NOT changed] will get the expected response as in [S-105.14_Verify_Counter_2], And a call [to repeat the same request as above this time with a different user, Hemanth] will get the expected response as in [S-105.14_Repeated_Call_to_Add_Case_Assigned_Users_and_Roles_Hemanth], - And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.14_Verify_Counter_3]. + And a call [to verify the count of users assigned to a case has increased by 1] will get the expected response as in [S-105.14_Verify_Counter_3], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1 and CR-2] as in [F-105_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2]. # RDM-8842 AC-2 @S-105.15 @@ -238,7 +246,9 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a positive response is received, And the response has all the details as expected, And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.15_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1 and CR-2] as in [F-105_15_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2]. # RDM-8842 AC-3 @S-105.16 @@ -255,7 +265,9 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a positive response is received, And the response has all the details as expected, And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.16_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1 and CR-2] as in [F-105_16_Remove_Case_Assigned_User_role_Orgs_for_Case_C1]. # RDM-8842 AC-4 @S-105.17 @@ -274,7 +286,7 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't received the role CR-1 over the case C1] will get the expected response as in [S-105.17_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]. + And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [F-105_Verify_Counter_Unchanged]., # RDM-8842 AC-5 @S-105.18 @@ -292,4 +304,6 @@ Feature: F-105: Add Case-Assigned Users and Roles Then a positive response is received, And the response has all the details as expected, And a call [to verify Olawale's reception of the role CR-2 over the case C1] will get the expected response as in [S-105.18_Verify_Case_Roles_for_Case_C1], - And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed]. + And a call [to verify the count of users assigned to a case has changed] will get the expected response as in [F-105_Verify_Counter_Changed], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1 and CR-2] as in [F-105_18_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2]. diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_15_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_15_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json new file mode 100644 index 0000000000..3c9aa33561 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_15_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json @@ -0,0 +1,37 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_15_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1 and CR-2" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role" : "[CR-1]" + }, { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_16_Remove_Case_Assigned_User_role_Orgs_for_Case_C1.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_16_Remove_Case_Assigned_User_role_Orgs_for_Case_C1.td.json new file mode 100644 index 0000000000..cdcb8eab7d --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_16_Remove_Case_Assigned_User_role_Orgs_for_Case_C1.td.json @@ -0,0 +1,33 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_16_Remove_Case_Assigned_User_role_Orgs_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1 and CR-2" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role" : "[CR-1]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_18_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_18_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json new file mode 100644 index 0000000000..dd5faa2e63 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_18_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json @@ -0,0 +1,37 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_18_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1 and CR-2" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userRichard][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role" : "[CREATOR]" + }, { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json new file mode 100644 index 0000000000..3a530be175 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/With Organisation Context/common/F-105_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2.td.json @@ -0,0 +1,47 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_Remove_Case_Assigned_User_role_Orgs_for_Case_C1_C2", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1 and CR-2" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role" : "[CR-1]" + }, { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userHemanth][id]}", + "case_role": "[CR-1]" + }, + { + "case_id": "${[scenarioContext][siblingContexts][F-105_Case_Data_Create_C1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][parentContext][testData][users][userHemanth][id]}", + "case_role": "[CR-2]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..4fd2ac5599 --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,33 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1_C2.td.json b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1_C2.td.json new file mode 100644 index 0000000000..b9512d018c --- /dev/null +++ b/src/aat/resources/features/F-105 - Add Case-Assigned Users and Roles/common/F-105_Remove_Case_Assigned_User_role_for_Case_C1_C2.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-105_Remove_Case_Assigned_User_role_for_Case_C1_C2", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1 and CR-2" + ], + + "users": { + "_extends_": "F-105_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][F-105_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-2]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-107 - Org Policy/F-107.feature b/src/aat/resources/features/F-107 - Org Policy/F-107.feature index 3041fa4121..b76cc40e59 100644 --- a/src/aat/resources/features/F-107 - Org Policy/F-107.feature +++ b/src/aat/resources/features/F-107 - Org Policy/F-107.feature @@ -13,8 +13,10 @@ Feature: F-107: Organisation Policies on Cases And it is submitted to call the [Submit Case Creation as Caseworker] operation of [CCD Data Store] Then a positive response is received And the response has all other details as expected + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-107_Remove_Case_Assigned_User_role_for_Case]. - @S-930 @Ignore + @S-930 @Ignore Scenario: must successfully update OrganisationPolicy fields on a case Given a user with [an active profile in CCD] And a case that has just been created as in [S-930_Create_Case_Data] diff --git a/src/aat/resources/features/F-107 - Org Policy/F-107_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-107 - Org Policy/F-107_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..4821bdc0fa --- /dev/null +++ b/src/aat/resources/features/F-107 - Org Policy/F-107_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-107_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "F-107_User" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-108 - External Search API/F-108.feature b/src/aat/resources/features/F-108 - External Search API/F-108.feature index b23ac55b25..01c6694336 100644 --- a/src/aat/resources/features/F-108 - External Search API/F-108.feature +++ b/src/aat/resources/features/F-108 - External Search API/F-108.feature @@ -273,6 +273,8 @@ Feature: F-108: Elasticsearch external endpoint And it is submitted to call the [external search query] operation of [CCD Data Store Elastic Search API], Then the response [contains the previously created case], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-108_Remove_Case_Assigned_User_role_for_Case]. @S-926 Scenario: should NOT return the case for a solicitor role if not granted access to the case diff --git a/src/aat/resources/features/F-108 - External Search API/F-108_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-108 - External Search API/F-108_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..a4e3b35e41 --- /dev/null +++ b/src/aat/resources/features/F-108 - External Search API/F-108_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,39 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-108_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "username": "[[$CCD_PRIVATE_CASEWORKER_SOLICITOR_EMAIL]]", + "password": "[[$CCD_PRIVATE_CASEWORKER_SOLICITOR_PASSWORD]]" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][childContexts][S-925_Create_Case_Private_Autotest1][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[DEFENDANT]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.1.td.json b/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.1.td.json deleted file mode 100644 index 91580e2959..0000000000 --- a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.1.td.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "_guid_": "S-new.1", - "_extends_": "F-109_Test_Data_Base", - - "title": "must validate date in a right format", - - "specs": [ - "an active profile in CCD", - "contains valid value for a formatted Date field", - "has 201 return code" - ], - "request": { - "body": { - "data": { - "DateField": "23", - "DateTimeField": "2000-23-01", - "StandardDate": "2016-12-01", - "StandardDateTime": "1998-09-01T16:01", - "CollectionDate": [ - { - "id": null, - "value": "03" - }, - { - "id": null, - "value": "" - } - ], - "CollectionDateTime": [ - { - "id": null, - "value": "2002-01" - } - ], - "ComplexDateTime": { - "DateField": "11-02", - "DateTimeField": "04-30T01:01", - "StandardDate": "2010-02-02", - "StandardDateTime": "2019-12-20T01:01:01.000", - "NestedComplex": { - "DateField": "01-2019", - "DateTimeField": "2019-01-01", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000" - } - }, - "CollectionComplexDateTime": [ - { - "id": null, - "value": { - "DateField": "01-02", - "DateTimeField": "10-01T01:01", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000", - "NestedComplex": { - "DateField": "2019-01-01", - "DateTimeField": "2019-01-01T01:01:01.000", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000" - } - } - }, - { - "id": null, - "value": { - "DateField": "", - "DateTimeField": null, - "StandardDate": null, - "StandardDateTime": null, - "NestedComplex": { - "DateField": null, - "DateTimeField": null, - "StandardDate": null, - "StandardDateTime": null - } - } - } - ] - }, - "event": { - "id": "CREATE", - "summary": "", - "description": "" - }, - "security_classification": "PUBLIC", - "event_token" : "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", - "ignore_warning": true - } - }, - "expectedResponse": { - "_extends_": "Common_201_Response", - "headers": { - "Content-Length": "[[ANY_NULLABLE]]", - "Content-Encoding": "[[ANY_NULLABLE]]", - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8", - "Connection": "[[ANYTHING_PRESENT]]", - "Keep-Alive": "[[ANYTHING_PRESENT]]", - "Transfer-Encoding": "[[ANYTHING_PRESENT]]", - "Strict-Transport-Security": "[[ANY_NULLABLE]]" - }, - "body" : { - "_links" : "[[ANYTHING_PRESENT]]", - "id" : "[[ANY_STRING_NOT_NULLABLE]]", - "jurisdiction" : "BEFTA_MASTER", - "case_type" : "FT_DateTimeFormats", - "created_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "last_modified_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "last_state_modified_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "state" : "TODO", - "security_classification" : "PUBLIC", - "data" : { - "CollectionComplexDateTime" : [ { - "value" : { - "DateField" : "1970-02-01", - "DateTimeField" : "1970-10-01T01:01:00.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000", - "NestedComplex" : { - "DateField" : "2019-01-01", - "DateTimeField" : "2019-01-01T01:01:01.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000" - } - }, - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - }, { - "value" : { - "DateField" : "", - "DateTimeField" : null, - "StandardDate" : null, - "StandardDateTime" : null, - "NestedComplex" : { - "DateField" : null, - "DateTimeField" : null, - "StandardDate" : null, - "StandardDateTime" : null - } - }, - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "ComplexDateTime" : { - "DateField" : "1970-02-11", - "DateTimeField" : "1970-04-30T01:01:00.000", - "StandardDate" : "2010-02-02", - "StandardDateTime" : "2019-12-20T01:01:01.000", - "NestedComplex" : { - "DateField" : "2019-01-01", - "DateTimeField" : "2019-01-01T00:00:00.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000" - } - }, - "CollectionDate" : [ { - "value" : "1970-03-01", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - }, { - "value" : "", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "CollectionDateTime" : [ { - "value" : "2002-01-01T00:00:00.000", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "StandardDateTime" : "1998-09-01T16:01", - "StandardDate" : "2016-12-01", - "DateField" : "1970-01-23", - "DateTimeField" : "2000-01-01T00:23:00.000" - }, - "data_classification": { - "CollectionComplexDateTime": { - "classification": "PUBLIC", - "value": [ - { - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC", - "NestedComplex": { - "classification": "PUBLIC", - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC" - } - } - }, - "id": "[[ANY_STRING_NOT_NULLABLE]]" - }, - { - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC", - "NestedComplex": { - "classification": "PUBLIC", - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC" - } - } - }, - "id": "[[ANY_STRING_NOT_NULLABLE]]" - } - ] - }, - "ComplexDateTime": { - "classification": "PUBLIC", - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC", - "NestedComplex": { - "classification": "PUBLIC", - "value": { - "DateField": "PUBLIC", - "DateTimeField": "PUBLIC", - "StandardDate": "PUBLIC", - "StandardDateTime": "PUBLIC" - } - } - } - }, - "CollectionDate": { - "classification": "PUBLIC", - "value": [ - { - "id": "[[ANY_STRING_NOT_NULLABLE]]", - "classification": "PUBLIC" - }, - { - "id": "[[ANY_STRING_NOT_NULLABLE]]", - "classification": "PUBLIC" - } - ] - }, - "CollectionDateTime": { - "classification": "PUBLIC", - "value": [ - { - "id": "[[ANY_STRING_NOT_NULLABLE]]", - "classification": "PUBLIC" - } - ] - }, - "StandardDateTime": "PUBLIC", - "StandardDate": "PUBLIC", - "DateField": "PUBLIC", - "DateTimeField": "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 - } - } -} diff --git a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.2.td.json b/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.2.td.json deleted file mode 100644 index 88579ac2f2..0000000000 --- a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.2.td.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "_guid_": "S-new.2", - "_extends_": "F-109_Test_Data_Base", - - "title": "must return an error for date value with invalid format", - - "specs": [ - "an active profile in CCD", - "contains Date field with incorrect format", - "has 422 return code" - ], - "request": { - "body": { - "data": { - "DateField": "23-01", - "DateTimeField": "2000-23-01", - "StandardDate": "2016-12-01", - "StandardDateTime": "1998-09-01T16:01", - "CollectionDate": [ - { - "id": null, - "value": "03" - }, - { - "id": null, - "value": "" - } - ], - "CollectionDateTime": [ - { - "id": null, - "value": "2002-01" - } - ], - "ComplexDateTime": { - "DateField": "11-02", - "DateTimeField": "04-30T01:01", - "StandardDate": "2010-02-02", - "StandardDateTime": "2019-12-20T01:01:01.000", - "NestedComplex": { - "DateField": "01-2019", - "DateTimeField": "2019-01-01", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000" - } - }, - "CollectionComplexDateTime": [ - { - "id": null, - "value": { - "DateField": "01-02", - "DateTimeField": "10-01T01:01", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000", - "NestedComplex": { - "DateField": "2019-01-01", - "DateTimeField": "2019-01-01T01:01:01.000", - "StandardDate": "2019-01-01", - "StandardDateTime": "2019-01-01T01:01:01.000" - } - } - }, - { - "id": null, - "value": { - "DateField": "", - "DateTimeField": null, - "StandardDate": null, - "StandardDateTime": null, - "NestedComplex": { - "DateField": null, - "DateTimeField": null, - "StandardDate": null, - "StandardDateTime": null - } - } - } - ] - }, - "event": { - "id": "CREATE", - "summary": "", - "description": "" - }, - "security_classification": "PUBLIC", - "event_token" : "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", - "ignore_warning": true - } - }, - "expectedResponse": { - "_extends_": "Common_422_Response", - "headers": { - "Content-Encoding": "gzip", - "Content-Type": "application/json", - "Content-Length": "[[ANYTHING_PRESENT]]" - }, - "body": { - "exception" : "uk.gov.hmcts.ccd.endpoint.exceptions.DataProcessingException", - "timestamp" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "status" : 422, - "error" : "Unprocessable Entity", - "message" : "Processing of data failed", - "path" : "[[ANY_STRING_NOT_NULLABLE]]", - "details" : "Unable to process field DateField with value 23-01. Expected format to be either dd or yyyy-MM-dd", - "callbackErrors" : null, - "callbackWarnings" : null - } - } -} diff --git a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.feature b/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.feature index 84ee7b13fb..08ea4c8dfb 100644 --- a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.feature +++ b/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109.feature @@ -99,4 +99,6 @@ Feature: F-109: Role-Based Authorisation of Caseworker CAAs And it is submitted to call the [Add Case-Assigned Users and Roles] operation of [CCD Data Store Api], Then a positive response is received, And the response has all the details as expected, - And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.1_Get_Case_Roles_for_Case_C1]. + And a call [to verify Olawale's reception of the role CR-1 over the case C1] will get the expected response as in [S-105.1_Get_Case_Roles_for_Case_C1], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-105_Remove_Case_Assigned_User_role_for_Case_C1]. diff --git a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109_Test_Data_Base.td.json b/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109_Test_Data_Base.td.json deleted file mode 100644 index 9ad27ef422..0000000000 --- a/src/aat/resources/features/F-109 - caseworker-caa Authorisation/F-109_Test_Data_Base.td.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "_guid_": "F-109_Test_Data_Base", - "productName": "CCD Data Store", - "operationName": "create case", - "method": "POST", - "uri": "/case-types/{ctid}/cases", - "user": { - "_extends_": "BeftaMasterCaseworker" - }, - "request": { - "_extends_": "Common_Request", - "pathVariables": { - "ctid": "FT_DateTimeFormats" - }, - "headers": { - "experimental": true - }, - "body": { - "event": { - "id": "CREATE", - "summary": "", - "description": "" - }, - "security_classification": "PUBLIC", - "event_token": "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", - "ignore_warning": true - } - }, - "expectedResponse": { - "_extends_": "Common_201_Response", - "headers": { - "Content-Length": "[[ANY_NULLABLE]]", - "Content-Encoding": "[[ANY_NULLABLE]]", - "Content-Type": "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8", - "Connection": "[[ANYTHING_PRESENT]]", - "Keep-Alive": "[[ANYTHING_PRESENT]]", - "Transfer-Encoding": "[[ANYTHING_PRESENT]]", - "Strict-Transport-Security": "[[ANY_NULLABLE]]" - } - } -} diff --git a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110.feature b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110.feature index 71e994bb86..6ed5c63769 100644 --- a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110.feature +++ b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110.feature @@ -4,10 +4,10 @@ Feature: F-110: Create case for caseworker using V2 api Background: Load test data for the scenario Given an appropriate test context as detailed in the test data source - @S-110.1 @Ignore + @S-110.1 Scenario: must validate date in a right format Given a user with [an active profile in CCD] - And a successful call [to create a token for case creation] as in [F-109_GetToken] + And a successful call [to create a token for case creation] as in [S-110_GetToken] When a request is prepared with appropriate values And the request [contains valid value for a formatted Date field] And it is submitted to call the [create case] operation of [CCD Data Store] @@ -15,10 +15,10 @@ Feature: F-110: Create case for caseworker using V2 api And the response [has 201 return code] And the response has all other details as expected - @S-110.2 @Ignore + @S-110.2 Scenario: must return an error for date value with invalid format Given a user with [an active profile in CCD] - And a successful call [to create a token for case creation] as in [F-109_GetToken] + And a successful call [to create a token for case creation] as in [S-110_GetToken] When a request is prepared with appropriate values And the request [contains Date field with incorrect format] And it is submitted to call the [create case] operation of [CCD Data Store] diff --git a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110_Test_Data_Base.td.json b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110_Test_Data_Base.td.json index 2ecae8e4ac..2926e85ded 100644 --- a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110_Test_Data_Base.td.json +++ b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/F-110_Test_Data_Base.td.json @@ -22,7 +22,7 @@ "description": "" }, "security_classification": "PUBLIC", - "event_token": "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", + "event_token": "${[scenarioContext][childContexts][S-110_GetToken][testData][actualResponse][body][token]}", "ignore_warning": true } }, diff --git a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.1.td.json b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.1.td.json index 0dedb8d387..34e12f0663 100644 --- a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.1.td.json +++ b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.1.td.json @@ -1,14 +1,12 @@ { - "_guid_": "S-110.1", - "_extends_": "F-110_Test_Data_Base", - - "title": "must validate date in a right format", - - "specs": [ - "an active profile in CCD", + "_guid_": "S-110.1", + "_extends_": "F-110_Test_Data_Base", + "title": "must validate date in a right format", + "specs": [ + "an active profile in CCD", "contains valid value for a formatted Date field", - "has 201 return code" - ], + "has 201 return code" + ], "request": { "body": { "data": { @@ -83,7 +81,6 @@ "description": "" }, "security_classification": "PUBLIC", - "event_token" : "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", "ignore_warning": true } }, @@ -98,78 +95,92 @@ "Transfer-Encoding": "[[ANYTHING_PRESENT]]", "Strict-Transport-Security": "[[ANY_NULLABLE]]" }, - "body" : { - "_links" : "[[ANYTHING_PRESENT]]", - "id" : "[[ANY_STRING_NOT_NULLABLE]]", - "jurisdiction" : "BEFTA_MASTER", - "case_type" : "FT_DateTimeFormats", - "created_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "last_modified_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "last_state_modified_on" : "[[ANY_TIMESTAMP_NOT_NULLABLE]]", - "state" : "TODO", - "security_classification" : "PUBLIC", - "data" : { - "CollectionComplexDateTime" : [ { - "value" : { - "DateField" : "1970-02-01", - "DateTimeField" : "1970-10-01T01:01:00.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000", - "NestedComplex" : { - "DateField" : "2019-01-01", - "DateTimeField" : "2019-01-01T01:01:01.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000" - } + "body": { + "_links": "[[ANYTHING_PRESENT]]", + "id": "[[ANY_STRING_NOT_NULLABLE]]", + "jurisdiction": "BEFTA_MASTER", + "case_type": "FT_DateTimeFormats", + "created_on": "[[ANY_TIMESTAMP_NOT_NULLABLE]]", + "last_modified_on": "[[ANY_TIMESTAMP_NOT_NULLABLE]]", + "last_state_modified_on": "[[ANY_TIMESTAMP_NOT_NULLABLE]]", + "state": "TODO", + "security_classification": "PUBLIC", + "data": { + "CollectionComplexDateTime": [ + { + "__elementId__": "value.DateField" }, - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - }, { - "value" : { - "DateField" : "", - "DateTimeField" : null, - "StandardDate" : null, - "StandardDateTime" : null, - "NestedComplex" : { - "DateField" : null, - "DateTimeField" : null, - "StandardDate" : null, - "StandardDateTime" : null - } + { + "value": { + "DateField": "1970-02-01", + "DateTimeField": "1970-10-01T01:01:00.000", + "StandardDate": "2019-01-01", + "StandardDateTime": "2019-01-01T01:01:01.000", + "NestedComplex": { + "DateField": "2019-01-01", + "DateTimeField": "2019-01-01T01:01:01.000", + "StandardDate": "2019-01-01", + "StandardDateTime": "2019-01-01T01:01:01.000" + } + }, + "id": "[[ANY_STRING_NOT_NULLABLE]]" }, - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "ComplexDateTime" : { - "DateField" : "1970-02-11", - "DateTimeField" : "1970-04-30T01:01:00.000", - "StandardDate" : "2010-02-02", - "StandardDateTime" : "2019-12-20T01:01:01.000", - "NestedComplex" : { - "DateField" : "2019-01-01", - "DateTimeField" : "2019-01-01T00:00:00.000", - "StandardDate" : "2019-01-01", - "StandardDateTime" : "2019-01-01T01:01:01.000" + { + "value": { + "DateField": "", + "DateTimeField": null, + "StandardDate": null, + "StandardDateTime": null, + "NestedComplex": { + "DateField": null, + "DateTimeField": null, + "StandardDate": null, + "StandardDateTime": null + } + }, + "id": "[[ANY_STRING_NOT_NULLABLE]]" + } + ], + "ComplexDateTime": { + "DateField": "1970-02-11", + "DateTimeField": "1970-04-30T01:01:00.000", + "StandardDate": "2010-02-02", + "StandardDateTime": "2019-12-20T01:01:01.000", + "NestedComplex": { + "DateField": "2019-01-01", + "DateTimeField": "2019-01-01T00:00:00.000", + "StandardDate": "2019-01-01", + "StandardDateTime": "2019-01-01T01:01:01.000" } }, - "CollectionDate" : [ { - "value" : "1970-03-01", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - }, { - "value" : "", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "CollectionDateTime" : [ { - "value" : "2002-01-01T00:00:00.000", - "id" : "[[ANY_STRING_NOT_NULLABLE]]" - } ], - "StandardDateTime" : "1998-09-01T16:01", - "StandardDate" : "2016-12-01", - "DateField" : "1970-01-23", - "DateTimeField" : "2000-01-01T00:23:00.000" + "CollectionDate": [ + { + "value": "1970-03-01", + "id": "[[ANY_STRING_NOT_NULLABLE]]" + }, + { + "value": "", + "id": "[[ANY_STRING_NOT_NULLABLE]]" + } + ], + "CollectionDateTime": [ + { + "value": "2002-01-01T00:00:00.000", + "id": "[[ANY_STRING_NOT_NULLABLE]]" + } + ], + "StandardDateTime": "1998-09-01T16:01", + "StandardDate": "2016-12-01", + "DateField": "1970-01-23", + "DateTimeField": "2000-01-01T00:23:00.000" }, "data_classification": { "CollectionComplexDateTime": { "classification": "PUBLIC", "value": [ + { + "__elementId__": "value.DateField" + }, { "value": { "DateField": "PUBLIC", @@ -229,6 +240,9 @@ "CollectionDate": { "classification": "PUBLIC", "value": [ + { + "__elementId__": "value.classification" + }, { "id": "[[ANY_STRING_NOT_NULLABLE]]", "classification": "PUBLIC" @@ -253,12 +267,11 @@ "DateField": "PUBLIC", "DateTimeField": "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 + "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 } } } diff --git a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.2.td.json b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.2.td.json index 19c2a02c46..8120724ff2 100644 --- a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.2.td.json +++ b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110.2.td.json @@ -1,6 +1,6 @@ { "_guid_": "S-110.2", - "_extends_": "F-109_Test_Data_Base", + "_extends_": "F-110_Test_Data_Base", "title": "must return an error for date value with invalid format", @@ -83,7 +83,6 @@ "description": "" }, "security_classification": "PUBLIC", - "event_token" : "${[scenarioContext][childContexts][F-103_GetToken][testData][actualResponse][body][token]}", "ignore_warning": true } }, diff --git a/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110_GetToken.td.json b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110_GetToken.td.json new file mode 100644 index 0000000000..871e2e74f1 --- /dev/null +++ b/src/aat/resources/features/F-110 - Create Case Citizen V2 External/S-110_GetToken.td.json @@ -0,0 +1,58 @@ +{ + "_guid_": "S-110_GetToken", + "_extends_": "Befta_Default_Token_Creation_Data_For_Case_Creation", + + "specs": [ + "to create a token for case creation" + ], + + "request": { + "pathVariables": { + "uid": "[[DEFAULT_AUTO_VALUE]]", + "jid": "BEFTA_MASTER", + "ctid": "FT_DateTimeFormats", + "etid": "CREATE" + } + }, + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "headers": { + "Content-Encoding": "gzip", + "Content-Type": "application/json", + "Content-Length": "[[ANYTHING_NULLABLE]]", + "Connection": "[[ANYTHING_PRESENT]]", + "Keep-Alive": "[[ANYTHING_PRESENT]]", + "Transfer-Encoding": "[[ANYTHING_PRESENT]]", + "Strict-Transport-Security": "[[ANYTHING_NULLABLE]]" + }, + "body": { + "token": "[[ANYTHING_PRESENT]]", + "case_details": { + "id": null, + "jurisdiction": "BEFTA_MASTER", + "state": null, + "version": null, + "case_type_id": "FT_DateTimeFormats", + "created_date": null, + "last_modified": null, + "last_state_modified_date": null, + "security_classification": null, + "case_data": {}, + "data_classification": {}, + "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 + }, + "event_id": "CREATE" + } + } +} diff --git a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/F-111.feature b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/F-111.feature index 8f0a69fbb9..2b1001a6bf 100644 --- a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/F-111.feature +++ b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/F-111.feature @@ -81,6 +81,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles And the response has all the details as expected, And a call [to verify Olawale's loss of the role CR-2 over the case C1] will get the expected response as in [S-111.14_Get_Case_Roles_for_Case_C1_After_Remove], And a call [to verify the count of users unassigned to C1 has NOT changed] will get the expected response as in [S-111.14_Verify_User_Count_Assigned_To_Case_Equals_1]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.15 Scenario: must not decrease Assigned User Count when when no organisation ID is provided @@ -118,6 +120,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.4 Scenario: must return an error response for a empty Case ID @@ -136,6 +140,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.5 Scenario: must return an error response for a missing User ID @@ -154,6 +160,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.6 Scenario: must return an error response for a malformed User ID @@ -172,6 +180,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.7 Scenario: must return an error response when the request is made from an un-authorised application @@ -190,6 +200,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.8 Scenario: Must return an error response for a malformed Case Role @@ -207,7 +219,9 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, - And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add], + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.9 Scenario: must return an error response for a missing Case Role @@ -226,6 +240,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.10 Scenario: must return an error response for missing case_users list @@ -266,6 +282,8 @@ Feature: F-111: Remove Case-Assigned Users and Roles Then a negative response is received, And the response has all the details as expected, And a call [to verify that Olawale hasn't lost the role CR-1 over the case C1] will get the expected response as in [F-111_Get_Case_Roles_for_Case_C1_After_Add]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111_Remove_Case_Assigned_User_role_for_Case_C1]. @S-111.16 Scenario: must reject request when an empty Organisation ID is provided @@ -286,3 +304,5 @@ Feature: F-111: Remove Case-Assigned Users and Roles And the response has all the details as expected, And a call [to verify that Olawale and Hemanth haven't lost the role CR-1 over the case C1] will get the expected response as in [S-111.16_Get_Case_Roles_for_Case_C1_After_Remove], And a call [to verify the count of users assigned to a case has NOT changed] will get the expected response as in [S-111.16_Verify_User_Count_Unchanged]. + # Clean up role assignment made above + And a successful call [is made to remove Case Role CR-1] as in [F-111.16_Remove_Case_Assigned_User_role_for_Case_C1]. diff --git a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/S-111.16/F-111.16_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/S-111.16/F-111.16_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..4d8f1795e2 --- /dev/null +++ b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/With Organisation Context/common/S-111.16/F-111.16_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-111.16_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "_extends_": "F-111_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-111_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]" + }, + { + "case_id": "${}${[scenarioContext][siblingContexts][F-111_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userHemanth][id]}", + "case_role": "[CR-1]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/Without Organisation Context/common/F-111_Remove_Case_Assigned_User_role_for_Case_C1.td.json b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/Without Organisation Context/common/F-111_Remove_Case_Assigned_User_role_for_Case_C1.td.json new file mode 100644 index 0000000000..a6fda5a1a7 --- /dev/null +++ b/src/aat/resources/features/F-111 - Remove Case-Assigned Users and Roles/Without Organisation Context/common/F-111_Remove_Case_Assigned_User_role_for_Case_C1.td.json @@ -0,0 +1,33 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-111_Remove_Case_Assigned_User_role_for_Case_C1", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role CR-1" + ], + + "users": { + "_extends_": "F-111_Users" + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][userDil][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${}${[scenarioContext][siblingContexts][F-111_Prerequisite_Case_Creation_Call_for_Case_Assignment][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][userOlawale][id]}", + "case_role": "[CR-1]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +} diff --git a/src/aat/resources/features/F-114 - Notice Of Change/F-114.feature b/src/aat/resources/features/F-114 - Notice Of Change/F-114.feature index 9cb4a8de25..b25f95f2c8 100644 --- a/src/aat/resources/features/F-114 - Notice Of Change/F-114.feature +++ b/src/aat/resources/features/F-114 - Notice Of Change/F-114.feature @@ -4,7 +4,7 @@ Feature: F-114: Change Organisation Request on cases Background: Load test data for the scenario Given an appropriate test context as detailed in the test data source - @S-114.1 @Ignore + @S-114.1 Scenario: must successfully create a case with a case type containing ChangeOrganisationRequest Complex Fields Given a user with [an active profile in CCD] And a successful call [to create a token for case creation] as in [F-114_Case_Data_Create_Token_Creation] @@ -14,7 +14,7 @@ Feature: F-114: Change Organisation Request on cases Then a positive response is received And the response has all other details as expected - @S-114.2 @Ignore + @S-114.2 Scenario: must return negative response for a case creation attempt with an invalid data in ChangeOrganisationRequest Complex Fields Given a user with [an active profile in CCD] And a successful call [to create a token for case creation] as in [F-114_Case_Data_Create_Token_Creation] diff --git a/src/aat/resources/features/F-127 - Even Enabling Condition/F-127.feature b/src/aat/resources/features/F-127 - Even Enabling Condition/F-127.feature index 32cdbcf09e..33472bc7b6 100644 --- a/src/aat/resources/features/F-127 - Even Enabling Condition/F-127.feature +++ b/src/aat/resources/features/F-127 - Even Enabling Condition/F-127.feature @@ -7,7 +7,7 @@ Feature: F-127: Event Enabling Condition Given an appropriate test context as detailed in the test data source #----------------------------------------------------------------------------------------------------------------------- - @S-127.1 @Ignore + @S-127.1 Scenario: Create Case and check the events when event enabling condition is matching Given an appropriate test context as detailed in the test data source @@ -21,7 +21,7 @@ Feature: F-127: Event Enabling Condition And the response has all the details as expected #----------------------------------------------------------------------------------------------------------------------- - @S-127.2 @Ignore + @S-127.2 Scenario: Create Case and check the events when event enabling condition is not matching Given an appropriate test context as detailed in the test data source diff --git a/src/aat/resources/features/F-128 - Dynamic Lists/F-128.feature b/src/aat/resources/features/F-128 - Dynamic Lists/F-128.feature index 9d66e06d02..58e7ad7197 100644 --- a/src/aat/resources/features/F-128 - Dynamic Lists/F-128.feature +++ b/src/aat/resources/features/F-128 - Dynamic Lists/F-128.feature @@ -4,7 +4,7 @@ Feature: F-128: Dynamic Radio List ad Dynamic Multi Select List Background: Load test data for the scenario Given an appropriate test context as detailed in the test data source - @S-128.1 @Ignore + @S-128.1 Scenario: must successfully create a case with a case type containing dynamic radio and dynamic multi select list Given a user with [an active profile in CCD] And a successful call [to create a token for case creation with about start event callback] as in [F-128_Case_Data_Create_Token_Creation] diff --git a/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130.feature b/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130.feature index 5849fc77a6..c28808c1f2 100644 --- a/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130.feature +++ b/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130.feature @@ -20,6 +20,8 @@ Scenario: must create case successfully and return positive response HTTP-201 fo Then a positive response is received, And the response [code is HTTP-201], And the response has all other details as expected. + # Clean up role assignment made above + And a successful call [is made to remove Case Role] as in [F-130_Remove_Case_Assigned_User_role_for_Case]. @S-1270 diff --git a/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130_Remove_Case_Assigned_User_role_for_Case.td.json b/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130_Remove_Case_Assigned_User_role_for_Case.td.json new file mode 100644 index 0000000000..8118ee1c25 --- /dev/null +++ b/src/aat/resources/features/F-130 - Create Case Citizen V1 Supplementary Data/F-130_Remove_Case_Assigned_User_role_for_Case.td.json @@ -0,0 +1,38 @@ +{ + "title": "Must successfully remove a user and case role for a specific case by a user calling through/from an authorised application", + + "_guid_": "F-130_Remove_Case_Assigned_User_role_for_Case", + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_Base", + + "specs": [ + "is made to remove Case Role" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworker2Solicitor2" + }, + "testUser": { + "_extends_": "BeftaCitizen3" + } + }, + + "request": { + "headers": { + "Authorization": "Bearer ${[scenarioContext][testData][users][invokingUser][accessToken]}" + }, + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][parentContext][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][testUser][id]}", + "case_role": "[CREATOR]" + } + ] + } + }, + + "expectedResponse": { + "_extends_": "F-111_Remove_Case_Assigned_User_Roles_200_response" + } +}