diff --git a/build.gradle b/build.gradle index 0942ee02872..1bc720a8770 100644 --- a/build.gradle +++ b/build.gradle @@ -365,7 +365,7 @@ dependencies { implementation group: 'com.mchange', name: 'c3p0', version: '0.10.1' implementation group: 'org.flywaydb', name: 'flyway-core', version: '9.22.3' - implementation group: 'com.github.hmcts', name: 'sscs-common', version: '5.12.29' + implementation group: 'com.github.hmcts', name: 'sscs-common', version: 'SSCSCI-1456-SNAPSHOT' implementation group: 'com.github.hmcts', name: 'sscs-pdf-email-common', version: '5.2.25' implementation group: 'com.azure', name: 'azure-core', version: '1.46.0' diff --git a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json index 257487cc000..8b096d8f25f 100644 --- a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json +++ b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json @@ -1662,6 +1662,22 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"} diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json new file mode 100644 index 00000000000..be786e2bc9b --- /dev/null +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -0,0 +1,397 @@ +[ + { + "CaseEventID": "directionIssued", + "CaseFieldID": "prePostHearing", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "directionTypeDl", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 2, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "confidentialityType", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 3, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "LiveFrom": "06/10/2022", + "CaseEventID": "directionIssued", + "CaseFieldID": "hearingRoute", + "CaseTypeID": "Benefit", + "DisplayContext": "READONLY", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasRepresentative", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherPartyRep", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherPartyAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherParties", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasJointParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "selectPartiesDirectionsNotice", + "CaseTypeID": "Benefit", + "DisplayContext": "READONLY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 3, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToFTA", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 4, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToRepresentative", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasRepresentative = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 5, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherPartyRep", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyRep = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 6, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherPartyAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyAppointee = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 7, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherParties = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 8, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToJointParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasJointParty = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 9, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToAppellantOrAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 10, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "directionDueDate", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "directionTypeDl!=\"refuseExtension\" AND directionTypeDl!=\"refuseHearingRecordingRequest\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 11, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "LiveFrom": "06/10/2022", + "CaseEventID": "directionIssued", + "CaseFieldID": "tribunalDirectPoToAttend", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "hearingRoute=\"listAssist\"", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 12, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "reservedToJudgeInterloc", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 13, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "createdInGapsFrom", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "bodyContent=\"doNotUse\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 14, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "documentSentToDwp", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "createdInGapsFrom!=\"readyToList\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 15, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "extensionNextEventDl", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "directionTypeDl=\"refuseExtension\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 16, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "generateNotice", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 17, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "sscsInterlocDirectionDocument", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "generateNotice=\"No\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 18, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "bodyContent", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 19, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "signedBy", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 20, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "signedRole", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 21, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "dateAdded", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 22, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "selectNextHmcHearingType", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 23, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hmcHearingType", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 2, + "PageFieldDisplayOrder": 24, + "PageID": "2.0", + "PageLabel": "Issue direction", + "PageShowCondition": "selectNextHmcHearingType=\"Yes\"", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "previewDocument", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 3, + "PageFieldDisplayOrder": 25, + "PageID": "3.0", + "PageLabel": "Issue direction", + "PageShowCondition": "generateNotice=\"Yes\"" + } +] diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json index 34a81427687..c2cbdd79f67 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json @@ -1685,376 +1685,6 @@ "PageID": "previewDecisionNotice", "PageLabel": "Preview Decision Notice" }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "prePostHearing", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 1, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "directionTypeDl", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 2, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "confidentialityType", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 3, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "LiveFrom": "06/10/2022", - "CaseEventID": "directionIssued", - "CaseFieldID": "hearingRoute", - "CaseTypeID": "Benefit", - "DisplayContext": "READONLY", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasRepresentative", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherPartyRep", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherPartyAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherParties", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasJointParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "selectPartiesDirectionsNotice", - "CaseTypeID": "Benefit", - "DisplayContext": "READONLY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 3, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToFTA", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 4, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToRepresentative", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasRepresentative = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 5, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherPartyRep", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyRep = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 6, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherPartyAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyAppointee = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 7, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherParties = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 8, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToJointParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasJointParty = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 9, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToAppellantOrAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 10, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "directionDueDate", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "directionTypeDl!=\"refuseExtension\" AND directionTypeDl!=\"refuseHearingRecordingRequest\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 11, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "LiveFrom": "06/10/2022", - "CaseEventID": "directionIssued", - "CaseFieldID": "tribunalDirectPoToAttend", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "hearingRoute=\"listAssist\"", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 12, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "reservedToJudgeInterloc", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 13, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "createdInGapsFrom", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "bodyContent=\"doNotUse\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 14, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "documentSentToDwp", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "createdInGapsFrom!=\"readyToList\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 15, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "extensionNextEventDl", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "directionTypeDl=\"refuseExtension\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 16, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "generateNotice", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 17, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "sscsInterlocDirectionDocument", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "generateNotice=\"No\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 18, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "bodyContent", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 19, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "signedBy", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 20, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "signedRole", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 21, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "dateAdded", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 22, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "previewDocument", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 2, - "PageFieldDisplayOrder": 23, - "PageID": "2.0", - "PageLabel": "Issue direction", - "PageShowCondition": "generateNotice=\"Yes\"" - }, { "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", "CaseEventID": "decisionIssued", diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index 66cbf7915f0..24f1ea55887 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -522,5 +522,7 @@ {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "ignoreCallbackWarnings", "Label": "Ignore callback warnings", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomes", "Label": "Hearing Outcomes", "FieldType": "Collection", "FieldTypeParameter": "hearingOutcomeDetails", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextHmcHearingType", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "hmcHearingType", "Label": "Next hearing type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_hmcHearingType", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "completedHearingsList", "Label": "Completed Hearings", "FieldType": "Collection", "FieldTypeParameter": "hearingDetails", "SecurityClassification": "PUBLIC"} ] diff --git a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json index 8f7c41b841b..39ef621eaa0 100644 --- a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json +++ b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json @@ -286,6 +286,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 16, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-clerk", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -304,6 +305,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 16, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 17, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-registrar", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -321,6 +323,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 16, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-superuser", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 2}, @@ -339,6 +342,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 16}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 17, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 18, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "languagePreferenceWelsh", "TabFieldDisplayOrder": 1, "TabShowCondition": "languagePreferenceWelsh=\"Yes\""}, diff --git a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json index a0ad9c76e2a..1e0d614efd1 100644 --- a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json +++ b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json @@ -15,6 +15,7 @@ {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "signLanguageType", "FieldType": "Text", "ElementLabel": "Sign languages", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "hearingRoute", "FieldType": "FixedList", "FieldTypeParameter": "FL_hearingRoute", "ElementLabel": "Hearing Route", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "agreeLessNotice", "FieldType": "YesOrNo", "ElementLabel": "Agree less notice of hearing availability", "FieldShowCondition": "wantsToAttend=\"Yes\"", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "hmcHearingType", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_hmcHearingType", "ElementLabel": "Hearing Type", "FieldShowCondition": "hmcHearingType=\"*\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeTelephone", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type telephone", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "hearingTelephoneNumber", "FieldType": "Text", "ElementLabel": "Hearing telephone number", "FieldShowCondition": "wantsHearingTypeTelephone=\"Yes\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeVideo", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type video", "SecurityClassification": "PUBLIC"}, diff --git a/definitions/benefit/sheets/FixedLists/FixedLists.json b/definitions/benefit/sheets/FixedLists/FixedLists.json index 1f4658f493e..49030fa0d18 100644 --- a/definitions/benefit/sheets/FixedLists/FixedLists.json +++ b/definitions/benefit/sheets/FixedLists/FixedLists.json @@ -916,5 +916,7 @@ {"LiveFrom": "05/05/2023", "ID": "FL_dwpStates", "ListElementCode": "decisionRemade", "ListElement": "Review Decision"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remade", "ListElement": "Remade"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "refused", "ListElement": "Refused"}, - {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"} + {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"}, + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "BBA3-SUB", "ListElement": "Substantive"}, + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "BBA3-DIR", "ListElement": "Direction"} ] diff --git a/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java b/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java index c6e5aa22456..515795c9f68 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java @@ -10,7 +10,6 @@ import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_TYPE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.DayOfWeekUnavailabilityType.AM; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.DayOfWeekUnavailabilityType.PM; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.LocationType.COURT; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.PartyType.INDIVIDUAL; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.RequirementType.EXCLUDE; @@ -31,6 +30,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.hmc.reference.Adjustment; import uk.gov.hmcts.reform.sscs.model.single.hearing.*; @@ -148,7 +148,7 @@ protected static RequestDetails requestDetails() { protected static HearingDetails hearingDetails() { HearingDetails hearingDetails = new HearingDetails(); hearingDetails.setAutolistFlag(true); - hearingDetails.setHearingType(SUBSTANTIVE); + hearingDetails.setHearingType(HmcHearingType.SUBSTANTIVE); hearingDetails.setHearingWindow(hearingWindow()); hearingDetails.setDuration(1); hearingDetails.setNonStandardHearingDurationReasons(Arrays.asList("First reason", "Second reason")); diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index b8bb708c07b..3a1d508b372 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -46,16 +46,18 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, final CaseDetails caseDetails = callback.getCaseDetails(); final SscsCaseData sscsCaseData = caseDetails.getCaseData(); - setDirectionTypeDropDown(sscsCaseData); setExtensionNextEventDropdown(callback.getCaseDetails().getState(), sscsCaseData); - if (isPostHearingsEnabled) { sscsCaseData.setPrePostHearing(null); } clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); + if (callbackType.equals(CallbackType.ABOUT_TO_START)) { + sscsCaseData.setSelectNextHmcHearingType(NO); + sscsCaseData.setHmcHearingType(null); + } return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index d9b2dd03790..cc03ef29956 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -7,6 +7,7 @@ import static uk.gov.hmcts.reform.sscs.ccd.domain.InterlocReviewState.*; import static uk.gov.hmcts.reform.sscs.ccd.domain.State.READY_TO_LIST; import static uk.gov.hmcts.reform.sscs.ccd.domain.State.VALID_APPEAL; +import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isNoOrNull; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isYes; import static uk.gov.hmcts.reform.sscs.helper.SscsHelper.getPreValidStates; import static uk.gov.hmcts.reform.sscs.util.DocumentUtil.isFileAPdf; @@ -73,7 +74,18 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, SscsDocumentTranslationStatus documentTranslationStatus = caseData.isLanguagePreferenceWelsh() && callback.getEvent() == EventType.DIRECTION_ISSUED ? SscsDocumentTranslationStatus.TRANSLATION_REQUIRED : null; log.info("DocumentTranslationStatus is {}, for case id : {}", documentTranslationStatus, caseData.getCcdCaseId()); - + YesNo selectNextHmcHearingType = caseData.getSelectNextHmcHearingType(); + if (isNoOrNull(selectNextHmcHearingType)) { + if (caseData.getAppeal().getHearingOptions() != null) { + caseData.getAppeal().getHearingOptions().setHmcHearingType(null); + } + } else { + HearingOptions.HearingOptionsBuilder builder = caseData.getAppeal().getHearingOptions() != null + ? caseData.getAppeal().getHearingOptions().toBuilder() : HearingOptions.builder(); + caseData.getAppeal() + .setHearingOptions(builder.hmcHearingType(caseData.getHmcHearingType()) + .build()); + } return validateDirectionType(caseData) .or(() -> validateDirectionDueDate(caseData)) .orElseGet(() -> validateForPdfAndCreateCallbackResponse(callback, caseDetails, caseData, documentTranslationStatus)); diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java index 27108e6677d..49f05c91834 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java @@ -4,7 +4,6 @@ import static org.apache.commons.lang3.ObjectUtils.isNotEmpty; import static org.apache.commons.lang3.StringUtils.isNotBlank; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isYes; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingPriority.STANDARD; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingPriority.URGENT; @@ -19,13 +18,13 @@ import uk.gov.hmcts.reform.sscs.ccd.domain.Appeal; import uk.gov.hmcts.reform.sscs.ccd.domain.CcdValue; import uk.gov.hmcts.reform.sscs.ccd.domain.Entity; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.ccd.domain.OtherParty; import uk.gov.hmcts.reform.sscs.ccd.domain.Party; import uk.gov.hmcts.reform.sscs.ccd.domain.SscsCaseData; import uk.gov.hmcts.reform.sscs.exception.ListingException; import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.HearingWrapper; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingDetails; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingWindow; import uk.gov.hmcts.reform.sscs.model.single.hearing.PanelRequirements; @@ -57,7 +56,7 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen // build hearing details to be used in payload for hmc create / update hearing requests return HearingDetails.builder() .autolistFlag(autoListed) - .hearingType(getHearingType()) + .hearingType(getHearingType(caseData)) .hearingWindow(window) .duration(duration) .nonStandardHearingDurationReasons(nonStandardDurationReasons) @@ -77,8 +76,9 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen .build(); } - public static HearingType getHearingType() { - return SUBSTANTIVE; + public static HmcHearingType getHearingType(SscsCaseData sscsCaseData) { + return sscsCaseData.getHmcHearingType() != null + ? sscsCaseData.getHmcHearingType() : HmcHearingType.SUBSTANTIVE; } public static boolean isCaseUrgent(@Valid SscsCaseData caseData) { diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java index 9a48fdee9ad..82554fa11db 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java @@ -35,7 +35,7 @@ public static ServiceHearingValues mapServiceHearingValues(@Valid SscsCaseData c .caseSlaStartDate(HearingsCaseMapping.getCaseCreated(caseData)) .hmctsInternalCaseName(HearingsCaseMapping.getInternalCaseName(caseData)) .autoListFlag(shouldBeAutoListed) - .hearingType(HearingsDetailsMapping.getHearingType()) + .hearingType(HearingsDetailsMapping.getHearingType(caseData)) .caseType(BENEFIT) .caseCategories(HearingsCaseMapping.buildCaseCategories(caseData, refData)) .hearingWindow(HearingsWindowMapping.buildHearingWindow(caseData, refData)) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java deleted file mode 100644 index 17be081ab41..00000000000 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java +++ /dev/null @@ -1,18 +0,0 @@ -package uk.gov.hmcts.reform.sscs.model.hmc.reference; - -import com.fasterxml.jackson.annotation.JsonValue; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -@Getter -@RequiredArgsConstructor -public enum HearingType { - SUBSTANTIVE("BBA3-SUB", "Substantive", null), - DIRECTION_HEARINGS("BBA3-DIR", "Direction Hearings", null), - CHAMBERS_OUTCOME("BBA3-CHA", "Chambers Outcome", null); - - @JsonValue - private final String hmcReference; - private final String valueEn; - private final String valueCy; -} diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java index 2f2a02dc472..7f14a5d9ddf 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java @@ -7,8 +7,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.CaseCategory; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingWindow; import uk.gov.hmcts.reform.sscs.model.single.hearing.PanelRequirements; @@ -42,7 +42,7 @@ public class ServiceHearingValues { private boolean autoListFlag; - private HearingType hearingType; + private HmcHearingType hearingType; private String caseType; diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java index e9531623713..34b5d2a42f1 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java @@ -7,8 +7,8 @@ import lombok.Data; import lombok.NoArgsConstructor; import uk.gov.hmcts.reform.sscs.ccd.domain.AmendReason; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel; @Data @@ -21,7 +21,7 @@ public class HearingDetails { private boolean autolistFlag; - private HearingType hearingType; + private HmcHearingType hearingType; private HearingWindow hearingWindow; diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index bce7fe78b00..5ee30a9ec26 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -5,6 +5,7 @@ import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.openMocks; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.ABOUT_TO_START; +import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.MID_EVENT; import static uk.gov.hmcts.reform.sscs.ccd.domain.DirectionType.*; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.NO; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.YES; @@ -83,6 +84,8 @@ public void givenValidAppeal_populateExtensionNextEventDropdown() { DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertNull(response.getData().getHmcHearingType()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); } @Test @@ -395,4 +398,50 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { assertEquals(YES, sscsCaseData.getHasOtherParties()); assertEquals(NO, sscsCaseData.getHasJointParty()); } + + @Test + public void givenNonDefaultSelectHmcHearingTypeNo_whenValueAboutToStart() { + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + sscsCaseData.setSelectNextHmcHearingType(YES); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); + } + + @Test + public void givenNullSelectHmcHearingTypeNo_whenNullAboutToStart() { + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + sscsCaseData.setSelectNextHmcHearingType(null); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); + } + + @Test + public void givenMidEvent_ThenDoesNotWipeHmcHearingTypeOrSelect() { + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(HmcHearingType.DIRECTION_HEARINGS); + PreSubmitCallbackResponse response = handler.handle(MID_EVENT, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(HmcHearingType.DIRECTION_HEARINGS, response.getData().getHmcHearingType()); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index aad2f3210f4..e45375e1466 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -1,12 +1,14 @@ package uk.gov.hmcts.reform.sscs.ccd.presubmit.directionissued; import static java.util.Collections.emptySet; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; +import static org.mockito.MockitoAnnotations.openMocks; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.ABOUT_TO_SUBMIT; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.MID_EVENT; import static uk.gov.hmcts.reform.sscs.ccd.domain.DwpState.DIRECTION_ACTION_REQUIRED; @@ -22,15 +24,14 @@ import java.util.List; import java.util.Optional; import java.util.Set; -import junitparams.JUnitParamsRunner; -import junitparams.Parameters; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.EnumSource; +import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; import uk.gov.hmcts.reform.sscs.ccd.callback.Callback; import uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType; import uk.gov.hmcts.reform.sscs.ccd.callback.DocumentType; @@ -43,16 +44,12 @@ import uk.gov.hmcts.reform.sscs.service.FooterService; import uk.gov.hmcts.reform.sscs.service.ServiceRequestExecutor; -@RunWith(JUnitParamsRunner.class) -public class DirectionIssuedAboutToSubmitHandlerTest { +class DirectionIssuedAboutToSubmitHandlerTest { private static final String USER_AUTHORISATION = "Bearer token"; private static final String DOCUMENT_URL = "dm-store/documents/123"; private static final String DOCUMENT_URL2 = "dm-store/documents/456"; private static final String DUMMY_REGIONAL_CENTER = "dummyRegionalCenter"; - @Rule - public MockitoRule rule = MockitoJUnit.rule(); - @Mock private FooterService footerService; @@ -82,8 +79,9 @@ public class DirectionIssuedAboutToSubmitHandlerTest { @Mock private PreSubmitCallbackResponse mockedResponse; - @Before + @BeforeEach public void setUp() { + openMocks(this); handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, false); when(callback.getEvent()).thenReturn(EventType.DIRECTION_ISSUED); @@ -135,33 +133,33 @@ public void setUp() { when(dwpAddressLookupService.getDefaultDwpMappingByBenefitType(anyString())).thenReturn(Optional.of(OfficeMapping.builder().isDefault(true).mapping(Mapping.builder().ccd("DWP PIP (1)").build()).build())); } - @Test - @Parameters({"APPEAL_RECEIVED", "ACTION_FURTHER_EVIDENCE"}) - public void givenANonHandleEvidenceEvent_thenReturnFalse(EventType eventType) { + @ParameterizedTest + @EnumSource(value = EventType.class, names = {"APPEAL_RECEIVED", "ACTION_FURTHER_EVIDENCE"}) + void givenANonHandleEvidenceEvent_thenReturnFalse(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertFalse(handler.canHandle(MID_EVENT, callback)); } - @Test - @Parameters({"DIRECTION_ISSUED", "DIRECTION_ISSUED_WELSH"}) - public void givenAValidHandleAndEventType_thenReturnTrue(EventType eventType) { + @ParameterizedTest + @EnumSource(value = EventType.class, names = {"DIRECTION_ISSUED", "DIRECTION_ISSUED_WELSH"}) + void givenAValidHandleAndEventType_thenReturnTrue(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertTrue(handler.canHandle(ABOUT_TO_SUBMIT, callback)); } - @Test - @Parameters({"ABOUT_TO_START", "MID_EVENT", "SUBMITTED"}) - public void givenANonCallbackType_thenReturnFalse(CallbackType callbackType) { + @ParameterizedTest + @EnumSource(value = CallbackType.class, names = {"ABOUT_TO_START", "MID_EVENT", "SUBMITTED"}) + void givenANonCallbackType_thenReturnFalse(CallbackType callbackType) { assertFalse(handler.canHandle(callbackType, callback)); } @Test - public void givenGenerateNoticeIsYes_thenReturnTrue() { + void givenGenerateNoticeIsYes_thenReturnTrue() { assertTrue(handler.canHandle(ABOUT_TO_SUBMIT, callback)); } @Test - public void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { + void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertNull(response.getData().getDocumentStaging().getPreviewDocument()); @@ -176,7 +174,7 @@ public void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { } @Test - public void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_thenIssueTheNewDocumentWithFooter() { + void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_thenIssueTheNewDocumentWithFooter() { handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, true); sscsCaseData.setPrePostHearing(PrePostHearing.PRE); sscsCaseData.getDocumentStaging().setPreviewDocument(null); @@ -204,13 +202,14 @@ public void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_the verify(footerService).createFooterAndAddDocToCase(eq(theDocument.getDocumentLink()), any(), eq(DocumentType.DIRECTION_NOTICE), any(), eq(theDocument.getDocumentDateAdded()), eq(null), eq(null)); } - public void willSetTheWithDwpStateToDirectionActionRequired() { + @Test + void willSetTheWithDwpStateToDirectionActionRequired() { final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getDwpState(), is(DIRECTION_ACTION_REQUIRED)); + assertEquals(DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } @Test - public void givenDirectionTypeIsNull_displayAnError() { + void givenDirectionTypeIsNull_displayAnError() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(null); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -220,7 +219,7 @@ public void givenDirectionTypeIsNull_displayAnError() { } @SuppressWarnings({"Indentation", "unused"}) - private Object[] getDirectionNoticeConfidentialMembers() { + private static Object[] getDirectionNoticeConfidentialMembers() { return new Object[]{ new Object[]{ConfidentialityType.GENERAL.getCode(), false, DIRECTION_ACTION_REQUIRED}, new Object[]{ConfidentialityType.CONFIDENTIAL.getCode(), true, DIRECTION_ACTION_REQUIRED}, @@ -231,20 +230,20 @@ private Object[] getDirectionNoticeConfidentialMembers() { }; } - @Test - @Parameters(method = "getDirectionNoticeConfidentialMembers") - public void givenDirectionNoticeCheckFtaStateBasedOnConfidentiality(String confidentialityType, boolean isFtaChosen, DwpState newFtaState) { + @ParameterizedTest + @MethodSource("getDirectionNoticeConfidentialMembers") + void givenDirectionNoticeCheckFtaStateBasedOnConfidentiality(String confidentialityType, boolean isFtaChosen, DwpState newFtaState) { SscsCaseData caseData = callback.getCaseDetails().getCaseData(); caseData.setConfidentialityType(confidentialityType); caseData.setSendDirectionNoticeToFTA(isFtaChosen ? YES : NO); caseData.setDirectionDueDate(LocalDate.now().toString()); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getDwpState(), is(newFtaState)); + assertEquals(newFtaState, response.getData().getDwpState()); } @Test - public void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInformationAndDirectionTypeIsNull() { + void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInformationAndDirectionTypeIsNull() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.PROVIDE_INFORMATION.toString())); sscsCaseData.setDirectionDueDate("11/07/2025"); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -253,7 +252,7 @@ public void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInf } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INTERLOCUTORY_REVIEW_STATE); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -265,7 +264,7 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInte } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNotReturnValidationErrorsFromExternalService() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNotReturnValidationErrorsFromExternalService() { String errorMessage = "There was an error in the external service"; when(mockedResponse.getErrors()).thenReturn(Set.of(errorMessage)); callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); @@ -276,7 +275,7 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNot } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetailsBefore.getState()).thenReturn(State.WITH_DWP); when(caseDetails.getState()).thenReturn(State.WITH_DWP); @@ -285,12 +284,12 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInt assertNull(response.getData().getInterlocReviewState()); assertNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().dwpIssuingOffice("DWP PIP (1)").build()); @@ -302,32 +301,32 @@ public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(Strin assertEquals(AWAITING_ADMIN_ACTION, response.getData().getInterlocReviewState()); assertNotNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(response.getData().getDwpDueDate(), LocalDate.now().plusDays(expectedResponseDays).toString()); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); assertEquals(DUMMY_REGIONAL_CENTER, response.getData().getDwpRegionalCentre()); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().build()); assertDefaultRegionalCentre(expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().dwpIssuingOffice("").build()); assertDefaultRegionalCentre(expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenNoMrnDetails_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfAppealToProceedWhenNoMrnDetails_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(null); @@ -343,23 +342,23 @@ private void assertDefaultRegionalCentre(int expectedResponseDays) { assertEquals(AWAITING_ADMIN_ACTION, response.getData().getInterlocReviewState()); assertNotNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(response.getData().getDwpDueDate(), LocalDate.now().plusDays(expectedResponseDays).toString()); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); assertEquals(DUMMY_REGIONAL_CENTER, response.getData().getDwpRegionalCentre()); } @Test - public void givenDirectionTypeOfGrantExtension_setDwpStateAndDirectionTypeIsNotSet() { + void givenDirectionTypeOfGrantExtension_setDwpStateAndDirectionTypeIsNotSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.GRANT_EXTENSION.toString())); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertNull(response.getData().getInterlocReviewState()); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_LISTING.toString())); @@ -371,9 +370,9 @@ public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToList assertValues(response, AWAITING_ADMIN_ACTION, DIRECTION_ACTION_REQUIRED, State.RESPONSE_RECEIVED, expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -384,7 +383,7 @@ public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToVali } @Test - public void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState() { + void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -403,7 +402,7 @@ public void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState( } @Test - public void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { + void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.INTERLOCUTORY_REVIEW_STATE); @@ -421,7 +420,7 @@ public void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { } @Test - public void givenDirectionTypeOfRefuseReinstatementkeepState() { + void givenDirectionTypeOfRefuseReinstatementkeepState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -439,7 +438,7 @@ public void givenDirectionTypeOfRefuseReinstatementkeepState() { } @Test - public void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { + void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -460,7 +459,7 @@ public void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { } @Test - public void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() { + void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -481,7 +480,7 @@ public void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() } @Test - public void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { + void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.INTERLOCUTORY_REVIEW_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.DORMANT_APPEAL_STATE); @@ -499,7 +498,7 @@ public void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { } @Test - public void givenDirectionTypeOfRefuseUrgentHearingkeepState() { + void givenDirectionTypeOfRefuseUrgentHearingkeepState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -519,7 +518,7 @@ public void givenDirectionTypeOfRefuseUrgentHearingkeepState() { } @Test - public void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewStateAndInterlocReferralReason() { + void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewStateAndInterlocReferralReason() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setReinstatementOutcome(RequestOutcome.IN_PROGRESS); @@ -535,7 +534,7 @@ public void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewS } @Test - public void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() { + void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setReinstatementOutcome(RequestOutcome.IN_PROGRESS); callback.getCaseDetails().getCaseData().setDwpState(DwpState.LAPSED); @@ -549,9 +548,9 @@ public void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() assertEquals(DIRECTION_ACTION_REQUIRED, res.getData().getDwpState()); } - @Test - @Parameters({"file.png", "file.jpg", "file.doc"}) - public void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String filename) { + @ParameterizedTest + @ValueSource(strings = {"file.png", "file.jpg", "file.doc"}) + void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String filename) { sscsCaseData.getDocumentStaging().setPreviewDocument(null); SscsInterlocDirectionDocument theDocument = SscsInterlocDirectionDocument.builder() @@ -570,7 +569,7 @@ public void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String f } @Test - public void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { + void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { sscsCaseData.getDocumentStaging().setPreviewDocument(null); sscsCaseData.setSscsInterlocDirectionDocument(null); @@ -584,7 +583,7 @@ public void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { } @Test - public void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { + void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { sscsCaseData.setDirectionDueDate(null); sscsCaseData.getDirectionTypeDl().setValue(new DynamicListItem(DirectionType.PROVIDE_INFORMATION.toString(), "appeal To Proceed")); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -594,7 +593,7 @@ public void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { } @Test - public void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorrectly() { + void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorrectly() { when(caseDetailsBefore.getState()).thenReturn(State.WITH_DWP); sscsCaseData.setLanguagePreferenceWelsh("Yes"); callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); @@ -616,7 +615,7 @@ public void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorre } @Test - public void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { + void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { expectedWelshDocument = SscsWelshDocument.builder() .value(SscsWelshDocumentDetails.builder() @@ -642,9 +641,9 @@ public void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { verifyNoInteractions(footerService); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_LISTING.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -657,9 +656,9 @@ public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendT assertValues(response, AWAITING_ADMIN_ACTION, DIRECTION_ACTION_REQUIRED, State.RESPONSE_RECEIVED, expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) - public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) + void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -673,29 +672,29 @@ public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendT } @Test - public void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNonDigitalToDigitalCase() { + void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNonDigitalToDigitalCase() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INTERLOCUTORY_REVIEW_STATE); sscsCaseData.setCreatedInGapsFrom(null); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getCreatedInGapsFrom(), is(READY_TO_LIST.getId())); + assertEquals(response.getData().getCreatedInGapsFrom(), READY_TO_LIST.getId()); } @Test - public void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNoDigitalToDigitalCase() { + void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNoDigitalToDigitalCase() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INCOMPLETE_APPLICATION); sscsCaseData.setCreatedInGapsFrom(VALID_APPEAL.getId()); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getCreatedInGapsFrom(), is(READY_TO_LIST.getId())); + assertEquals(response.getData().getCreatedInGapsFrom(), READY_TO_LIST.getId()); } @Test - public void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { + void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { sscsCaseData.setInterlocReferralReason(InterlocReferralReason.REVIEW_CORRECTION_APPLICATION); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -704,7 +703,7 @@ public void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { } @Test - public void shouldClearInterlocReferralReason() { + void shouldClearInterlocReferralReason() { handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, true); sscsCaseData.setInterlocReferralReason(InterlocReferralReason.REVIEW_CORRECTION_APPLICATION); @@ -716,25 +715,25 @@ public void shouldClearInterlocReferralReason() { private void assertValues(PreSubmitCallbackResponse response, InterlocReviewState interlocReviewState, DwpState dwpState, State state, int expectedResponseDays) { assertEquals(interlocReviewState, response.getData().getInterlocReviewState()); - assertThat(response.getData().getDwpState(), is(dwpState)); - assertThat(response.getData().getState(), is(state)); - assertThat(response.getData().getHmctsDwpState(), is("sentToDwp")); - assertThat(response.getData().getDateSentToDwp(), is(LocalDate.now().toString())); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); + assertEquals(dwpState, response.getData().getDwpState()); + assertEquals(state, response.getData().getState()); + assertEquals("sentToDwp", response.getData().getHmctsDwpState()); + assertEquals(LocalDate.now().toString(), response.getData().getDateSentToDwp()); + assertEquals(LocalDate.now().plusDays(expectedResponseDays).toString(), response.getData().getDwpDueDate()); } @Test - public void givenNoUploadedAndGeneratedDoc_thenReturnError() { + void givenNoUploadedAndGeneratedDoc_thenReturnError() { sscsCaseData.getDocumentGeneration().setGenerateNotice(NO); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertFalse(response.getErrors().isEmpty()); - assertThat(response.getErrors(), hasItem("You need to upload a PDF document")); + assertTrue(response.getErrors().contains("You need to upload a PDF document")); } @Test - public void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { + void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { DocumentLink url = sscsCaseData.getDocumentStaging().getPreviewDocument(); handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -743,7 +742,7 @@ public void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { } @Test - public void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnRelevantDocLink() { + void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnRelevantDocLink() { sscsCaseData.getDocumentGeneration().setGenerateNotice(NO); assertFalse(sscsCaseData.getDocumentGeneration().getGenerateNotice().toBoolean()); @@ -763,7 +762,8 @@ public void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnReleva assertEquals(interlocDoc.getDocumentLink(), response.getData().getSscsInterlocDirectionDocument().getDocumentLink()); } - public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { + @Test + void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { assertTrue(sscsCaseData.getDocumentGeneration().getGenerateNotice().toBoolean()); SscsInterlocDirectionDocument interlocDoc = SscsInterlocDirectionDocument.builder() @@ -781,4 +781,53 @@ public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull( assertNull(response.getData().getSscsInterlocDirectionDocument()); } + + @Test + void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNull() { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextHmcHearingType(null); + sscsCaseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertNull(response.getData().getSelectNextHmcHearingType()); + } + + @Test + void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNo() { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextHmcHearingType(NO); + sscsCaseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); + sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().hmcHearingType(HmcHearingType.SUBSTANTIVE).build()); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getAppeal().getHearingOptions().getHmcHearingType()); + } + + @ParameterizedTest + @EnumSource(value = HmcHearingType.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(HmcHearingType hmcHearingType) { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(hmcHearingType); + sscsCaseData.getAppeal().setHearingOptions(null); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getAppeal().getHearingOptions().getHmcHearingType()); + assertEquals(HearingOptions.builder().hmcHearingType(hmcHearingType).build(), response.getData().getAppeal().getHearingOptions()); + } + + @ParameterizedTest + @EnumSource(value = HmcHearingType.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(HmcHearingType hmcHearingType) { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(hmcHearingType); + sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().agreeLessNotice("string").build()); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getAppeal().getHearingOptions().getHmcHearingType()); + HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").hmcHearingType(hmcHearingType).build(); + assertEquals(expectedHearingOptions, response.getData().getAppeal().getHearingOptions()); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java index 3a4d17d96a3..371cd757a94 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java @@ -15,7 +15,6 @@ import static org.mockito.BDDMockito.given; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SAME_VENUE; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SOMEWHERE_ELSE; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.LocationType.COURT; import java.util.ArrayList; @@ -37,7 +36,6 @@ import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.HearingWrapper; import uk.gov.hmcts.reform.sscs.model.VenueDetails; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingDetails; import uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel; import uk.gov.hmcts.reform.sscs.reference.data.model.SessionCategoryMap; @@ -223,12 +221,30 @@ void testIsCaseLinkedNull() { assertThat(result).isFalse(); } - @DisplayName("Hearing type should be substantive.") + @DisplayName("Hearing type should be substantive if hmcHearingType is null.") @Test - void getHearingType() { - HearingType result = HearingsDetailsMapping.getHearingType(); + void getHearingTypeNull() { + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); - assertThat(result).isEqualTo(SUBSTANTIVE); + assertThat(result).isEqualTo(HmcHearingType.SUBSTANTIVE); + } + + @DisplayName("Hearing type should be substantive if hmcHearingType is substantive.") + @Test + void getHearingTypeSubstantive() { + caseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); + + assertThat(result).isEqualTo(HmcHearingType.SUBSTANTIVE); + } + + @DisplayName("Hearing type should be direction if hmcHearingType is direction.") + @Test + void getHearingTypeDirection() { + caseData.setHmcHearingType(HmcHearingType.DIRECTION_HEARINGS); + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); + + assertThat(result).isEqualTo(HmcHearingType.DIRECTION_HEARINGS); } @DisplayName("When urgentCase is yes, isCaseUrgent return True") diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java index 0a3f30fbf82..13bd3761416 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java @@ -141,7 +141,7 @@ void testBuildHearingWindowResponseBlank() { void testBuildHearingWindowNotAutoListUrgent() { SscsCaseData caseData = SscsCaseData.builder() .dwpResponseDate(LocalDate.now().toString()) - .appeal(new Appeal(null, null, null, new HearingOptions("yes", null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, new HearingSubtype("yes", "07444123456", null, null, null), null)) + .appeal(new Appeal(null, null, null, new HearingOptions("yes", null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, new HearingSubtype("yes", "07444123456", null, null, null), null)) .build(); HearingWindow result = HearingsWindowMapping.buildHearingWindow(caseData, refData); diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java index 030dbef90a5..523c41c8702 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java @@ -10,7 +10,6 @@ import static uk.gov.hmcts.reform.sscs.helper.mapping.HearingsWindowMapping.DAYS_TO_ADD_HEARING_WINDOW_TODAY; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_SUBTYPE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_TYPE; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.PartyType.INDIVIDUAL; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel.FACE_TO_FACE; @@ -188,7 +187,7 @@ void shouldMapServiceHearingValuesSuccessfully() throws ListingException { //then assertFalse(serviceHearingValues.isAutoListFlag()); assertEquals(60, serviceHearingValues.getDuration()); - assertEquals(SUBSTANTIVE, serviceHearingValues.getHearingType()); + assertEquals(HmcHearingType.SUBSTANTIVE, serviceHearingValues.getHearingType()); assertEquals(BENEFIT, serviceHearingValues.getCaseType()); assertThat(serviceHearingValues.getCaseCategories()) .extracting("categoryType","categoryValue")