Skip to content

Commit

Permalink
CIV-16512 hearing duration minti (#5321)
Browse files Browse the repository at this point in the history
* https://tools.hmcts.net/jira/browse/CIV-16512

New hearing duration for minti claims

* Update values.preview.template.yaml

* "ShowSummaryChangeOption": "Y"

* Update values.preview.template.yaml

* Update values.preview.template.yaml

* update API tests

* temp slip tests

---------

Co-authored-by: drummondjm <[email protected]>
Co-authored-by: Madhan Mahadevan <[email protected]>
Co-authored-by: vasudevganesanhmcts <[email protected]>
  • Loading branch information
4 people authored Feb 5, 2025
1 parent fd2491d commit b07b20b
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,5 +460,14 @@
"CRUD": "R"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "hearingDurationMinti",
"UserRoles": [
"hearing-schedule-access",
"caseworker-civil-solicitor"
],
"CRUD": "CRU"
}
]
59 changes: 59 additions & 0 deletions ccd-definition/CaseEventToFields/HearingNotice-MINTI-nonprod.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,64 @@
"PageDisplayOrder": 2,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "Y"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "channel",
"PageFieldDisplayOrder": 4,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "Y"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "allocatedTrack",
"PageFieldDisplayOrder": 8,
"DisplayContext": "READONLY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"FieldShowCondition" : "hearingNoticeList = \"DO_NOT_SHOW\"",
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "responseClaimTrack",
"PageFieldDisplayOrder": 8,
"DisplayContext": "READONLY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"FieldShowCondition" : "hearingNoticeList = \"DO_NOT_SHOW\"",
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "hearingDuration",
"PageFieldDisplayOrder": 9,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"FieldShowCondition" : "(allocatedTrack = \"SMALL_CLAIM\" OR allocatedTrack = \"FAST_CLAIM\" OR responseClaimTrack = \"SMALL_CLAIM\" OR responseClaimTrack = \"FAST_CLAIM\") OR (hearingNoticeList = \"OTHER\" OR hearingNoticeList = \"SMALL_CLAIMS\")",
"ShowSummaryChangeOption": "Y"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "hearingDurationMinti",
"PageFieldDisplayOrder": 9,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"FieldShowCondition" : "(allocatedTrack = \"MULTI_CLAIM\" OR allocatedTrack = \"INTERMEDIATE_CLAIM\" OR responseClaimTrack = \"MULTI_CLAIM\" OR responseClaimTrack = \"INTERMEDIATE_CLAIM\") AND hearingNoticeList = \"FAST_TRACK_TRIAL\"",
"ShowSummaryChangeOption": "Y"
}
]
22 changes: 22 additions & 0 deletions ccd-definition/CaseEventToFields/HearingNotice-MINTI-prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,27 @@
"PageDisplayOrder": 1,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "channel",
"PageFieldDisplayOrder": 4,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "hearingDuration",
"PageFieldDisplayOrder": 9,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
}
]
22 changes: 0 additions & 22 deletions ccd-definition/CaseEventToFields/HearingNotice.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,6 @@
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "channel",
"PageFieldDisplayOrder": 4,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
Expand Down Expand Up @@ -159,17 +148,6 @@
"ShowSummaryChangeOption": "Y",
"CallBackURLMidEvent": "${CCD_DEF_CASE_SERVICE_BASE_URL}/cases/callbacks/mid/checkFutureDate"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
"CaseFieldID": "hearingDuration",
"PageFieldDisplayOrder": 9,
"DisplayContext": "MANDATORY",
"PageID": "HearingDetails",
"PageDisplayOrder": 4,
"PageColumnNumber": 1,
"ShowSummaryChangeOption": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseEventID": "HEARING_SCHEDULED",
Expand Down
8 changes: 8 additions & 0 deletions ccd-definition/CaseField/CaseField-MINTI-nonprod.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,13 @@
"FieldType": "YesOrNo",
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "hearingDurationMinti",
"Label": "Duration",
"FieldType": "TextArea",
"SecurityClassification": "Public",
"Searchable": "N"
}
]
7 changes: 4 additions & 3 deletions e2e/api/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const data = {
CREATE_SMALL_NO_SUM: (userInput) => sdoTracks.createSDOSmallWODamageSum(userInput),
UNSUITABLE_FOR_SDO: (userInput) => sdoTracks.createNotSuitableSDO(userInput),
CREATE_SMALL_DRH: () => sdoTracks.createSDOSmallDRH(),
HEARING_SCHEDULED: (allocatedTrack) => hearingScheduled.scheduleHearing(allocatedTrack),
HEARING_SCHEDULED: (allocatedTrack, isMinti) => hearingScheduled.scheduleHearing(allocatedTrack, isMinti),
EVIDENCE_UPLOAD_JUDGE: (typeOfNote) => evidenceUploadJudge.upload(typeOfNote),
TRIAL_READINESS: (user) => trialReadiness.confirmTrialReady(user),
EVIDENCE_UPLOAD_APPLICANT_SMALL: (mpScenario) => evidenceUploadApplicant.createApplicantSmallClaimsEvidenceUpload(mpScenario),
Expand Down Expand Up @@ -1201,7 +1201,7 @@ module.exports = {
}
},

scheduleHearing: async (user, allocatedTrack) => {
scheduleHearing: async (user, allocatedTrack, isMinti = false) => {
console.log('Hearing Scheduled for case id ' + caseId);
await apiRequest.setupTokens(user);

Expand All @@ -1210,7 +1210,7 @@ module.exports = {
caseData = await apiRequest.startEvent(eventName, caseId);
delete caseData['SearchCriteria'];

let scheduleData = data.HEARING_SCHEDULED(allocatedTrack);
let scheduleData = data.HEARING_SCHEDULED(allocatedTrack, isMinti);

for (let pageId of Object.keys(scheduleData.valid)) {
await assertValidData(scheduleData, pageId);
Expand Down Expand Up @@ -1531,6 +1531,7 @@ const assertValidData = async (data, pageId, solicitor) => {
if(eventName === 'HEARING_SCHEDULED' && pageId === 'HearingNoticeSelect')
{
responseBody = clearHearingLocationData(responseBody);
responseBody.data.allocatedTrack = caseData.allocatedTrack;
}
if(eventName === 'GENERATE_DIRECTIONS_ORDER') {
responseBody = clearFinalOrderLocationData(responseBody);
Expand Down
6 changes: 3 additions & 3 deletions e2e/api/steps_LRspec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const data = {
DEFAULT_JUDGEMENT_SPEC_2V1: require('../fixtures/events/defaultJudgment2v1Spec.js'),
CREATE_FAST_NO_SUM_SPEC: () => sdoTracks.createSDOFastTrackSpec(),
CREATE_SDO: (userInput) => sdoTracks.createSDOSmallWODamageSumInPerson(userInput),
HEARING_SCHEDULED: (allocatedTrack) => hearingScheduled.scheduleHearing(allocatedTrack),
HEARING_SCHEDULED: (allocatedTrack, isMinti) => hearingScheduled.scheduleHearing(allocatedTrack, isMinti),
FINAL_ORDERS_SPEC: (finalOrdersRequestType, dayPlus0, dayPlus7, dayPlus14, dayPlus21, orderType) => createFinalOrderSpec.requestFinalOrder(finalOrdersRequestType, dayPlus0, dayPlus7, dayPlus14, dayPlus21, orderType),
RECORD_JUDGMENT_SPEC: (whyRecorded, paymentPlanSelection) => judgmentOnline1v1Spec.recordJudgment(whyRecorded, paymentPlanSelection),
CONFIRM_ORDER_REVIEW: () => judgmentOnline1v1Spec.confirmOrderReview(),
Expand Down Expand Up @@ -1381,7 +1381,7 @@ module.exports = {
await waitForFinishedBusinessProcess(caseId);
},

scheduleHearing: async (user, allocatedTrack) => {
scheduleHearing: async (user, allocatedTrack, isMinti = false) => {
console.log('Hearing Scheduled for case id ' + caseId);
await apiRequest.setupTokens(user);

Expand All @@ -1390,7 +1390,7 @@ module.exports = {
caseData = await apiRequest.startEvent(eventName, caseId);
delete caseData['SearchCriteria'];

let scheduleData = data.HEARING_SCHEDULED(allocatedTrack);
let scheduleData = data.HEARING_SCHEDULED(allocatedTrack, isMinti);

for (let pageId of Object.keys(scheduleData.userInput)) {
await assertValidData(scheduleData, pageId);
Expand Down
9 changes: 7 additions & 2 deletions e2e/fixtures/events/scheduleHearing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {date, listElement} = require('../../api/dataHelper');
const config = require('../../config');
module.exports = {
scheduleHearing: (allocatedTrack) => {
scheduleHearing: (allocatedTrack, isMinti) => {
return {
valid: {
HearingNoticeSelect: {
Expand All @@ -21,7 +21,12 @@ module.exports = {
channel: 'IN_PERSON',
hearingDate: date(60),
hearingTimeHourMinute: '1015',
hearingDuration: 'MINUTES_55'
...(!isMinti? {
hearingDuration: 'MINUTES_55'
} : {}),
...(isMinti? {
hearingDurationMinti: 'custom hearing duration'
} : {}),
},
HearingInformation: {
information: 'string'
Expand Down
9 changes: 7 additions & 2 deletions e2e/fixtures/events/specScheduleHearing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const {date, listElement} = require('../../api/dataHelper');
const config = require('../../config');
module.exports = {
scheduleHearing: (allocatedTrack) => {
scheduleHearing: (allocatedTrack, isMinti) => {
return {
userInput: {
HearingNoticeSelect: {
Expand All @@ -21,7 +21,12 @@ module.exports = {
channel: 'IN_PERSON',
hearingDate: date(60),
hearingTimeHourMinute: '1015',
hearingDuration: 'MINUTES_55'
...(!isMinti? {
hearingDuration: 'MINUTES_55'
} : {}),
...(isMinti? {
hearingDurationMinti: 'custom hearing duration'
} : {}),
},
HearingInformation: {
information: 'string'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ async function prepareClaim(api_spec, mpScenario) {
await api_spec.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario, false, true, claimAmountPenniesIntermediate);
}

Scenario('1v1 FULL_DEFENCE Intermediate claim Specified @api-nonprod-specified', async ({api_spec}) => {
Scenario.skip('1v1 FULL_DEFENCE Intermediate claim Specified @api-nonprod-specified', async ({api_spec}) => {
const mpScenario = 'ONE_V_ONE';
await prepareClaim(api_spec, mpScenario);
await api_spec.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'AWAITING_APPLICANT_INTENTION', false, true, claimAmountIntermediate);
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'INTERMEDIATE');
await api_spec.evidenceUploadApplicant(config.applicantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
});

Scenario('1v1 FULL_ADMISSION Intermediate claim Specified', async ({api_spec}) => {
Expand Down Expand Up @@ -51,7 +51,7 @@ Scenario('1v2 full defence Intermediate claim Specified Different Solicitor', as
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'INTERMEDIATE');
await api_spec.evidenceUploadApplicant(config.applicantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);

});

Expand All @@ -62,7 +62,7 @@ Scenario('1v2 full defence Intermediate claim Specified same solicitor', async
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_TWO', 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'INTERMEDIATE');
await api_spec.evidenceUploadApplicant(config.applicantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
});

AfterSuite(async ({api_spec}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ async function prepareClaim(api, mpScenario, claimAmount) {
await api.claimantResponse(config.applicantSolicitorUser, mpScenario, 'JUDICIAL_REFERRAL', 'FOR_SDO', track);
await api.createFinalOrder(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'INTERMEDIATE');
await api.evidenceUploadRespondent(config.defendantSolicitorUser, mpScenario);
await api.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
}

Scenario('1v1 Create Unspecified Intermediate Track claim @api-nonprod', async ({api}) => {
Scenario.skip('1v1 Create Unspecified Intermediate Track claim @api-nonprod', async ({api}) => {
const mpScenario = 'ONE_V_ONE';
await prepareClaim(api, mpScenario, intermediateTrackClaimAmount, track);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ async function prepareClaim(api_spec, mpScenario) {
await api_spec.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario, false, true, claimAmountPenniesMulti);
}

Scenario('1v1 full defence Multi claim Specified @api-nonprod-specified', async ({api_spec}) => {
Scenario.skip('1v1 full defence Multi claim Specified @api-nonprod-specified', async ({api_spec}) => {
const mpScenario = 'ONE_V_ONE';
await prepareClaim(api_spec, mpScenario);
await api_spec.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'AWAITING_APPLICANT_INTENTION', false, true, claimAmountMulti);
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'MULTI');
await api_spec.evidenceUploadRespondent(config.defendantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
});

Scenario('1v1 FULL_ADMISSION Multi claim Specified', async ({api_spec}) => {
Expand Down Expand Up @@ -51,7 +51,7 @@ Scenario('1v2 full defence Multi claim Specified Different Solicitor', async ({a
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', mpScenario, 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'MULTI');
await api_spec.evidenceUploadRespondent(config.defendantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
});

Scenario('1v2 full defence Multi claim Specified same solicitor', async ({I, api_spec}) => {
Expand All @@ -61,7 +61,7 @@ Scenario('1v2 full defence Multi claim Specified same solicitor', async ({I, ap
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_TWO', 'JUDICIAL_REFERRAL', false, true);
await api_spec.createFinalOrderJO(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'MULTI');
await api_spec.evidenceUploadRespondent(config.defendantSolicitorUser, mpScenario);
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
});

AfterSuite(async ({api_spec}) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ async function prepareClaim(api, mpScenario, claimAmount) {
await api.claimantResponse(config.applicantSolicitorUser, mpScenario, 'AWAITING_APPLICANT_INTENTION', 'FOR_SDO', track);
await api.createFinalOrder(judgeUser, 'DOWNLOAD_ORDER_TEMPLATE', 'MULTI');
await api.evidenceUploadApplicant(config.applicantSolicitorUser, mpScenario);
await api.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL', true);
}

Scenario('1v1 Create Unspecified Multi Track claim @api-nonprod', async ({api}) => {
Scenario.skip('1v1 Create Unspecified Multi Track claim @api-nonprod', async ({api}) => {
const mpScenario = 'ONE_V_ONE';
await prepareClaim(api, mpScenario, multiTrackClaimAmount);
});
Expand Down

0 comments on commit b07b20b

Please sign in to comment.