diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 5ae9d6897..4fba31b92 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -16,7 +16,7 @@ GradleBuilder builder = new GradleBuilder(this, product) def definitionStoreDevelopPr = "PR-575" // This doesn't change frequently, but when it does, only change this value. def dataStoreApiDevelopPr = "PR-1260" // This doesn't change frequently, but when it does, only change this value. def prsToUseAat = "PR-148,PR-161,PR-167,PR-259,PR-264" // Set this value to a PR number, or add it as a comma-separated value, if it's to follow CI/CD. -def prsRunningInIsolation = "PR-463" // Set this value to a PR number, or add it as a comma-separated value, if PRs for MCA, Data-Store and Def-Store are all configured to run in isolation from other PRs. +def prsRunningInIsolation = "PR-561" // Set this value to a PR number, or add it as a comma-separated value, if PRs for MCA, Data-Store and Def-Store are all configured to run in isolation from other PRs. def secrets = [ 'rpx-${env}': [ @@ -41,7 +41,15 @@ def secrets = [ secret('ccd-befta-jurisdiction3-solicitor1-pwd', 'CCD_BEFTA_JURISDICTION_3_SOLICITOR_1_PWD'), secret('ccd-befta-solicitor-4-pwd', 'CCD_BEFTA_SOLICITOR_4_PWD'), secret('ccd-befta-citizen-2-pwd', 'CCD_BEFTA_CITIZEN_2_PWD'), - secret('ccd-befta-pui-caa-1-pwd', 'CCD_BEFTA_PUI_CAA_1_PWD') + secret('ccd-befta-pui-caa-1-pwd', 'CCD_BEFTA_PUI_CAA_1_PWD'), + // Secrets for CCD-5334 / CCD-3836 Testing + secret('ccd-befta-caseworker-caa-pwd', 'CCD_BEFTA_CASEWORKER_CAA_PWD'), + secret('ccd-befta-master-caseworker-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_PWD'), + secret('ccd-befta-master-caseworker-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_ROLE1_BASIC_PWD'), + secret('ccd-befta-master-caseworker-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_ROLE1_STANDARD_PWD'), + secret('ccd-befta-master-caseworker-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_ROLE3_CHALLENGED_PWD'), + secret('ccd-befta-master-caseworker-regional-staff-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_REGIONAL_STAFF_PWD'), + secret('ccd-befta-master-caseworker-staff-pwd', 'CCD_BEFTA_MASTER_CASEWORKER_STAFF_PWD') ], 's2s-${env}': [ secret('microservicekey-ccd-gw', 'CCD_API_GATEWAY_S2S_KEY'), diff --git a/befta_recent_executions_info_LOCAL.json b/befta_recent_executions_info_LOCAL.json new file mode 100644 index 000000000..a8acb5b22 --- /dev/null +++ b/befta_recent_executions_info_LOCAL.json @@ -0,0 +1,6 @@ +{ + "dataSetupEnvironment" : "LOCAL", + "lastExecutionTime" : "2025-06-25T12:50:44.898", + "lastExecutionProjectRepo" : "aac-manage-case-assignment", + "lastExecutionProjectBranch" : "CCD-6255_FT_Tests_Update_NoC_create_case_not_have_case_role" +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 590df82ed..fd12be2a5 100644 --- a/build.gradle +++ b/build.gradle @@ -128,9 +128,6 @@ tasks.register('smoke', Test) { outputs.upToDateWhen { false } } -def tags = (findProperty('tags') == null) ? ' not @Ignore' : '(' + findProperty('tags') + ') and not @Ignore' -println 'tags =' + tags - tasks.register('functional', Test) { description = "Runs functional tests" group = "Verification" @@ -145,6 +142,8 @@ tasks.register('functional', Test) { cucumberReports.reports = files("${cucumberReports.outputDir}/cucumber.json") cucumberReports.notFailingStatuses = ["skipped", "passed"] + def tags = (project.hasProperty('tags')) ? "(${project.property('tags')}) and not @Ignore" : 'not @Ignore' + javaexec { main = "uk.gov.hmcts.reform.managecase.befta.ManageCaseAssignmentBeftaMain" classpath += sourceSets.functionalTest.runtimeClasspath + sourceSets.main.output + sourceSets.test.output @@ -152,12 +151,13 @@ tasks.register('functional', Test) { '--threads', '1', '--plugin', "json:${cucumberReports.outputDir}/cucumber.json", '--plugin', "junit:${buildDir}/test-results/functional/cucumber.xml", - '--tags', 'not @Ignore', + '--tags', "${tags}", '--glue', 'uk.gov.hmcts.befta.player', '--glue', 'uk.gov.hmcts.reform.managecase.befta', 'src/functionalTest/resources/features' ] // '--add-opens=...' added to suppress 'WARNING: An illegal reflective access operation has occurred' in uk.gov.hmcts.befta.util.CucumberStepAnnotationUtils jvmArgs = [ '--add-opens=java.base/java.lang.reflect=ALL-UNNAMED' ] + println 'args =' + args } } @@ -452,7 +452,7 @@ dependencies { contractTestImplementation sourceSets.main.runtimeClasspath contractTestImplementation sourceSets.test.runtimeClasspath - testImplementation 'com.github.hmcts:fortify-client:1.4.3:all' + testImplementation 'com.github.hmcts:fortify-client:1.4.9:all' } bootJar { diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/F-206 - Request Notice Of Change.feature b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/F-206 - Request Notice Of Change.feature index a53a51647..80d16b65f 100644 --- a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/F-206 - Request Notice Of Change.feature +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/F-206 - Request Notice Of Change.feature @@ -142,9 +142,9 @@ Scenario: (Happy Path) CAA (also a solicitor for a different jurisdiction) reque #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -# ACA-68 / AC-7 +# ACA-68 / AC-7 CCD-5334/6255 AC1 @S-206.7 @callbackTests -Scenario: (Happy Path) Solicitor requests NoC to replace representation - auto-approval applies +Scenario: (Happy Path) Solicitor having STANDARD access to case requests NoC to replace representation - auto-approval applies Given a user [Richard - with the ability to create a case for a particular jurisdiction within an organisation], And a user [Dil - with a solicitor role for the same jurisdiction, within a different organisation from Richard's], @@ -159,9 +159,10 @@ Scenario: (Happy Path) Solicitor requests NoC to replace representation - auto-a Then a positive response is received, And the response has all the details as expected, - And a call [to verify that Dil HAS been granted case roles R1 & R2 for the case but not R3] will get the expected response as in [F-206_Verify_Granted_Case_Roles_R1_R2_Dil], + And a call [to verify that Dil has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Dil], And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -174,17 +175,17 @@ Scenario: (Happy Path) Solicitor requests NoC for a non-represented litigant - a And a successful call [by Mario to create a case C1, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both not assigned to any organisation] as in [F-206_NoC_Auto_Approval_Case_Creation_By_Mario_With_Assigned_R1_Org_Policy], When a request is prepared with appropriate values, - And the request [is made by Dil to place a NOC Request for C1], + And a call [to verify that Dil has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Dil], And the request [contains all correct answers in the correct format], And the request [contains answers identifying case role R2], And it is submitted to call the [Request NoC] operation of [Manage Case Assignment Microservice], Then a positive response is received, And the response has all the details as expected, - And a call [to verify that Dil HAS been granted case roles R1 & R2 for the case but not R3] will get the expected response as in [F-206_Verify_Granted_Case_Roles_R1_R2_Dil], + And a call [to verify that Dil has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Dil], And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_AddRepresentation], And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. - + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ACA-68 / AC-9 @@ -207,6 +208,7 @@ Scenario: (Happy Path) CAA requests NoC to replace representation - auto-approva And a call [to verify that Matt has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Matt], And another call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], And another call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -294,10 +296,10 @@ Scenario: (Happy Path) CAA (also a solicitor for the same jurisdiction) requests Then a positive response is received, And the response has all the details as expected, - And a call [to verify that Jane HAS been granted case roles R1 & R2 for the case but not R3] will get the expected response as in [F-206_Verify_Granted_Case_Roles_R1_R2_Jane], + And a call [to verify that Bill has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Bill], And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], - And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. - + And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data], + And a call [to get Grant Access Metadata API returning NO Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata_Bill] #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ACA-68 / AC-14 @@ -316,10 +318,10 @@ Scenario: (Happy Path) CAA (also a solicitor for the same jurisdiction) requests Then a positive response is received, And the response has all the details as expected, - And a call [to verify that Jane HAS been granted case roles R1 & R2 for the case but not R3] will get the expected response as in [F-206_Verify_Granted_Case_Roles_R1_R2_Jane], + And a call [to verify that JANE has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Jane], And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_AddRepresentation], - And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. - + And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data], + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata] #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # ACA-68 (repeat of ACA-71 / AC-4 && ACA-72 / AC-4 but for [Request NoC] API) diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/S-206.07.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/S-206.07.td.json index 9f0b03b6a..3d28dcace 100644 --- a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/S-206.07.td.json +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/S-206.07.td.json @@ -2,7 +2,7 @@ "_guid_": "S-206.7", "_extends_": "Request_NoC__Base", - "title": "(Happy Path) Solicitor requests NoC to replace representation - auto-approval applies", + "title": "(Happy Path) Solicitor having STANDARD access to case requests NoC to replace representation - auto-approval applies", "specs": [ "Richard - with the ability to create a case for a particular jurisdiction within an organisation", diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC.td.json new file mode 100644 index 000000000..e7e50d947 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC.td.json @@ -0,0 +1,19 @@ +{ + "_guid_": "GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC", + "_extends_": "GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC__Base", + + "specs": [ + "to grant SPECIFIC access to the BeftaMasterCaseworker" + ], + "request": { + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][invokingUser][id]}", + "case_role": "[SPECIFICACCESSPROFILE]" + } + ] + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC__Base.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC__Base.td.json new file mode 100644 index 000000000..6f6749220 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC__Base.td.json @@ -0,0 +1,13 @@ +{ + "_guid_": "GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC__Base", + "_extends_": "CaseUserRoles_Add__PositiveResponse_Base", + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + }, + "caseworker": { + "_extends_": "MasterCaseworker_RegionalStaff" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC.td.json new file mode 100644 index 000000000..b52ba161f --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC.td.json @@ -0,0 +1,19 @@ +{ + "_guid_": "GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC", + "_extends_": "GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base", + + "specs": [ + "to grant SPECIFIC access to the caseworkerCaa" + ], + "request": { + "body": { + "case_users": [ + { + "case_id": "${[scenarioContext][siblingContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies][testData][actualResponse][body][id]}", + "user_id": "${[scenarioContext][testData][users][invokingUser][id]}", + "case_role": "[SPECIFICACCESSPROFILE]" + } + ] + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base.td.json new file mode 100644 index 000000000..f23cd138e --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/GrantAccess/GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base.td.json @@ -0,0 +1,13 @@ +{ + "_guid_": "GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base", + "_extends_": "CaseUserRoles_Add__PositiveResponse_Base", + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + }, + "caseworker": { + "_extends_": "BeftaMasterCaseworker_Role1Basic" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_Token_Creation.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_Token_Creation.td.json new file mode 100644 index 000000000..56d4e213e --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_Token_Creation.td.json @@ -0,0 +1,14 @@ +{ + "_guid_": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_Token_Creation", + "_extends_": "NoC_Auto_Approval_Case_Creation_Token_Creation__Base", + + "specs": [ + "As a prerequisite" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies.td.json new file mode 100644 index 000000000..bec093b24 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies.td.json @@ -0,0 +1,80 @@ +{ + "_guid_": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies", + "_extends_": "F-206_NoC_Auto_Approval_Case_Creation__Base", + + "specs": [ + "by BeftaCaseworkerCaa to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both assigned to BeftaCaseworkerCaa's organisation", + "by BeftaCaseworkerCaa to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Matt's organisation, R2 & R3 which are both assigned to BeftaCaseworkerCaa's organisation", + "by BeftaCaseworkerCaa to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Alice's organisation, R2 & R3 which are both assigned to BeftaCaseworkerCaa's organisation", + "by BeftaCaseworkerCaa to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Jane's organisation, R2 & R3 which are both assigned to BeftaCaseworkerCaa's organisation" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + }, + + "prerequisites": [ + { + "Token_Creation": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_Token_Creation", + "Get_Organisation_Identifier": "Get_Organisation_Identifier_For_Any_Org1_User__Prerequisite" + } + ], + + "request": { + "body": { + "event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}", + + "data": { + "applicantOrganisationPolicy": { + "Organisation": { + "OrganisationID": "${[scenarioContext][childContexts][Get_Organisation_Identifier][testData][actualResponse][body][organisationIdentifier]}" + } + }, + "respondentOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + }, + "PreviousOrganisations": [ + { + "_extends_": "F-206_PreviousOrganisations" + } + ] + }, + "otherPartyOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + } + } + } + } + }, + + "expectedResponse": { + "body": { + "case_data": { + "applicantOrganisationPolicy": { + "Organisation": { + "OrganisationID": "${[scenarioContext][childContexts][Get_Organisation_Identifier][testData][actualResponse][body][organisationIdentifier]}" + } + }, + "respondentOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + }, + "PreviousOrganisations": [ + { + "_extends_": "F-206_PreviousOrganisations" + } + ] + }, + "otherPartyOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + } + } + } + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_Token_Creation.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_Token_Creation.td.json new file mode 100644 index 000000000..4ffe3ec4d --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_Token_Creation.td.json @@ -0,0 +1,14 @@ +{ + "_guid_": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_Token_Creation", + "_extends_": "NoC_Auto_Approval_Case_Creation_Token_Creation__Base", + + "specs": [ + "As a prerequisite" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies.td.json new file mode 100644 index 000000000..97b757bd5 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-creation/FT_NoCAutoApprovalCaseType/F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies.td.json @@ -0,0 +1,80 @@ +{ + "_guid_": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies", + "_extends_": "F-206_NoC_Auto_Approval_Case_Creation__Base", + + "specs": [ + "by BeftaMasterCaseworker to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both assigned to BeftaMasterCaseworker's organisation", + "by BeftaMasterCaseworker to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Matt's organisation, R2 & R3 which are both assigned to BeftaMasterCaseworker's organisation", + "by BeftaMasterCaseworker to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Alice's organisation, R2 & R3 which are both assigned to BeftaMasterCaseworker's organisation", + "by BeftaMasterCaseworker to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Jane's organisation, R2 & R3 which are both assigned to BeftaMasterCaseworker's organisation" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + + "prerequisites": [ + { + "Token_Creation": "F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_Token_Creation", + "Get_Organisation_Identifier": "Get_Organisation_Identifier_For_Any_Org1_User__Prerequisite" + } + ], + + "request": { + "body": { + "event_token": "${[scenarioContext][childContexts][Token_Creation][testData][actualResponse][body][token]}", + + "data": { + "applicantOrganisationPolicy": { + "Organisation": { + "OrganisationID": "${[scenarioContext][childContexts][Get_Organisation_Identifier][testData][actualResponse][body][organisationIdentifier]}" + } + }, + "respondentOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + }, + "PreviousOrganisations": [ + { + "_extends_": "F-206_PreviousOrganisations" + } + ] + }, + "otherPartyOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + } + } + } + } + }, + + "expectedResponse": { + "body": { + "case_data": { + "applicantOrganisationPolicy": { + "Organisation": { + "OrganisationID": "${[scenarioContext][childContexts][Get_Organisation_Identifier][testData][actualResponse][body][organisationIdentifier]}" + } + }, + "respondentOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + }, + "PreviousOrganisations": [ + { + "_extends_": "F-206_PreviousOrganisations" + } + ] + }, + "otherPartyOrganisationPolicy": { + "Organisation": { + "OrganisationID": "LESTKK0" + } + } + } + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaCaseworkerCaa.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaCaseworkerCaa.td.json new file mode 100644 index 000000000..4d770a03d --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaCaseworkerCaa.td.json @@ -0,0 +1,10 @@ +{ + "_guid_": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaCaseworkerCaa", + "_extends_": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval__Base", + + "request": { + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][childContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies][testData][actualResponse][body][id]}" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaMasterCaseworker.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaMasterCaseworker.td.json new file mode 100644 index 000000000..bfc3ae9a9 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case-data-snapshot/F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaMasterCaseworker.td.json @@ -0,0 +1,10 @@ +{ + "_guid_": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaMasterCaseworker", + "_extends_": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval__Base", + + "request": { + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][childContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies][testData][actualResponse][body][id]}" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__Base.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__Base.td.json new file mode 100644 index 000000000..d91a2432d --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__Base.td.json @@ -0,0 +1,18 @@ +{ + "_guid_": "CaseUserRoles_Add__Base", + + "title": "Add Case-Assigned Users and Roles", + + "productName": "CCD Data Store Api", + "operationName": "Add Case-Assigned Users and Roles", + + "method": "POST", + "uri": "/case-users", + + "request": { + "_extends_": "Common_Request", + "body": { + "case_users": [] + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__PositiveResponse_Base.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__PositiveResponse_Base.td.json new file mode 100644 index 000000000..14f290bd3 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/case_users/CaseUserRoles_Add__PositiveResponse_Base.td.json @@ -0,0 +1,20 @@ +{ + "_guid_": "CaseUserRoles_Add__PositiveResponse_Base", + "_extends_": "CaseUserRoles_Add__Base", + + "s2sClientId": "xui_webapp", + + "expectedResponse": { + "_extends_": "Common_201_Response", + + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "[[ANYTHING_PRESENT]]", + "Content-Encoding": "[[ANYTHING_PRESENT]]" + }, + + "body": { + "status_message": "Case-User-Role assignments created successfully" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Case_Roles_BeftaMasterCaseworker.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Case_Roles_BeftaMasterCaseworker.td.json new file mode 100644 index 000000000..f553eb18a --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Case_Roles_BeftaMasterCaseworker.td.json @@ -0,0 +1,15 @@ +{ + "_guid_": "F-206_Verify_Granted_Case_Roles_BeftaMasterCaseworker", + "_extends_": "F-206_Verify_Granted_Case_Roles_R1_R2__Base", + + "specs": [ + "to verify that specific access has been granted to BeftaMasterCaseworker for the case" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + } + +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Specific_Case_Roles_BeftaCaseworkerCaa.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Specific_Case_Roles_BeftaCaseworkerCaa.td.json new file mode 100644 index 000000000..2c8e7f6cb --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Granted_Specific_Case_Roles_BeftaCaseworkerCaa.td.json @@ -0,0 +1,15 @@ +{ + "_guid_": "F-206_Verify_Granted_Specific_Case_Roles_BeftaCaseworkerCaa", + "_extends_": "F-206_Verify_Granted_Case_Roles_R1_R2__Base", + + "specs": [ + "to verify that specific access has been granted to BeftaCaseworkerCaa for the case" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaCaseworkerCaa" + } + } + +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_BeftaCaseWorker.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_BeftaCaseWorker.td.json new file mode 100644 index 000000000..9b87610be --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_BeftaCaseWorker.td.json @@ -0,0 +1,15 @@ +{ + "_guid_": "F-206_Verify_Not_Granted_Case_Roles_BeftaMasterCaseWorker", + "_extends_": "F-206_Verify_Not_Granted_Case_Roles__Base", + + "specs": [ + "to verify that BeftaMasterCaseWorker has NOT been granted any case roles for the case" + ], + + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + } + +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Bill.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Bill.td.json new file mode 100644 index 000000000..5b885aff8 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Bill.td.json @@ -0,0 +1,15 @@ +{ + "_guid_": "F-206_Verify_Not_Granted_Case_Roles_Bill", + "_extends_": "F-206_Verify_Not_Granted_Case_Roles__Base", + + "specs": [ + "to verify that Bill has NOT been granted any case roles for the case" + ], + + "users": { + "invokingUser": { + "_extends_": "ACA_Users_Bill" + } + } + +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Jane.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Jane.td.json new file mode 100644 index 000000000..0e1483c0e --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/common/verify-case-roles/F-206_Verify_Not_Granted_Case_Roles_Jane.td.json @@ -0,0 +1,15 @@ +{ + "_guid_": "F-206_Verify_Not_Granted_Case_Roles_Jane", + "_extends_": "F-206_Verify_Not_Granted_Case_Roles__Base", + + "specs": [ + "to verify that JANE has NOT been granted any case roles for the case" + ], + + "users": { + "invokingUser": { + "_extends_": "ACA_Users_CAA_Jane" + } + } + +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata.td.json new file mode 100644 index 000000000..f5f344495 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "F-206_Verify_NoC_Request_Access_Metadata", + "_extends_": "Retrieve_Access_Metadata_By_Case_ID__Base", + + "specs": [ + "to get Grant Access Metadata API returning Standard Grant Access for case" + ], + + "users": { + "invokingUser": { + "_extends_": "ACA_Users_Caseworker_CAA" + } + }, + + "request": { + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][testData][request][body][case_id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "accessGrants" : [ "STANDARD" ], + "accessProcess": "NONE" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Bill.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Bill.td.json new file mode 100644 index 000000000..ca8cd0ec3 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Bill.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "F-206_Verify_NoC_Request_Access_Metadata_Bill", + "_extends_": "Retrieve_Access_Metadata_By_Case_ID__Base", + + "specs": [ + "to get Grant Access Metadata API returning NO Grant Access for case" + ], + + "users": { + "invokingUser": { + "_extends_": "ACA_Users_Bill" + } + }, + + "request": { + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][testData][request][body][case_id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "accessGrants" : [ ], + "accessProcess": "SPECIFIC" + } + } +} diff --git a/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Jane.td.json b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Jane.td.json new file mode 100644 index 000000000..bc3f49ae6 --- /dev/null +++ b/src/functionalTest/resources/features/F-206 - Request Notice Of Change/verify-case-access-metadata/F-206_Verify_NoC_Request_Access_Metadata_Jane.td.json @@ -0,0 +1,28 @@ +{ + "_guid_": "F-206_Verify_NoC_Request_Access_Metadata_Jane", + "_extends_": "Retrieve_Access_Metadata_By_Case_ID__Base", + + "specs": [ + "to get Grant Access Metadata API returning Standard Grant Access for case" + ], + + "users": { + "invokingUser": { + "_extends_": "ACA_Users_CAA_Jane" + } + }, + + "request": { + "pathVariables": { + "caseId": "${[scenarioContext][parentContext][testData][request][body][case_id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "accessGrants" : [ "STANDARD" ], + "accessProcess": "NONE" + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_Access_Requested_Case_Role_Assignment.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_Access_Requested_Case_Role_Assignment.td.json new file mode 100644 index 000000000..029fab837 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_Access_Requested_Case_Role_Assignment.td.json @@ -0,0 +1,93 @@ +{ + "title": "must successfully create access-requested Case Role Assignment", + "_guid_": "F-206_Access_Requested_Case_Role_Assignment", + "_extends_": "F-206_RAS_Test_Data_Base", + "specs": [ + "Befta1 - who is the actor for requested role", + "contains specific-access-legal-ops case requested role assignment" + ], + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "headers": { + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]" + }, + "body": { + "roleRequest": { + "assignerId": "${[scenarioContext][testData][users][invokingUser][id]}", + "reference": "${[scenarioContext][customValues][caseIdAsStringFrom_F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies]}/specific-access-judiciary/${[scenarioContext][testData][users][invokingUser][id]}", + "process" : "specific-access", + "replaceExisting" : true + }, + "requestedRoles": [ + { + "_extends_": "RequestedRole", + "roleType" : "CASE", + "grantType" : "BASIC", + "classification" : "PUBLIC", + "attributes": { + "caseId": "${[scenarioContext][customValues][caseIdAsStringFrom_F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies]}", + "requestedRole":"specific-access-judiciary", + "caseType" : "FT_NoCAutoApprovalCaseType" + }, + "roleName": "specific-access-requested", + "roleCategory": "JUDICIAL", + "actorId": "${[scenarioContext][testData][users][invokingUser][id]}", + "endTime" : "2024-03-02T00:00Z", + "readOnly": true, + "notes" : [{ + "userId": "${[scenarioContext][testData][users][invokingUser][id]}", + "time": "2022-01-01T00:00Z", + "comment": "Need Access to case number 1649753913215769 for a month" + }] + } + ] + } + }, + "expectedResponse": { + "_extends_": "Common_201_Response", + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + }, + "body": { + "roleAssignmentResponse": { + "roleRequest": { + "_extends_": "ResponseRoleRequest", + "reference": "${[scenarioContext][testData][request][body][roleRequest][reference]}", + "process" : "specific-access", + "replaceExisting": true + }, + "requestedRoles": [ + { + "_extends_": "ResponseRequestedRole", + "process" : "specific-access", + "actorId": "${[scenarioContext][testData][request][body][requestedRoles][0][actorId]}", + "roleName": "${[scenarioContext][testData][request][body][requestedRoles][0][roleName]}", + "roleCategory": "${[scenarioContext][testData][request][body][requestedRoles][0][roleCategory]}", + "roleType": "${[scenarioContext][testData][request][body][requestedRoles][0][roleType]}", + "grantType": "${[scenarioContext][testData][request][body][requestedRoles][0][grantType]}", + "classification" : "${[scenarioContext][testData][request][body][requestedRoles][0][classification]}", + "readOnly": true, + "attributes": { + "requestedRole":"specific-access-judiciary", + "caseId" : "${[scenarioContext][testData][request][body][requestedRoles][0][attributes][caseId]}", + "jurisdiction" : "${[scenarioContext][testData][request][body][requestedRoles][0][attributes][jurisdiction]}", + "caseType" : "FT_NoCAutoApprovalCaseType", + "substantive" : "N" + }, + "notes" : [{ + "userId": "[[ANYTHING_PRESENT]]", + "time": "[[ANYTHING_PRESENT]]", + "comment": "[[ANYTHING_PRESENT]]" + } + ] + } + ] + } + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_BeftaMasterCaseworker_specific-access_Base.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_BeftaMasterCaseworker_specific-access_Base.td.json new file mode 100644 index 000000000..b64b3f667 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_BeftaMasterCaseworker_specific-access_Base.td.json @@ -0,0 +1,31 @@ +{ + "_guid_": "F-206_BeftaMasterCaseworker_specific-access_Base", + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "headers": { + "Authorization": "[[DEFAULT_AUTO_VALUE]]", + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]", + "X-Correlation-ID": "003352d0-e699-48bc-b6f5-5810411e60af", + "Content-Type": "application/json" + }, + "body": { + "roleRequest": { + "assignerId": "${[scenarioContext][testData][users][invokingUser][id]}", + "process" : "specific-access", + "reference": "OVERRIDE_ME", + "replaceExisting": true + } + } + }, + "expectedResponse": { + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + } + } +} + diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_RAS_Test_Data_Base.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_RAS_Test_Data_Base.td.json new file mode 100644 index 000000000..c891856be --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206_RAS_Test_Data_Base.td.json @@ -0,0 +1,16 @@ +{ + "_guid_": "F-206_RAS_Test_Data_Base", + "_extends_": "F-206_BeftaMasterCaseworker_specific-access_Base", + "productName": "Role Assignments Service", + "operationName": "Create Role Assignments", + "specs": [ + "an active IDAM profile with full permissions" + ], + "method": "POST", + "uri": "{{ROLE_ASSIGNMENT_HOST}}/am/role-assignments", + "request": { + "headers": { + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]" + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206a - Request Notice Of Change Assigning Cases.feature b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206a - Request Notice Of Change Assigning Cases.feature new file mode 100644 index 000000000..0e5adb5f0 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/F-206a - Request Notice Of Change Assigning Cases.feature @@ -0,0 +1,81 @@ +#============================================= +@F-206a +Feature: F-206a: Request Notice of Change (NoC) - Assigning Cases +#============================================= + +Background: + Given an appropriate test context as detailed in the test data source + +#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + @S-206a.01 @callbackTests #(S-206.7 REPLACEMENT) + Scenario: NoC is requested by a Solicitor having STANDARD access to case - auto-approval applies + + Given a user [Richard - with the ability to create a case for a particular jurisdiction within an organisation], + And a user [Dil - with a solicitor role for the same jurisdiction, within a different organisation from Richard's], + And [a citizen Mario, on behalf of whom Richard will create a case] in the context, + And a successful call [by Richard to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both assigned to Richard's organisation] as in [F-206_NoC_Auto_Approval_Case_Creation_By_Richard_With_Assigned_Org_Policies], + + When a request is prepared with appropriate values, + And the request [is made by Dil to place a NOC Request for C1], + And the request [contains all correct answers in the correct format], + And the request [contains answers identifying case role R2], + And it is submitted to call the [Request NoC] operation of [Manage Case Assignment Microservice], + + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify that Dil has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_Dil], + And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], + And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], + + @Ignore @S-206a.02 @callbackTests + Scenario: NoC is requested by a Solicitor having SPECIFIC access to case - auto-approval applies + + Given a user [BeftaCaseworkerCaa - with the ability to create a case for a particular jurisdiction within an organisation], + And a user [Dil - with a solicitor role for the same jurisdiction, within a different organisation from BeftaCaseworkerCaa's], + And [a citizen Mario, on behalf of whom BeftaCaseworkerCaa will create a case] in the context, + And a successful call [by BeftaCaseworkerCaa to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both assigned to BeftaCaseworkerCaa's organisation] as in [F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies], + And a successful call [to grant SPECIFIC access to the caseworkerCaa] as in [GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC] + + When a request is prepared with appropriate values, + And the request [is made by Dil to place a NOC Request for C1], + And the request [contains all correct answers in the correct format], + And the request [contains answers identifying case role R2], + And it is submitted to call the [Request NoC] operation of [Manage Case Assignment Microservice], + + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify that specific access has been granted to BeftaCaseworkerCaa for the case] will get the expected response as in [F-206_Verify_Granted_Specific_Case_Roles_BeftaCaseworkerCaa], + And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], + And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], + + + @S-206a.03 @callbackTests #SPECIFIC + Scenario: NoC is requested by a Solicitor having SPECIFIC access to case - auto-approval applies + + Given a user [BeftaMasterCaseworker - with the ability to create a case for a particular jurisdiction within an organisation], + And a user [Dil - with a solicitor role for the same jurisdiction, within a different organisation from BeftaMasterCaseworker's], + And [a citizen Mario, on behalf of whom BeftaMasterCaseworker will create a case] in the context, + And a successful call [by BeftaMasterCaseworker to create a case C1 on behalf of Mario, which contains 3 Org Policies for 3 case roles: R1 which is assigned to Dil's organisation, R2 & R3 which are both assigned to BeftaMasterCaseworker's organisation] as in [F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies], + + When a request is prepared with appropriate values, + And the request [is made by Dil to place a NOC Request for C1], + And the request [contains all correct answers in the correct format], + And the request [contains answers identifying case role R2], + And it is submitted to call the [Request NoC] operation of [Manage Case Assignment Microservice], + + Then a positive response is received, + And the response has all the details as expected, + And a call [to verify that BeftaMasterCaseWorker has NOT been granted any case roles for the case] will get the expected response as in [F-206_Verify_Not_Granted_Case_Roles_BeftaMasterCaseWorker], + And a call [to verify there is NO pending NOC request on the case and the OrganisationPolicy for R2 HAS been updated] will get the expected response as in [F-206_Verify_Case_Data_COR_Approved_ReplaceRepresentation], + And a call [to get Case Events API returns a NoCRequest event in which the user ID is set to invoking users email address AND the proxied_by field set to the ID of the system user] will get the expected response as in [F-206_Verify_NoC_Request_Event_Data]. + And a call [to get Grant Access Metadata API returning Standard Grant Access for case] will get the expected response as in [F-206_Verify_NoC_Request_Access_Metadata], + + #set up so that the next scenario can run to create a specific access role assignment for the BeftaMasterCaseworker + And a successful call [to create org role assignments for actors & requester] as in [S-206_Org_Role_Creation], + When a request is prepared with appropriate values, + And a successful call [contains specific-access-legal-ops case requested role assignment] as in [F-206_Access_Requested_Case_Role_Assignment], + And a successful call [an active IDAM profile with full permissions] as in [F-206_RAS_Test_Data_Base] + And a call [to grant SPECIFIC access to the BeftaMasterCaseworker] will get the expected response as in [GrantAccess_FT_NoCAutoApprovalCaseType_BeftaMasterCaseworker_SPECIFIC], diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForOrgRoles.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForOrgRoles.td.json new file mode 100644 index 000000000..602a65a2c --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForOrgRoles.td.json @@ -0,0 +1,33 @@ +{ + "_guid_": "S-206_DeleteDataForRoleAssignmentsForOrgRoles", + "productName": "Role Assignment Service", + "operationName": "Delete Role Assignments by Process", + "method": "DELETE", + "uri": "/am/role-assignments?process={process}&reference={reference}", + "specs": [ + "to delete role assignments just created above" + ], + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "headers": { + "Authorization": "[[DEFAULT_AUTO_VALUE]]", + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]", + "X-Correlation-ID": "003352d0-e699-48bc-b6f5-5810411e60af" + }, + "pathVariables": { + "process": "specific-access", + "reference": "${[scenarioContext][parentContext][childContexts][S-210_Org_Role_Creation][testData][request][body][roleRequest][reference]}" + } + }, + "expectedResponse": { + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + }, + "_extends_": "Common_204_Response" + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForRequestedRole.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForRequestedRole.td.json new file mode 100644 index 000000000..2b89c3eb1 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_DeleteDataForRoleAssignmentsForRequestedRole.td.json @@ -0,0 +1,33 @@ +{ + "_guid_": "S-206_DeleteDataForRoleAssignmentsForRequestedRole", + "productName": "Role Assignment Service", + "operationName": "Delete Role Assignments by Process", + "method": "DELETE", + "uri": "/am/role-assignments?process={process}&reference={reference}", + "specs": [ + "to delete role assignments just created above" + ], + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "headers": { + "Authorization": "[[DEFAULT_AUTO_VALUE]]", + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]", + "X-Correlation-ID": "003352d0-e699-48bc-b6f5-5810411e60af" + }, + "pathVariables": { + "process": "specific-access", + "reference": "${[scenarioContext][parentContext][testData][request][body][roleRequest][reference]}" + } + }, + "expectedResponse": { + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + }, + "_extends_": "Common_204_Response" + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_Org_Role_Creation.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_Org_Role_Creation.td.json new file mode 100644 index 000000000..9e53843e4 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206_Org_Role_Creation.td.json @@ -0,0 +1,67 @@ +{ + "_guid_": "S-206_Org_Role_Creation", + "_extends_": "F-206_RAS_Test_Data_Base", + "specs": [ + "to create org role assignments for actors & requester", + "Befta1 - who is the actor for requested role" + ], + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "body": { + "roleRequest": { + "assignerId": "${[scenarioContext][testData][users][invokingUser][id]}", + "reference": "S_206_Org_Role_For_Multiple_Actors", + "process": "specific-access" + }, + "requestedRoles": [ + { + "_extends_": "RequestedRole", + "actorId": "${[scenarioContext][testData][users][invokingUser][id]}", + "roleName": "case-allocator", + "roleCategory": "JUDICIAL", + "beginTime" : "2022-01-01T00:00:00Z", + "attributes": + { + "jurisdiction": "IA" + } + } + ] + } + }, + "expectedResponse": { + "_extends_": "Common_201_Response", + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + }, + "body": { + "roleAssignmentResponse": { + "roleRequest": { + "_extends_": "ResponseRoleRequest", + "replaceExisting": true, + "process": "specific-access" + }, + "requestedRoles": [ + { + "_extends_": "ResponseRequestedRole", + "process": "specific-access", + "actorId": "${[scenarioContext][testData][users][invokingUser][id]}", + "roleType": "ORGANISATION", + "grantType": "STANDARD", + "roleCategory": "JUDICIAL", + "roleName": "case-allocator", + "attributes": + { + "jurisdiction": "IA", + "substantive" : "N" + } + } + ] + } + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.01.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.01.td.json new file mode 100644 index 000000000..e3080f206 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.01.td.json @@ -0,0 +1,48 @@ +{ + "_guid_": "S-206a.01", + "_extends_": "Request_NoC__Base", + + "title": "NoC is requested by a Solicitor having STANDARD access to case - auto-approval applies", + + "specs": [ + "Richard - with the ability to create a case for a particular jurisdiction within an organisation", + "Dil - with a solicitor role for the same jurisdiction, within a different organisation from Richard's", + "a citizen Mario, on behalf of whom Richard will create a case", + + "contains all correct answers in the correct format", + "contains answers identifying case role R2", + + "is made by Dil to place a NOC Request for C1" + ], + + "users": { + "Richard": { + "_extends_": "ACA_Users_Richard" + }, + "invokingUser": { + "_extends_": "ACA_Users_Dil" + } + }, + + "prerequisites": [ + { "case_snapshot": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_Richard" + } + ], + + "request": { + "body": { + "_extends_": "NoC_Auto_Approval_Valid_Answers_For_Case_Role_R2", + + "case_id": "${[scenarioContext][childContexts][F-206_NoC_Auto_Approval_Case_Creation_By_Richard_With_Assigned_Org_Policies][testData][actualResponse][body][id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_201_Response", + "body": { + "status_message": "The Notice of Change request has been successfully submitted.", + "case_role": "[RespondentSolicitor]", + "approval_status": "APPROVED" + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.02.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.02.td.json new file mode 100644 index 000000000..dd1571893 --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.02.td.json @@ -0,0 +1,48 @@ +{ + "_guid_": "S-206a.02", + "_extends_": "Request_NoC__Base", + + "title": "NoC is requested by a Solicitor having STANDARD access to case - auto-approval applies", + + "specs": [ + "BeftaCaseworkerCaa - with the ability to create a case for a particular jurisdiction within an organisation", + "Dil - with a solicitor role for the same jurisdiction, within a different organisation from BeftaCaseworkerCaa's", + "a citizen Mario, on behalf of whom BeftaCaseworkerCaa will create a case", + + "contains all correct answers in the correct format", + "contains answers identifying case role R2", + + "is made by Dil to place a NOC Request for C1" + ], + + "users": { + "Richard": { + "_extends_": "BeftaCaseworkerCaa" + }, + "invokingUser": { + "_extends_": "ACA_Users_Dil" + } + }, + + "prerequisites": [ + { "case_snapshot": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaCaseworkerCaa" + } + ], + + "request": { + "body": { + "_extends_": "NoC_Auto_Approval_Valid_Answers_For_Case_Role_R2", + + "case_id": "${[scenarioContext][childContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaCaseworkerCaa_With_Assigned_Org_Policies][testData][actualResponse][body][id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_201_Response", + "body": { + "status_message": "The Notice of Change request has been successfully submitted.", + "case_role": "[RespondentSolicitor]", + "approval_status": "APPROVED" + } + } +} diff --git a/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.03.td.json b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.03.td.json new file mode 100644 index 000000000..dd332a1ae --- /dev/null +++ b/src/functionalTest/resources/features/F-206a - Request Notice Of Change Assigning Cases/S-206a.03.td.json @@ -0,0 +1,48 @@ +{ + "_guid_": "S-206a.03", + "_extends_": "Request_NoC__Base", + + "title": "NoC is requested by a Solicitor having STANDARD access to case - auto-approval applies", + + "specs": [ + "BeftaMasterCaseworker - with the ability to create a case for a particular jurisdiction within an organisation", + "Dil - with a solicitor role for the same jurisdiction, within a different organisation from BeftaMasterCaseworker's", + "a citizen Mario, on behalf of whom BeftaMasterCaseworker will create a case", + + "contains all correct answers in the correct format", + "contains answers identifying case role R2", + + "is made by Dil to place a NOC Request for C1" + ], + + "users": { + "Richard": { + "_extends_": "BeftaMasterCaseworker" + }, + "invokingUser": { + "_extends_": "ACA_Users_Dil" + } + }, + + "prerequisites": [ + { "case_snapshot": "F-206_Take_Case_Data_Snapshot_For_NoC_Auto_Approval_Case_Created_By_BeftaMasterCaseworker" + } + ], + + "request": { + "body": { + "_extends_": "NoC_Auto_Approval_Valid_Answers_For_Case_Role_R2", + + "case_id": "${[scenarioContext][childContexts][F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies][testData][actualResponse][body][id]}" + } + }, + + "expectedResponse": { + "_extends_": "Common_201_Response", + "body": { + "status_message": "The Notice of Change request has been successfully submitted.", + "case_role": "[RespondentSolicitor]", + "approval_status": "APPROVED" + } + } +} diff --git a/src/functionalTest/resources/features/common/am-role/DeleteDataForRoleAssignments.td.json b/src/functionalTest/resources/features/common/am-role/DeleteDataForRoleAssignments.td.json new file mode 100644 index 000000000..d88275105 --- /dev/null +++ b/src/functionalTest/resources/features/common/am-role/DeleteDataForRoleAssignments.td.json @@ -0,0 +1,33 @@ +{ + "_guid_": "DeleteDataForRoleAssignments", + "productName": "Role Assignment Service", + "operationName": "Delete Role Assignments by Process", + "method": "DELETE", + "uri": "/am/role-assignments?process={process}&reference={reference}", + "specs": [ + "to delete role assignments just created above" + ], + "users": { + "invokingUser": { + "_extends_": "BeftaMasterCaseworker" + } + }, + "request": { + "headers": { + "Authorization": "[[DEFAULT_AUTO_VALUE]]", + "ServiceAuthorization": "[[DEFAULT_AUTO_VALUE]]", + "X-Correlation-ID": "003352d0-e699-48bc-b6f5-5810411e60af" + }, + "pathVariables": { + "reference": "${[scenarioContext][customValues][caseIdAsStringFrom_F-206_NoC_Auto_Approval_Case_Creation_By_BeftaMasterCaseworker_With_Assigned_Org_Policies]}/specific-access-judiciary/${[scenarioContext][testData][users][invokingUser][id]}", + "process" : "specific-access" + } + }, + "expectedResponse": { + "headers": { + "Content-Length": "[[ANYTHING_PRESENT]]", + "Content-Type": "application/json" + }, + "_extends_": "Common_204_Response" + } +} diff --git a/src/functionalTest/resources/features/common/am-role/RequestedRole.td.json b/src/functionalTest/resources/features/common/am-role/RequestedRole.td.json new file mode 100644 index 000000000..9cd55da85 --- /dev/null +++ b/src/functionalTest/resources/features/common/am-role/RequestedRole.td.json @@ -0,0 +1,31 @@ +{ + "_guid_": "RequestedRole", + "actorIdType": "IDAM", + "actorId": "123e4567-e89b-42d3-a456-556642445674", + "roleType": "ORGANISATION", + "roleName": "judge", + "roleCategory": "JUDICIAL", + "classification": "PUBLIC", + "grantType": "STANDARD", + "readOnly": false, + "beginTime" : "2021-01-01T00:00:00Z", + "endTime" : "2028-01-01T00:00:00Z", + "attributes": + { + "jurisdiction": "IA", + "contractType": "Salaried" + }, + "notes": + [ + { + "userId": "003352d0-e699-48bc-b6f5-5810411e60ag", + "time": "2020-01-01T00:00Z", + "comment": "Need Access to case number 1234567890123456 for a month" + }, + { + "userId": "52aa3810-af1f-11ea-b3de-0242ac130004", + "time": "2020-01-02T00:00Z", + "comment": "Access granted for 6 months" + } + ] +} diff --git a/src/functionalTest/resources/features/common/am-role/ResponseRequestedRole.td.json b/src/functionalTest/resources/features/common/am-role/ResponseRequestedRole.td.json new file mode 100644 index 000000000..4dd779871 --- /dev/null +++ b/src/functionalTest/resources/features/common/am-role/ResponseRequestedRole.td.json @@ -0,0 +1,33 @@ +{ + "_guid_": "ResponseRequestedRole", + "id" : "[[ANYTHING_PRESENT]]", + "actorIdType" : "IDAM", + "actorId": "${}${[scenarioContext][testData][request][body][roleRequest][reference]}", + "roleType": "ORGANISATION", + "roleName" : "judge", + "classification" : "PUBLIC", + "grantType": "STANDARD", + "roleCategory":"JUDICIAL", + "readOnly" : false, + "beginTime" : "[[ANYTHING_PRESENT]]", + "endTime" : "[[ANYTHING_PRESENT]]", + "process": "businessProcess1", + "reference": "${}${[scenarioContext][testData][request][body][roleRequest][reference]}", + "status":"LIVE", + "created":"[[ANYTHING_PRESENT]]", + "log":"[[ANYTHING_PRESENT]]", + "attributes" : { + "jurisdiction" : "IA", + "contractType": "Salaried", + "substantive": "Y" + }, + "notes" : [ { + "userId" : "003352d0-e699-48bc-b6f5-5810411e60ag", + "time" : "2020-01-01T00:00Z", + "comment" : "Need Access to case number 1234567890123456 for a month" + }, { + "userId" : "52aa3810-af1f-11ea-b3de-0242ac130004", + "time" : "2020-01-02T00:00Z", + "comment" : "Access granted for 6 months" + } ] +} diff --git a/src/functionalTest/resources/features/common/am-role/ResponseRoleAssignment.td.json b/src/functionalTest/resources/features/common/am-role/ResponseRoleAssignment.td.json new file mode 100644 index 000000000..244c55b36 --- /dev/null +++ b/src/functionalTest/resources/features/common/am-role/ResponseRoleAssignment.td.json @@ -0,0 +1,20 @@ +{ + "_guid_": "ResponseRoleAssignment", + "id": "[[ANYTHING_PRESENT]]", + "actorIdType": "IDAM", + "actorId": "123e4567-e89b-42d3-a456-556642445052", + "roleType": "ORGANISATION", + "roleName": "judge", + "classification": "PUBLIC", + "grantType": "STANDARD", + "roleCategory": "JUDICIAL", + "readOnly": false, + "beginTime": "[[ANYTHING_PRESENT]]", + "endTime": "[[ANYTHING_PRESENT]]", + "created": "[[ANYTHING_PRESENT]]", + "attributes": { + "contractType": "Salaried", + "jurisdiction": "IA", + "substantive": "Y" + } +} diff --git a/src/functionalTest/resources/features/common/am-role/ResponseRoleRequest.td.json b/src/functionalTest/resources/features/common/am-role/ResponseRoleRequest.td.json new file mode 100644 index 000000000..09484f553 --- /dev/null +++ b/src/functionalTest/resources/features/common/am-role/ResponseRoleRequest.td.json @@ -0,0 +1,16 @@ +{ + "_guid_": "ResponseRoleRequest", + + "id": "[[ANYTHING_PRESENT]]", + "correlationId": "${[scenarioContext][testData][request][headers][X-Correlation-ID]}", + "authenticatedUserId": "[[ANYTHING_PRESENT]]", + "assignerId": "${[scenarioContext][testData][request][body][roleRequest][assignerId]}", + "requestType": "CREATE", + "status": "APPROVED", + "process": "${[scenarioContext][testData][request][body][roleRequest][process]}", + "reference": "${}${[scenarioContext][testData][request][body][roleRequest][reference]}", + "replaceExisting": false, + "byPassOrgDroolRule" : "[[ANYTHING_PRESENT]]", + "created": "[[ANYTHING_PRESENT]]", + "log": "[[ANYTHING_PRESENT]]" +} diff --git a/src/functionalTest/resources/features/common/data-store/Retrieve_Access_Metadata_By_Case_ID__Base.td.json b/src/functionalTest/resources/features/common/data-store/Retrieve_Access_Metadata_By_Case_ID__Base.td.json new file mode 100644 index 000000000..447354232 --- /dev/null +++ b/src/functionalTest/resources/features/common/data-store/Retrieve_Access_Metadata_By_Case_ID__Base.td.json @@ -0,0 +1,20 @@ +{ + "_guid_": "Retrieve_Access_Metadata_By_Case_ID__Base", + + "productName": "CCD Data Store", + "operationName": "Retrieve access metadata for a given case ID", + + "method": "GET", + "uri": "{{CCD_DATA_STORE_API_BASE_URL}}/internal/cases/{caseId}/access-metadata", + + "request": { + "_extends_": "Common_Request", + "headers": { + "experimental": "true" + } + }, + + "expectedResponse": { + "_extends_": "Common_200_Response" + } +} diff --git a/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Found.td.json b/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Found.td.json new file mode 100644 index 000000000..9e6737b2c --- /dev/null +++ b/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Found.td.json @@ -0,0 +1,12 @@ +{ + "_guid_": "Access_Metadata_Case_Found", + "_extends_": "Retrieve_Access_Metadata_By_Case_ID__Base", + + "expectedResponse": { + "_extends_": "Common_200_Response", + "body": { + "accessGrants" : [ "STANDARD" ], + "accessProcess" : "NONE" + } + } +} diff --git a/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Not_Found.td.json b/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Not_Found.td.json new file mode 100644 index 000000000..6d1293f02 --- /dev/null +++ b/src/functionalTest/resources/features/common/response/Access_Metadata_Case_Not_Found.td.json @@ -0,0 +1,27 @@ +{ + "_guid_": "Access_Metadata_Case_Not_Found", + + "productName": "CCD Data Store", + "operationName": "Retrieve access metadata by case ID", + + "method": "GET", + "uri": "{{CCD_DATA_STORE_API_BASE_URL}}/cases/{caseId}/access-metadata", + + "request": { + "_extends_": "Common_Request", + "headers": { + "experimental": "true" + } + }, + + "expectedResponse": { + "_extends_" : "Common_404_Response", + "body" : { + "exception" : "uk.gov.hmcts.ccd.domain.service.getcase.CaseNotFoundException", + "message" : "No case found for reference: ${[scenarioContext][testData][request][pathVariables][caseId]}", + "details" : null, + "callbackErrors" : null, + "callbackWarnings" : null + } + } +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/BeftaCaseworkerCaa.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaCaseworkerCaa.td.json new file mode 100644 index 000000000..d771f09cd --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaCaseworkerCaa.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "BeftaCaseworkerCaa", + + "username": "befta.caseworker.caa@gmail.com", + "password": "[[$CCD_BEFTA_CASEWORKER_CAA_PWD]]" +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker.td.json new file mode 100644 index 000000000..bd3e6c32b --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "BeftaMasterCaseworker", + + "username": "master.caseworker@gmail.com", + "password": "[[$CCD_BEFTA_MASTER_CASEWORKER_PWD]]" +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic.td.json new file mode 100644 index 000000000..2cd9adaa8 --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "BeftaMasterCaseworker_Role1Basic", + + "username": "master.caseworker.role1.basic@gmail.com", + "password": "[[$CCD_BEFTA_MASTER_CASEWORKER_ROLE1_BASIC_PWD]]" +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic_Role3Challenged_Region123.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic_Role3Challenged_Region123.td.json new file mode 100644 index 000000000..014c782a2 --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Basic_Role3Challenged_Region123.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "BeftaMasterCaseworker_Role1Basic_Role3Challenged_Region123", + + "username": "master.caseworker.role3.challenged@gmail.com", + "password": "[[$CCD_BEFTA_MASTER_CASEWORKER_ROLE3_CHALLENGED_PWD]]" +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Standard.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Standard.td.json new file mode 100644 index 000000000..6c4701511 --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/BeftaMasterCaseworker_Role1Standard.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "BeftaMasterCaseworker_Role1Standard", + + "username": "master.external@gmail.com", + "password": "[[$CCD_BEFTA_MASTER_CASEWORKER_ROLE1_STANDARD_PWD]]" +} diff --git a/src/functionalTest/resources/features/common/users/RoleAccess/MasterCaseworker_RegionalStaff.td.json b/src/functionalTest/resources/features/common/users/RoleAccess/MasterCaseworker_RegionalStaff.td.json new file mode 100644 index 000000000..15c8f013a --- /dev/null +++ b/src/functionalTest/resources/features/common/users/RoleAccess/MasterCaseworker_RegionalStaff.td.json @@ -0,0 +1,6 @@ +{ + "_guid_": "MasterCaseworker_RegionalStaff", + + "username": "master.caseworker.regional-staff@gmail.com", + "password": "[[$CCD_BEFTA_MASTER_CASEWORKER_ROLE3_CHALLENGED_PWD]]" +}