Skip to content

Commit

Permalink
CIV-15463 removing EA court toggle (#5003)
Browse files Browse the repository at this point in the history
* removing EA court toggle

* removing EA court toggle

* removing EA court toggle

* removing EA court toggle

* removing EA court toggle

* removing EA court toggle

* Update HMC court location in tests

* Update HMC court location in tests

* Update HMC court location in tests

* Update values.preview.template.yaml

---------

Co-authored-by: vasudevganesanhmcts <[email protected]>
  • Loading branch information
drummondjm and vasudevganesanhmcts authored Nov 12, 2024
1 parent b70eed0 commit 17e01e6
Show file tree
Hide file tree
Showing 36 changed files with 154 additions and 177 deletions.
10 changes: 5 additions & 5 deletions e2e/api/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const {adjustCaseSubmittedDateForMinti, assertTrackAfterClaimCreation, addSubmit
const data = {
INITIATE_GENERAL_APPLICATION: genAppClaimData.createGAData('Yes', null, '27500','FEE0442'),
INITIATE_GENERAL_APPLICATION_LR: genAppClaimDataLR.createGAData('Yes', null, '27500','FEE0442'),
CREATE_CLAIM: (mpScenario, claimAmount, pbaV3, sdoR2) => claimData.createClaim(mpScenario, claimAmount, pbaV3, sdoR2),
CREATE_CLAIM: (mpScenario, claimAmount, pbaV3, sdoR2, hmcTest) => claimData.createClaim(mpScenario, claimAmount, pbaV3, sdoR2, hmcTest),
CREATE_CLAIM_RESPONDENT_LIP: claimData.createClaimLitigantInPerson,
CREATE_CLAIM_RESPONDENT_LR_LIP: claimData.createClaimLRLIP,
CREATE_CLAIM_RESPONDENT_LIP_LIP: claimData.createClaimLIPLIP,
Expand Down Expand Up @@ -239,15 +239,15 @@ let mpScenario = 'ONE_V_ONE';

module.exports = {

createClaimWithRepresentedRespondent: async (user, multipartyScenario, claimAmount = '11000', isMintiCaseEnabled = false) => {
createClaimWithRepresentedRespondent: async (user, multipartyScenario, claimAmount = '11000', isMintiCaseEnabled = false, hmcTest = false) => {
eventName = 'CREATE_CLAIM';
caseId = null;
caseData = {};
mpScenario = multipartyScenario;
const pbaV3 = await checkToggleEnabled(PBAv3);
const sdoR2 = await checkToggleEnabled(SDOR2);

let createClaimData = data.CREATE_CLAIM(mpScenario, claimAmount, pbaV3, sdoR2);
let createClaimData = data.CREATE_CLAIM(mpScenario, claimAmount, pbaV3, sdoR2, hmcTest);

// Workaround, toggle is active after 31/01/2025, based on either submittedDate, or current localdatetime
const isMintiEnabled = await checkMintiToggleEnabled() && isMintiCaseEnabled;
Expand Down Expand Up @@ -1488,7 +1488,7 @@ const assertValidData = async (data, pageId, solicitor) => {

assert.equal(response.status, 200);


let claimValue;
if (data.valid && data.valid.ClaimValue && data.valid.ClaimValue.claimValue
&& data.valid.ClaimValue.claimValue.statementOfValueInPennies) {
Expand Down Expand Up @@ -1788,7 +1788,7 @@ function checkCalculated(calculated, responseBodyData) {

function removeUuidsFromDynamicList(data, dynamicListField) {
const dynamicElements = data[dynamicListField].list_items;

return dynamicElements.map(({code, ...item}) => item);
}

Expand Down
7 changes: 6 additions & 1 deletion e2e/api/steps_LRspecFast.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const data = {
CREATE_CLAIM: (scenario, pbaV3) => claimData.createClaim(scenario, pbaV3),
DEFENDANT_RESPONSE: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec.js').respondToClaim(response, camundaEvent, true),
DEFENDANT_RESPONSE_1v2: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec1v2Fast.js').respondToClaim(response, camundaEvent),
DEFENDANT_RESPONSE_1v2_HMC: (response, camundaEvent, hmcTest) => require('../fixtures/events/defendantResponseSpec1v2Fast.js').respondToClaim(response, camundaEvent, hmcTest),
DEFENDANT_RESPONSE_2v1: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec2v1Fast.js').respondToClaim(response, camundaEvent),
CLAIMANT_RESPONSE: (mpScenario) => require('../fixtures/events/claimantResponseSpec.js').claimantResponse(mpScenario, true),
CLAIMANT_RESPONSE_1v2: (response) => require('../fixtures/events/claimantResponseSpec1v2Fast.js').claimantResponse(response),
Expand All @@ -56,6 +57,7 @@ const eventData = {
ONE_V_TWO: {
FULL_DEFENCE: data.DEFENDANT_RESPONSE_1v2('FULL_DEFENCE'),
FULL_DEFENCE_PBAv3: data.DEFENDANT_RESPONSE_1v2('FULL_DEFENCE', 'CREATE_CLAIM_SPEC_AFTER_PAYMENT'),
FULL_DEFENCE_PBAv3_HMC_TEST: data.DEFENDANT_RESPONSE_1v2_HMC('FULL_DEFENCE', 'CREATE_CLAIM_SPEC_AFTER_PAYMENT', true),
FULL_ADMISSION: data.DEFENDANT_RESPONSE_1v2('FULL_ADMISSION'),
FULL_ADMISSION_PBAv3: data.DEFENDANT_RESPONSE_1v2('FULL_ADMISSION', 'CREATE_CLAIM_SPEC_AFTER_PAYMENT'),
PART_ADMISSION: data.DEFENDANT_RESPONSE_1v2('PART_ADMISSION'),
Expand Down Expand Up @@ -215,14 +217,17 @@ module.exports = {
await unAssignAllUsers();
},

defendantResponse: async (user, response = 'FULL_DEFENCE', scenario = 'ONE_V_ONE') => {
defendantResponse: async (user, response = 'FULL_DEFENCE', scenario = 'ONE_V_ONE', hmctest = false) => {
await apiRequest.setupTokens(user);
eventName = 'DEFENDANT_RESPONSE_SPEC';

const pbaV3 = await checkToggleEnabled(PBAv3);
if(pbaV3){
response = response+'_PBAv3';
}
if (hmctest) {
response = response + '_HMC_TEST';
}

let returnedCaseData = await apiRequest.startEvent(eventName, caseId);

Expand Down
8 changes: 5 additions & 3 deletions e2e/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const defaultPassword = process.env.DEFAULT_PASSWORD;
const judgeDefaultPassword = process.env.JUDGE_DEFAULT_PASSWORD;
const iacDefaultPassword = process.env.IAC_DEFAULT_PASSWORD;
const defaultPasswordSystemUser = process.env.SYSTEM_USER_PASSWORD;
const courtToBeSelected = process.env.TEST_EA_COURTS == 'true' ? 'Nottingham County Court And Family Court - Canal Street - NG1 7EJ' : 'Central London County Court - Thomas More Building, Royal Courts of Justice, Strand, London - WC2A 2LL';
const courtToBeSelected = 'Central London County Court - Thomas More Building, Royal Courts of Justice, Strand, London - WC2A 2LL';
const courtToBeSelectedHmc = 'Nottingham County Court And Family Court - Canal Street - NG1 7EJ';

module.exports = {
idamStub: {
Expand Down Expand Up @@ -355,7 +356,6 @@ module.exports = {
TestForAccessibility: process.env.TESTS_FOR_ACCESSIBILITY === 'true',
runningEnv: process.env.ENVIRONMENT,
runWAApiTest: process.env.RUN_WA_API_TEST == 'true' || false,
testEarlyAdopterCourts: process.env.TEST_EA_COURTS == 'true' || false,
claimantSolicitorOrgId: process.env.ENVIRONMENT === 'demo' ? 'B04IXE4' : 'Q1KOKP2',
defendant1SolicitorOrgId: process.env.ENVIRONMENT === 'demo' ? 'DAWY9LJ' : '79ZRSOU',
defendant2SolicitorOrgId: process.env.ENVIRONMENT === 'demo' ? 'LCVTI1I' : 'H2156A0',
Expand All @@ -366,5 +366,7 @@ module.exports = {
liverpoolCourt: 'Liverpool Civil and Family Court - 35, Vernon Street, City Square - L2 2BX',
sdoJudgeSelectedCourt: courtToBeSelected,
localNoCTests: false,
localMediationTests: false
localMediationTests: false,
claimantSelectedCourtHmc: courtToBeSelectedHmc,
defendantSelectedCourtHmc: courtToBeSelectedHmc,
};
11 changes: 8 additions & 3 deletions e2e/fixtures/events/createClaim.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ let selectedPba = listElement('PBAFUNC12345');
const validPba = listElement('PBAFUNC12345');
const invalidPba = listElement('PBA0078095');

const createClaimData = (pbaV3, legalRepresentation, useValidPba, mpScenario, claimAmount = '30000', sdoR2) => {
let claimantCourt = config.claimantSelectedCourt;
const useHmcEaCourt = config.claimantSelectedCourtHmc;
const useClaimantSelectedCourt = config.claimantSelectedCourt;

const createClaimData = (pbaV3, legalRepresentation, useValidPba, mpScenario, claimAmount = '30000', sdoR2, hmcTest) => {
selectedPba = useValidPba ? validPba : invalidPba;
claimantCourt = hmcTest ? useHmcEaCourt : useClaimantSelectedCourt;

const claimData = {
References: {
Expand All @@ -86,9 +91,9 @@ const createClaimData = (pbaV3, legalRepresentation, useValidPba, mpScenario, cl
courtLocation: {
applicantPreferredCourtLocationList: {
list_items: [
listElement(config.claimantSelectedCourt)
listElement(claimantCourt)
],
value: listElement(config.claimantSelectedCourt)
value: listElement(claimantCourt)
}
},
applicant1DQRemoteHearing: {
Expand Down
21 changes: 14 additions & 7 deletions e2e/fixtures/events/defendantResponseSpec1v2Fast.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
const {listElement, element} = require('../../api/dataHelper');
const config = require('../../config.js');

let defendantCourt = config.claimantSelectedCourt;
const useHmcEaCourt = config.claimantSelectedCourtHmc;
const useDefendantSelectedCourt = config.claimantSelectedCourt;

module.exports = {
respondToClaim: (response = 'FULL_DEFENCE', camundaEvent = 'CREATE_CLAIM_SPEC') => {
respondToClaim: (response = 'FULL_DEFENCE', camundaEvent = 'CREATE_CLAIM_SPEC', hmcTest) => {
defendantCourt = hmcTest ? useHmcEaCourt : useDefendantSelectedCourt;

const responseData = {
userInput: {
ResponseConfirmNameAddress: {
Expand Down Expand Up @@ -116,9 +123,9 @@ module.exports = {
respondToCourtLocation: {
responseCourtLocations: {
list_items: [
listElement(config.defendantSelectedCourt)
listElement(defendantCourt)
],
value: listElement(config.defendantSelectedCourt)
value: listElement(defendantCourt)
},
reasonForHearingAtSpecificCourt: 'Reasons'
},
Expand Down Expand Up @@ -297,9 +304,9 @@ module.exports = {
respondToCourtLocation: {
responseCourtLocations: {
list_items: [
listElement(config.defendantSelectedCourt)
listElement(defendantCourt)
],
value: listElement(config.defendantSelectedCourt)
value: listElement(defendantCourt)
},
reasonForHearingAtSpecificCourt: 'Reasons'
},
Expand Down Expand Up @@ -469,9 +476,9 @@ module.exports = {
respondToCourtLocation: {
responseCourtLocations: {
list_items: [
listElement(config.defendantSelectedCourt)
listElement(defendantCourt)
],
value: listElement(config.defendantSelectedCourt)
value: listElement(defendantCourt)
},
reasonForHearingAtSpecificCourt: 'Reasons'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const config = require('../../../config');

Feature('Automated hearing notice schedulers @api-nonprod @AHN');

const judgeUser = config.testEarlyAdopterCourts ? config.judgeUser2WithRegionId2 : config.judgeUserWithRegionId1;
const judgeUser = config.judgeUserWithRegionId1;

let caseId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ const {checkCaseFlagsAndHmcEnabled} = require('../../../api/testingSupport');
const mpScenario = 'ONE_V_TWO_TWO_LEGAL_REP';
const fastClaimAmount = '11000';
const serviceId = 'AAA7';
const hmcTest = true;
let caseId;
let caseFlagsAndHmcEnabled = false;

let continueWithScenario = () => {
const continueWithScenario = [
config.testEarlyAdopterCourts,
caseFlagsAndHmcEnabled
].filter(condition => !condition).length == 0;

console.log(`${continueWithScenario ? '' : 'not '}continuing with scenario as toggles are ${continueWithScenario ? '' : ' not '}enabled...`);

return continueWithScenario;
return caseFlagsAndHmcEnabled;
};

Feature('CCD 1v2 Unspec fast hearings API test @api-hearings-unspec @api-hearings @api-nonprod');
Expand All @@ -28,7 +22,7 @@ BeforeSuite(async () => {

Scenario('1v2DS full defence defendant and claimant response', async ({api}) => {
if(!continueWithScenario()) return;
await api.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario, fastClaimAmount);
await api.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario, fastClaimAmount, false, hmcTest);
await api.notifyClaim(config.applicantSolicitorUser, mpScenario);
await api.notifyClaimDetails(config.applicantSolicitorUser);
await api.defendantResponse(config.defendantSolicitorUser, mpScenario, 'solicitorOne');
Expand All @@ -47,7 +41,7 @@ Scenario('Listing officer adds case flags', async ({hearings}) => {

Scenario('Judge choose hearing in person', async ({api}) => {
if(!continueWithScenario()) return;
await api.createSDO(config.judgeUserWithRegionId1, 'CREATE_FAST_IN_PERSON');
await api.createSDO(config.judgeUser2WithRegionId2, 'CREATE_FAST_IN_PERSON');
});

Scenario('Hearing centre admin requests a hearing', async ({hearings}) => {
Expand Down
16 changes: 5 additions & 11 deletions e2e/tests/api_tests/hearings/api_1v2_spec_fast_hearings_test.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@

const config = require('../../../config.js');
const {getLanguageInterpreterFlag, getRAWheelchairFlag} = require('../../../api/caseFlagsHelper');
const {checkCaseFlagsAndHmcEnabled} = require('../../../api/testingSupport');

const serviceId = 'AAA6';
const hmcTest = true;
let caseId;
let caseFlagsAndHmcEnabled = false;

let continueWithScenario = () => {
const continueWithScenario = [
config.testEarlyAdopterCourts,
caseFlagsAndHmcEnabled
].filter(condition => !condition).length == 0;

console.log(`${continueWithScenario ? '' : 'not '}continuing with scenario as toggles are ${continueWithScenario ? '' : ' not '}enabled...`);

return continueWithScenario;
return caseFlagsAndHmcEnabled;
};

Feature('CCD 1v2 Spec fast hearings API test @api-hearings @api-hearings-spec @api-nonprod');
Expand All @@ -27,7 +21,7 @@ BeforeSuite(async () => {
Scenario('1v2 fast claim full defence', async ({api_spec_fast}) => {
if(!continueWithScenario()) return;
await api_spec_fast.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, 'ONE_V_TWO_SAME_SOL');
await api_spec_fast.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_TWO');
await api_spec_fast.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_TWO', hmcTest);
await api_spec_fast.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_TWO',
'AWAITING_APPLICANT_INTENTION');

Expand All @@ -42,7 +36,7 @@ Scenario('Listing officer adds case flags', async ({hearings}) => {

Scenario('Judge choose hearing in person', async ({api_spec_fast}) => {
if(!continueWithScenario()) return;
await api_spec_fast.createSDO(config.judgeUserWithRegionId1, 'CREATE_FAST');
await api_spec_fast.createSDO(config.judgeUser2WithRegionId2, 'CREATE_FAST');
});

Scenario('Hearing centre admin requests a hearing', async ({hearings}) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@


const config = require('../../../config.js');
const mpScenario = 'ONE_V_ONE';
const judgeUser = config.testEarlyAdopterCourts ? config.judgeUser2WithRegionId2 : config.judgeUserWithRegionId1;
const caseWorkerUser = config.testEarlyAdopterCourts ? config.hearingCenterAdminWithRegionId2 : config.hearingCenterAdminWithRegionId1;
const judgeUser = config.judgeUserWithRegionId1;
const caseWorkerUserReg1 = config.hearingCenterAdminWithRegionId1;
const caseWorkerUserReg2 = config.hearingCenterAdminWithRegionId2;
// to use on local because the idam images are different
// const judgeUser = config.judgeUserWithRegionId1Local;
// const caseWorkerUser = config.tribunalCaseworkerWithRegionId1Local;
Expand All @@ -25,7 +26,7 @@ async function prepareClaimSpecRecordJudgment(api_spec){
console.log('--createFinalOrderJO--');
await api_spec.createFinalOrderJO(judgeUser, 'FREE_FORM_ORDER');
console.log('--recordJudgment--');
await api_spec.recordJudgment(caseWorkerUser, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IMMEDIATELY');
await api_spec.recordJudgment(caseWorkerUserReg1, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IMMEDIATELY');
}

Scenario('SetAside Default Judgment after judgment error - Spec claim 1v1 - Case taken offline', async ({I, api_spec}) => {
Expand All @@ -34,15 +35,14 @@ Scenario('SetAside Default Judgment after judgment error - Spec claim 1v1 - Case
await api_spec.amendRespondent1ResponseDeadline(config.systemupdate);
await api_spec.defaultJudgmentSpec(config.applicantSolicitorUser, mpScenario, false);
console.log('--setAsideJudgment--');
console.log(` user : ${caseWorkerUser.email} : config.testEarlyAdopterCourts : ${config.testEarlyAdopterCourts}`);
await api_spec.setAsideJudgment(config.hearingCenterAdminWithRegionId2, 'JUDGMENT_ERROR','ORDER_AFTER_DEFENCE','All_FINAL_ORDERS_ISSUED');
await api_spec.setAsideJudgment(caseWorkerUserReg2, 'JUDGMENT_ERROR','ORDER_AFTER_DEFENCE','All_FINAL_ORDERS_ISSUED');
}
});

Scenario('Record Judgment Spec claim 1v1 with mark paid in full', async ({I, api_spec}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
await prepareClaimSpecRecordJudgment(api_spec);
await api_spec.editJudgment(caseWorkerUser, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_BY_DATE');
await api_spec.editJudgment(caseWorkerUserReg1, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_BY_DATE');
console.log('--markJudgmentPaid--');
await api_spec.markJudgmentPaid(config.applicantSolicitorUser);
}
Expand All @@ -52,7 +52,7 @@ Scenario('Refer To Judge Spec claim 1v1 Defence Received In Time', async ({I, ap
if (['preview', 'demo'].includes(config.runningEnv)) {
await prepareClaimSpecRecordJudgment(api_spec);
console.log('--referToJudgeDefenceReceived--');
await api_spec.referToJudgeDefenceReceived(caseWorkerUser);
await api_spec.referToJudgeDefenceReceived(caseWorkerUserReg1);
}
});

Expand All @@ -61,7 +61,7 @@ Scenario('SetAside Default Judgment Spec claim 1v1 - Record new judgment after h
await api_spec.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario);
await api_spec.amendRespondent1ResponseDeadline(config.systemupdate);
await api_spec.defaultJudgmentSpec(config.applicantSolicitorUser, mpScenario, false);
await api_spec.setAsideJudgment(config.hearingCenterAdminWithRegionId2, 'JUDGE_ORDER','ORDER_AFTER_APPLICATION', 'AWAITING_RESPONDENT_ACKNOWLEDGEMENT');
await api_spec.setAsideJudgment(caseWorkerUserReg2, 'JUDGE_ORDER','ORDER_AFTER_APPLICATION', 'AWAITING_RESPONDENT_ACKNOWLEDGEMENT');
console.log('--defendantResponse--');
await api_spec.defendantResponse(config.defendantSolicitorUser);
console.log('--claimantResponse--');
Expand All @@ -72,8 +72,8 @@ Scenario('SetAside Default Judgment Spec claim 1v1 - Record new judgment after h
console.log('--createFinalOrderJO--');
await api_spec.createFinalOrderJO(judgeUser, 'FREE_FORM_ORDER');
console.log('--recordJudgment--');
await api_spec.recordJudgment(caseWorkerUser, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IMMEDIATELY');
await api_spec.editJudgment(caseWorkerUser, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IN_INSTALMENTS');
await api_spec.recordJudgment(caseWorkerUserReg1, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IMMEDIATELY');
await api_spec.editJudgment(caseWorkerUserReg1, mpScenario, 'DETERMINATION_OF_MEANS', 'PAY_IN_INSTALMENTS');
}
});

Expand Down
Loading

0 comments on commit 17e01e6

Please sign in to comment.