Skip to content

Commit

Permalink
Merge pull request #107 from hmcts/RIA-7636
Browse files Browse the repository at this point in the history
RIA-7636 - WA task to review interpreter details when case is auto updated or cancelled
  • Loading branch information
rajeshthuraiyur authored Dec 27, 2023
2 parents 2600b4a + 369bd10 commit 0919f97
Show file tree
Hide file tree
Showing 12 changed files with 1,439 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"enabledManagers": ["helm-requirements","gradle-wrapper"],
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["local>hmcts/.github:renovate-config"],
"labels": ["dependencies"],
"helm-requirements":
{
Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
id 'org.owasp.dependencycheck' version '8.0.2'
id 'com.github.ben-manes.versions' version '0.39.0'
id 'org.sonarqube' version '3.2.0'
id 'io.freefair.lombok' version '5.3.0'
id 'io.freefair.lombok' version '6.2.0'
}

group = 'uk.gov.hmcts.reform'
Expand All @@ -23,9 +23,10 @@ lombok {
config['lombok.anyConstructor.addConstructorProperties'] = 'true'
}

allprojects {
sourceCompatibility = '11'
targetCompatibility = '11'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

sourceSets {
Expand Down Expand Up @@ -112,7 +113,7 @@ task smoke(type: Test) {

checkstyle {
maxWarnings = 0
toolVersion = '8.29'
toolVersion = '10.12.0'
getConfigDirectory().set(new File(rootDir, 'config/checkstyle'))
}

Expand All @@ -130,7 +131,7 @@ jacocoTestReport {
reports {
xml.required = true
csv.required = false
xml.destination file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml")
xml.getOutputLocation().set(file("${buildDir}/reports/jacoco/test/jacocoTestReport.xml"))
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"description": "Should create review interpreter details task when case is auto updated or cancelled",
"enabled": true,
"jurisdiction": "IA",
"caseType": "Asylum",
"options": {
"taskRetrievalApi": "task-management-api"
},
"required": {
"credentials": "IALegalRepresentative",
"ccd": [
{
"eventId": "triggerReviewInterpreterBookingTask",
"state": "appealStarted",
"caseData": {
"template": "minimal-appeal-started.json",
"replacements": {
"appealType": "protection",
"homeOfficeDecisionDate": "{$TODAY-14}"
}
}
}
]
},
"test": {
"request": {
"credentials": "IACaseworker",
"input": {
"eventMessages": [
{
"template": "minimal-ccd-event-message.json",
"replacements": {
"EventId": "triggerReviewInterpreterBookingTask",
"AdditionalData": {
"Data": {
"appealType": "protection",
"lastModifiedApplication": {
"type": "Adjourn",
"decision": "Granted"
}
}
}
}
}
]
}
},
"expectations": [
{
"credentials": "IACaseworker",
"status": 200,
"numberOfTasksAvailable": 1,
"taskTypes": ["reviewInterpreters"],
"taskData": {
"template": "minimal-task-response.json",
"replacements": {
"tasks": [
{
"id": "{$VERIFIER-UUID}",
"case_name": "Functional PostDeployment",
"case_id": "{$GENERATED_CASE_ID}",
"case_category": "Protection",
"name": "Review interpreter booking",
"type": "reviewInterpreters",
"task_state": "unassigned",
"task_system": "SELF",
"security_classification": "PUBLIC",
"task_title": "Review interpreter booking",
"created_date": "{$VERIFIER-ZONED_DATETIME_TODAY}",
"due_date": "{$VERIFIER-ZONED_DATETIME_TODAY+0_WORKING_DAYS}",
"execution_type": "Case Management Task",
"jurisdiction": "IA",
"case_type_id": "Asylum",
"region": "1",
"location": "765324",
"location_name": "Taylor House",
"auto_assigned": false,
"warnings": false,
"role_category": "ADMIN",
"warning_list": {
"values": [

]
},
"case_management_category": "Protection",
"work_type_id": "hearing_work",
"permissions": {
"values": [
"Read",
"Own",
"Claim",
"Manage","Unassign","Assign","Complete",
"Execute",
"Cancel"
]
}
}
]
}
},
"numberOfRolesAvailable": 6,
"roleData": {
"roles":[
{
"role_category":"CTSC",
"role_name":"ctsc",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
},
{
"role_category":"CTSC",
"role_name":"ctsc-team-leader",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
},
{
"role_category":"ADMIN",
"role_name":"hearing-centre-admin",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
},
{
"role_category":"LEGAL_OPERATIONS",
"role_name":"senior-tribunal-caseworker",
"permissions":[
"Read",
"Own",
"Manage","Unassign","Assign","Complete",
"Claim",
"Cancel"
],
"authorisations":[
]
},
{
"role_name": "task-supervisor",
"permissions": [
"Read",
"Execute","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations": [
]
},
{
"role_category":"LEGAL_OPERATIONS",
"role_name":"tribunal-caseworker",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
}
]
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"description": "decisionAndReasonsStarted with listCaseHearingCentre should create listTheCase task",
"enabled": true,
"jurisdiction": "IA",
"caseType": "Asylum",
"options": {
"taskRetrievalApi": "task-management-api"
},
"required": {
"credentials": "IALegalRepresentative",
"ccd": [
{
"eventId": "submitAppeal",
"state": "appealStarted",
"caseData": {
"template": "minimal-appeal-started.json",
"replacements": {
"appealType": "refusalOfHumanRights",
"homeOfficeDecisionDate": "{$TODAY-14}"
}
}
}
]
},
"test": {
"request": {
"credentials": "IACaseworker",
"input": {
"eventMessages": [
{
"template": "minimal-ccd-event-message.json",
"replacements": {
"EventId": "decisionAndReasonsStarted",
"NewStateId": "decision",
"AdditionalData": {
"Data": {
"listCaseHearingCentre": "decisionWithoutHearing"
}
}
}
}
]
}
},
"expectations": [
{
"credentials": "CTSCAdmin",
"status": 200,
"numberOfTasksAvailable": 1,
"taskTypes": ["listTheCase"],
"taskData": {
"template": "minimal-task-response.json",
"replacements": {
"tasks": [
{
"id": "{$VERIFIER-UUID}",
"case_name": "Functional PostDeployment",
"case_id": "{$GENERATED_CASE_ID}",
"case_category": "Human rights",
"name": "List the case",
"type": "listTheCase",
"task_state": "unassigned",
"task_system": "SELF",
"security_classification": "PUBLIC",
"task_title": "List the case",
"created_date": "{$VERIFIER-ZONED_DATETIME_TODAY}",
"due_date": "{$VERIFIER-ZONED_DATETIME_TODAY+2_WORKING_DAYS}",
"execution_type": "Case Management Task",
"jurisdiction": "IA",
"case_type_id": "Asylum",
"region": "1",
"location": "765324",
"location_name": "Taylor House",
"auto_assigned": false,
"warnings": false,
"role_category": "CTSC",
"warning_list": {
"values": [

]
},
"case_management_category": "Human rights",
"work_type_id": "hearing_work",
"permissions": {
"values": [
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
]
}
}
]
}
},
"numberOfRolesAvailable": 3,
"roleData": {
"roles":[
{
"role_category":"CTSC",
"role_name":"ctsc",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
},
{
"role_category":"CTSC",
"role_name":"ctsc-team-leader",
"permissions":[
"Read",
"Own","Claim",
"Manage","Unassign","Assign","Complete",
"Cancel"
],
"authorisations":[
]
},
{
"role_name":"task-supervisor",
"permissions":[
"Read",
"Manage","Unassign","Assign","Complete",
"Execute","Claim",
"Cancel"
],
"authorisations":[
]
}
]
}
}
]
}
}
Loading

0 comments on commit 0919f97

Please sign in to comment.