From 5b5ad3c26d02060381a945f22da1c4541cdd7449 Mon Sep 17 00:00:00 2001 From: sankaviv1 <95748224+sankaviv1@users.noreply.github.com> Date: Wed, 24 Jul 2024 08:48:44 +0100 Subject: [PATCH 1/5] CIV-14719 Failing api test (#4651) * run failing test only * run failing test only * run failing test only * make test run on civil service * skip unassign step * change user region * revert test changes --- .../api_tests/sdo_R2/api_request_for_reconsideration_test.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/tests/api_tests/sdo_R2/api_request_for_reconsideration_test.js b/e2e/tests/api_tests/sdo_R2/api_request_for_reconsideration_test.js index b931111d6c..7ef597103e 100644 --- a/e2e/tests/api_tests/sdo_R2/api_request_for_reconsideration_test.js +++ b/e2e/tests/api_tests/sdo_R2/api_request_for_reconsideration_test.js @@ -2,6 +2,7 @@ const config = require('../../../config.js'); const legalAdvUser = config.tribunalCaseworkerWithRegionId4; // To use on local because the idam images are different const judgeUserReg2 = config.judgeUser2WithRegionId2; +const judgeUserReg1 = config.judgeUserWithRegionId1; const judgeUserForFastClaim = config.testEarlyAdopterCourts ? config.judgeUser2WithRegionId2 : config.judgeUserWithRegionId1; async function prepareClaimSpec(api_spec_small) { @@ -35,14 +36,14 @@ Scenario('1v1 spec request for reconsideration for create general order', async await api_spec_small.judgeDecisionOnReconsiderationRequest(judgeUserReg2, 'CREATE_GENERAL_ORDER'); }); -Scenario.skip('1v2 spec request for reconsideration by defendant2 for create general order', async ({api_spec_small}) => { +Scenario('1v2 spec request for reconsideration by defendant2 for create general order', async ({api_spec_small}) => { await api_spec_small.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, 'ONE_V_TWO'); await api_spec_small.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE1', 'ONE_V_TWO_DIF_SOL',true); await api_spec_small.defendantResponse(config.secondDefendantSolicitorUser, 'FULL_DEFENCE2', 'ONE_V_TWO_DIF_SOL',true); await api_spec_small.claimantResponse(config.applicantSolicitorUser, true); await api_spec_small.createSDO(legalAdvUser, 'CREATE_SMALL_NO_SUM'); await api_spec_small.requestForReconsideration(config.secondDefendantSolicitorUser,'Respondent2'); - await api_spec_small.judgeDecisionOnReconsiderationRequest(judgeUserReg2, 'CREATE_GENERAL_ORDER'); + await api_spec_small.judgeDecisionOnReconsiderationRequest(judgeUserReg1, 'CREATE_GENERAL_ORDER'); }).tag('@api-prod'); Scenario.skip('1v1 spec request for reconsideration when claim amount is greater than 1000', async ({api_spec}) => { From f43e693fb7db6e682d4609fdc7cda772b1644b45 Mon Sep 17 00:00:00 2001 From: hmcts-version1-ignacio <107860328+hmcts-version1-ignacio@users.noreply.github.com> Date: Wed, 24 Jul 2024 09:41:32 +0100 Subject: [PATCH 2/5] CIV-14009 Docmosis template: Defendant LiP Claim Paid in Full Letter (#4484) * CIV-14009 Add new event * CIV-14009 Add new event * CIV-14009 Merge changes from 14010 * CIV-14009 Merge changes from 14010 --------- Co-authored-by: Azam <106387766+Azam-Hmcts@users.noreply.github.com> --- ...onCaseEvent-SettleDiscontinue-nonprod.json | 19 +++++++++++++++++++ ...mosisEvents-SettleDiscontinue-nonprod.json | 15 +++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 ccd-definition/CaseEvent/Camunda/DocmosisEvents-SettleDiscontinue-nonprod.json diff --git a/ccd-definition/AuthorisationCaseEvent/AuthorisationCaseEvent-SettleDiscontinue-nonprod.json b/ccd-definition/AuthorisationCaseEvent/AuthorisationCaseEvent-SettleDiscontinue-nonprod.json index 1472534cff..3c8d5b6a08 100644 --- a/ccd-definition/AuthorisationCaseEvent/AuthorisationCaseEvent-SettleDiscontinue-nonprod.json +++ b/ccd-definition/AuthorisationCaseEvent/AuthorisationCaseEvent-SettleDiscontinue-nonprod.json @@ -229,5 +229,24 @@ "CRUD": "R" } ] + }, + { + "CaseTypeID": "CIVIL", + "CaseEventID": "SEND_SETTLE_CLAIM_PAID_IN_FULL_LETTER_TO_LIP_DEFENDANT1", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-civil-systemupdate" + ], + "CRUD": "CRU" + }, + { + "UserRoles": [ + "caseworker-civil-admin", + "caseworker-civil-staff" + ], + "CRUD": "R" + } + ] } ] diff --git a/ccd-definition/CaseEvent/Camunda/DocmosisEvents-SettleDiscontinue-nonprod.json b/ccd-definition/CaseEvent/Camunda/DocmosisEvents-SettleDiscontinue-nonprod.json new file mode 100644 index 0000000000..be8352c6a9 --- /dev/null +++ b/ccd-definition/CaseEvent/Camunda/DocmosisEvents-SettleDiscontinue-nonprod.json @@ -0,0 +1,15 @@ +[ + { + "CaseTypeID": "CIVIL", + "ID": "SEND_SETTLE_CLAIM_PAID_IN_FULL_LETTER_TO_LIP_DEFENDANT1", + "Name": "Settle claim paid full letter", + "Description": "Send Settle claim mark paid in full Letter to LiP Defendant 1", + "PreConditionState(s)": "*", + "PostConditionState": "*", + "SecurityClassification": "Public", + "CallBackURLAboutToSubmitEvent": "${CCD_DEF_CASE_SERVICE_BASE_URL}/cases/callbacks/about-to-submit", + "ShowSummary": "N", + "ShowEventNotes": "N", + "RetriesTimeoutURLAboutToSubmitEvent": 0 + } +] From 1d08ff56c60facd42a37dd324a11a6cfb178582d Mon Sep 17 00:00:00 2001 From: ShwetaTandel-hmcts <130586258+ShwetaTandel-hmcts@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:50:15 +0100 Subject: [PATCH 3/5] CIV-14270 Publish field for Remove Hearing task (#4655) * Added hearing date * adde state --- .../CaseEvent/User/UserEvents-AHN-nonprod.json | 2 +- ...DiscontinueClaim-SettleDiscontinue-nonprod.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ccd-definition/CaseEvent/User/UserEvents-AHN-nonprod.json b/ccd-definition/CaseEvent/User/UserEvents-AHN-nonprod.json index 68645162d0..9473246a05 100644 --- a/ccd-definition/CaseEvent/User/UserEvents-AHN-nonprod.json +++ b/ccd-definition/CaseEvent/User/UserEvents-AHN-nonprod.json @@ -24,7 +24,7 @@ "Name": "Add a case note", "Description": "Add a case note", "DisplayOrder": 16, - "PreConditionState(s)": "PENDING_CASE_ISSUED;CASE_ISSUED;AWAITING_CASE_DETAILS_NOTIFICATION;AWAITING_RESPONDENT_ACKNOWLEDGEMENT;AWAITING_APPLICANT_INTENTION;CASE_PROGRESSION;CASE_DISMISSED;PROCEEDS_IN_HERITAGE_SYSTEM;All_FINAL_ORDERS_ISSUED;PREPARE_FOR_HEARING_CONDUCT_HEARING;JUDICIAL_REFERRAL;CASE_SETTLED;CLOSED", + "PreConditionState(s)": "PENDING_CASE_ISSUED;CASE_ISSUED;AWAITING_CASE_DETAILS_NOTIFICATION;AWAITING_RESPONDENT_ACKNOWLEDGEMENT;AWAITING_APPLICANT_INTENTION;CASE_PROGRESSION;CASE_DISMISSED;PROCEEDS_IN_HERITAGE_SYSTEM;All_FINAL_ORDERS_ISSUED;PREPARE_FOR_HEARING_CONDUCT_HEARING;JUDICIAL_REFERRAL;CASE_SETTLED;CLOSED;CASE_DISCONTINUED", "PostConditionState": "*", "SecurityClassification": "Public", "ShowSummary": "Y", diff --git a/ccd-definition/CaseEventToFields/DiscontinueClaim-SettleDiscontinue-nonprod.json b/ccd-definition/CaseEventToFields/DiscontinueClaim-SettleDiscontinue-nonprod.json index dafd7d7c3c..353f7e3b41 100644 --- a/ccd-definition/CaseEventToFields/DiscontinueClaim-SettleDiscontinue-nonprod.json +++ b/ccd-definition/CaseEventToFields/DiscontinueClaim-SettleDiscontinue-nonprod.json @@ -278,5 +278,19 @@ "DisplayContext": "MANDATORY", "ShowSummaryChangeOption":"Y", "FieldShowCondition":"typeOfDiscontinuance=\"PART_DISCONTINUANCE\"" + }, + { + "CaseTypeID": "CIVIL", + "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "hearingDate", + "PageID": "DiscontinuanceType", + "PageLabel": "Type of Discontinuance", + "PageDisplayOrder": 6, + "PageFieldDisplayOrder":2, + "PageColumnNumber": 1, + "DisplayContext": "READONLY", + "ShowSummaryChangeOption": "N", + "FieldShowCondition":"typeOfDiscontinuance=\"DO NOT SHOW ON UI\"", + "Publish": "Y" } ] From 053999765b7e4971498928a33bd1838b16c6abb9 Mon Sep 17 00:00:00 2001 From: jeswanth-hmcts <134285996+jeswanth-hmcts@users.noreply.github.com> Date: Wed, 24 Jul 2024 13:52:10 +0100 Subject: [PATCH 4/5] CIV-14661 Review Case Flags task are not appearing for Defendant LiP (#4636) CIV-14661 Review Case Flags task are not appearing for Defendant in LipVLip Co-authored-by: Paul Pearson <46532983+paul-pearson@users.noreply.github.com> --- ...ationIntegrationFields-CUI-R2-nonprod.json | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-CUI-R2-nonprod.json b/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-CUI-R2-nonprod.json index 6022358873..c5eea9e88d 100644 --- a/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-CUI-R2-nonprod.json +++ b/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-CUI-R2-nonprod.json @@ -208,5 +208,35 @@ "PageID": "WorkAllocationIntegrationFields", "PageDisplayOrder": 2, "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL", + "CaseEventID": "UPDATE_CLAIMANT_INTENTION_CLAIM_STATE", + "CaseFieldID": "respondent1DQVulnerabilityQuestions", + "PageFieldDisplayOrder": 22, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 2, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL", + "CaseEventID": "UPDATE_CLAIMANT_INTENTION_CLAIM_STATE", + "CaseFieldID": "respondent1DQLanguage", + "PageFieldDisplayOrder": 23, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 2, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL", + "CaseEventID": "UPDATE_CLAIMANT_INTENTION_CLAIM_STATE", + "CaseFieldID": "respondent1DQHearingSupport", + "PageFieldDisplayOrder": 24, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 2, + "Publish": "Y" } ] From 26845d351712873c25a1646faf2fd43645c87bd1 Mon Sep 17 00:00:00 2001 From: Omaira-Melo-Hmcts <148855113+Omaira-Melo-Hmcts@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:11:00 +0100 Subject: [PATCH 5/5] CIV-14262 2 Defendant LiP Email notification Notice of Discontinuance (#4658) * CIV-14262 API test Lip notification Mail * CIV-14262 Name file changed * CIV-14262 Fix file name change --------- Co-authored-by: Azam <106387766+Azam-Hmcts@users.noreply.github.com> --- e2e/api/steps_LRspec.js | 4 +- e2e/api/steps_LRspecCui.js | 45 ++++++++++++++++++- ...laim2v1Spec.js => discontinueClaimSpec.js} | 21 +++++++++ ...api_1v1_spec_cui_discontinue_claim_test.js | 33 ++++++++++++++ 4 files changed, 100 insertions(+), 3 deletions(-) rename e2e/fixtures/events/{discontinueClaim2v1Spec.js => discontinueClaimSpec.js} (84%) create mode 100644 e2e/tests/api_tests/lrspec_cui/api_1v1_spec_cui_discontinue_claim_test.js diff --git a/e2e/api/steps_LRspec.js b/e2e/api/steps_LRspec.js index 451e7564dd..93276113a6 100644 --- a/e2e/api/steps_LRspec.js +++ b/e2e/api/steps_LRspec.js @@ -36,7 +36,7 @@ const mediationUnsuccessful = require('../fixtures/events/cui/unsuccessfulMediat const evidenceUploadApplicant = require('../fixtures/events/evidenceUploadApplicant'); const evidenceUploadRespondent = require('../fixtures/events/evidenceUploadRespondent'); const settleClaim1v1Spec = require('../fixtures/events/settleClaim1v1Spec'); -const discontinueClaim2v1Spec = require('../fixtures/events/discontinueClaim2v1Spec'); +const discontinueClaimSpec = require('../fixtures/events/discontinueClaimSpec'); const validateDiscontinueClaimClaimantSpec = require('../fixtures/events/validateDiscontinueClaimClaimantSpec'); const {cloneDeep} = require('lodash'); const {adjustCaseSubmittedDateForMinti, getMintiTrackByClaimAmount, assertTrackAfterClaimCreation} = require('../helpers/mintiHelper'); @@ -85,7 +85,7 @@ const data = { REFER_JUDGE_DEFENCE_RECEIVED: () => judgmentOnline1v1Spec.referJudgeDefenceReceived(), SETTLE_CLAIM_MARK_PAID_FULL: (addApplicant2) => settleClaim1v1Spec.settleClaim(addApplicant2), SETTLE_CLAIM_MARK_PAID_FULL_SELECT_CLAIMANT: (addApplicant2) => settleClaim1v1Spec.claimantDetails(addApplicant2), - DISCONTINUE_CLAIM: (mpScenario) => discontinueClaim2v1Spec.discontinueClaim(mpScenario), + DISCONTINUE_CLAIM: (mpScenario) => discontinueClaimSpec.discontinueClaim(mpScenario), VALIDATE_DISCONTINUE_CLAIM_CLAIMANT: (permission) => validateDiscontinueClaimClaimantSpec.validateDiscontinueClaimClaimant(permission), }; diff --git a/e2e/api/steps_LRspecCui.js b/e2e/api/steps_LRspecCui.js index 339a78ac00..0afb035aaa 100644 --- a/e2e/api/steps_LRspecCui.js +++ b/e2e/api/steps_LRspecCui.js @@ -24,6 +24,7 @@ const {PBAv3} = require('../fixtures/featureKeys'); const {adjustCaseSubmittedDateForCarm} = require('../helpers/carmHelper'); const {fetchCaseDetails} = require('./apiRequest'); const lipClaimantResponse = require('../fixtures/events/cui/lipClaimantResponse'); +const discontinueClaimSpec = require('../fixtures/events/discontinueClaimSpec'); let caseId, eventName; let caseData = {}; @@ -36,7 +37,8 @@ const data = { CLAIMANT_RESPONSE: (mpScenario, citizenDefendantResponse, freeMediation, carmEnabled) => require('../fixtures/events/claimantResponseSpecCui.js').claimantResponse(mpScenario, citizenDefendantResponse, freeMediation, carmEnabled), REQUEST_JUDGEMENT: (mpScenario) => require('../fixtures/events/requestJudgementSpecCui.js').response(mpScenario), INFORM_AGREED_EXTENSION_DATE: () => require('../fixtures/events/informAgreeExtensionDateSpec.js'), - EXTEND_RESPONSE_DEADLINE_DATE: () => require('../fixtures/events/extendResponseDeadline.js') + EXTEND_RESPONSE_DEADLINE_DATE: () => require('../fixtures/events/extendResponseDeadline.js'), + DISCONTINUE_CLAIM: (mpScenario) => discontinueClaimSpec.discontinueClaim(mpScenario), }; const eventData = { @@ -282,6 +284,41 @@ module.exports = { await waitForFinishedBusinessProcess(caseId); }, + discontinueClaim: async (user, mpScenario) => { + console.log('discontinueClaim for case id ' + caseId); + await apiRequest.setupTokens(user); + eventName = 'DISCONTINUE_CLAIM_CLAIMANT'; + + let returnedCaseData = await apiRequest.startEvent(eventName, caseId); + delete returnedCaseData['SearchCriteria']; + caseData = returnedCaseData; + + assertContainsPopulatedFields(returnedCaseData); + + let disposalData = data.DISCONTINUE_CLAIM(mpScenario); + for (let pageId of Object.keys(disposalData.userInput)) { + await assertValidData(disposalData, pageId); + } + + if (mpScenario === 'TWO_V_ONE') { + await assertSubmittedEvent('AWAITING_RESPONDENT_ACKNOWLEDGEMENT', { + header: '# We have noted your claim has been partly discontinued and your claim has been updated', + body: '' + }, true); + } else if (mpScenario === 'ONE_V_TWO' || mpScenario === 'ONE_V_ONE_NO_P_NEEDED' ) { + await assertSubmittedEvent('CASE_DISCONTINUED', { + header: '# Your claim has been discontinued', + body: '' + }, true); + } else { + await assertSubmittedEvent('AWAITING_RESPONDENT_ACKNOWLEDGEMENT', { + header: '# Your request is being reviewed', + body: '' + }, true); + } + await waitForFinishedBusinessProcess(caseId); + }, + checkUserCaseAccess: async (user, shouldHaveAccess) => { console.log(`Checking ${user.email} ${shouldHaveAccess ? 'has' : 'does not have'} access to the case.`); const expectedStatus = shouldHaveAccess ? 200 : 403; @@ -473,6 +510,12 @@ const deleteCaseFields = (...caseFields) => { caseFields.forEach(caseField => delete caseData[caseField]); }; +const assertContainsPopulatedFields = returnedCaseData => { + for (let populatedCaseField of Object.keys(caseData)) { + assert.property(returnedCaseData, populatedCaseField); + } +}; + const assertCorrectEventsAreAvailableToUser = async (user, state) => { console.log(`Asserting user ${user.type} in env ${config.runningEnv} has correct permissions`); const caseForDisplay = await apiRequest.fetchCaseForDisplay(user, caseId); diff --git a/e2e/fixtures/events/discontinueClaim2v1Spec.js b/e2e/fixtures/events/discontinueClaimSpec.js similarity index 84% rename from e2e/fixtures/events/discontinueClaim2v1Spec.js rename to e2e/fixtures/events/discontinueClaimSpec.js index 99c89ba632..1a436eda9b 100644 --- a/e2e/fixtures/events/discontinueClaim2v1Spec.js +++ b/e2e/fixtures/events/discontinueClaimSpec.js @@ -108,6 +108,27 @@ module.exports = { }; } break; + case 'ONE_V_ONE_NO_P_NEEDED': { + data.userInput = { + courtPermission: { + courtPermissionNeeded: 'NO', + courtPermissionNeededChecked: [ + 'CourtPermissionNeededChecked' + ] + }, + PermissionGranted: { + isPermissionGranted:'YES', + permissionGrantedComplex:{ + permissionGrantedJudge:'test', + permissionGrantedDate:'2023-02-01' + } + }, + DiscontinuanceType: { + typeOfDiscontinuance:'FULL_DISCONTINUANCE' + } + }; + } + break; } return data; } diff --git a/e2e/tests/api_tests/lrspec_cui/api_1v1_spec_cui_discontinue_claim_test.js b/e2e/tests/api_tests/lrspec_cui/api_1v1_spec_cui_discontinue_claim_test.js new file mode 100644 index 0000000000..9e8c1728e6 --- /dev/null +++ b/e2e/tests/api_tests/lrspec_cui/api_1v1_spec_cui_discontinue_claim_test.js @@ -0,0 +1,33 @@ +/* eslint-disable no-unused-vars */ + +const config = require('../../../config.js'); +const {createAccount, deleteAccount} = require('../../../api/idamHelper'); + +const claimType = 'SmallClaims'; +let caseId; + +Feature('CCD 1v1 API test @api-spec-cui @api-nonprod @api-settle-discont'); + +Before(async () => { + await createAccount(config.defendantCitizenUser2.email, config.defendantCitizenUser2.password); +}); + +async function prepareClaimLRvLiPExui(api_spec_cui, carmEnabled) { + let expectedEndState = carmEnabled ? 'IN_MEDIATION' : 'JUDICIAL_REFERRAL'; + caseId = await api_spec_cui.createSpecifiedClaimWithUnrepresentedRespondent(config.applicantSolicitorUser, 'ONE_V_ONE', claimType, carmEnabled); + await api_spec_cui.performCitizenDefendantResponse(config.defendantCitizenUser2, caseId, claimType, carmEnabled); + await api_spec_cui.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE_CITIZEN_DEFENDANT', 'ONE_V_ONE', 'No', expectedEndState, carmEnabled); +} +Scenario.only('Discontinue claim 1v1 LR v LiP defendant and claimant response - claim created from exui - CARM not enabled', async ({api_spec_cui}) => { + if (['preview', 'demo'].includes(config.runningEnv)) { + let mpScenario = 'ONE_V_ONE_NO_P_NEEDED'; + await prepareClaimLRvLiPExui(api_spec_cui, false); + await api_spec_cui.discontinueClaim(config.applicantSolicitorUser, mpScenario); + } +}); + +AfterSuite(async ({api_spec_cui}) => { + await api_spec_cui.cleanUp(); + await deleteAccount(config.defendantCitizenUser2.email); +}); +