Skip to content

Ccd 6255 ft tests update no c create case not have case role #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 26 commits into
base: CCD-5334_Update_NoC_create_case_not_have_case_role
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6222e7b
fix for if Standard access or not
patelila Apr 3, 2025
3369d38
FT AC01
patelila Apr 3, 2025
5ee07fa
So Individual Functional Tests can be run and fix for not picking up …
patelila Apr 4, 2025
771679d
FT Fix
patelila Apr 7, 2025
143813f
CCD-5334 AC1
patelila Apr 8, 2025
8bca49c
Merge branch 'CCD-5334_Update_NoC_create_case_not_have_case_role' int…
patelila Apr 8, 2025
d075893
use PR-561 (this one) so env.CALLBACK_FTA_ENABLED = "true"
patelila Apr 8, 2025
1922789
Merge remote-tracking branch 'origin/CCD-6255_FT_Tests_Update_NoC_cre…
patelila Apr 8, 2025
3cb5a1b
AC AC02 : NoC is requested by a Solicitor having SPECIFIC access to case
patelila Apr 11, 2025
8c48456
AC AC02 : NoC is requested by a Solicitor having SPECIFIC access to case
patelila Apr 11, 2025
cacd230
AC AC02 : NoC is requested by a Solicitor having SPECIFIC access to case
patelila Apr 11, 2025
a1faccb
AC AC02 : NoC is requested by a Solicitor having SPECIFIC access to case
patelila Apr 11, 2025
bcab020
AC AC02 : NoC is requested by a Solicitor having SPECIFIC access to case
patelila May 6, 2025
d44afde
FIX for original F-206 test, which uses users with Standard access an…
patelila May 7, 2025
ba5b123
Update RequestNoticeOfChangeService.java
patelila May 8, 2025
91616e4
use definition sore pr 1540
patelila May 8, 2025
a231c81
suppressions
patelila May 8, 2025
3a87d63
use PR-1540 for def-store
patelila May 9, 2025
dd0fa8a
Merge branch 'CCD-5334_Update_NoC_create_case_not_have_case_role' int…
patelila May 16, 2025
278b687
add verification
patelila May 16, 2025
9fc0853
add verification
patelila May 16, 2025
df6cdfe
empty commit to trigger build
patelila May 16, 2025
04740fe
FIX F-206 S-206.14 error uk.gov.hmcts.befta.exception.UnconfirmedData…
patelila May 22, 2025
7d85b80
FIX F-206a S-206a.02 error java.lang.NullPointerException: Environmen…
patelila May 22, 2025
fe9102e
FIX F-206a S-206a.02
patelila May 22, 2025
8f03734
add secrets
patelila May 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GradleBuilder builder = new GradleBuilder(this, product)
def definitionStoreDevelopPr = "PR-1540" // This doesn't change frequently, but when it does, only change this value.
def dataStoreApiDevelopPr = "PR-2552" // 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}': [
Expand All @@ -41,7 +41,13 @@ 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'),
secret('ccd-befta-caseworker-caa-pwd', 'CCD_BEFTA_CASEWORKER_CAA_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'),
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -145,19 +142,22 @@ 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
args = [
'--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
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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],


#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand All @@ -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
Expand All @@ -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],


#-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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]"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"_guid_": "GrantAccess_FT_NoCAutoApprovalCaseType_CaseworkerCaa_SPECIFIC__Base",
"_extends_": "CaseUserRoles_Add__PositiveResponse_Base",

"users": {
"invokingUser": {
"_extends_": "BeftaCaseworkerCaa"
},
"caseworker": {
"_extends_": "BeftaMasterCaseworker_Role1Basic"
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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]}"
}
}
}
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"_guid_": "CaseUserRoles_Add__PositiveResponse_Base",
"_extends_": "CaseUserRoles_Add__Base",

"s2sClientId": "aac_manage_case_assignment",

"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"
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}

}
Original file line number Diff line number Diff line change
@@ -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"
}
}

}
Original file line number Diff line number Diff line change
@@ -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"
}
}

}
Loading