Skip to content

Commit

Permalink
Merge branch 'master' into feat/CIV-15868
Browse files Browse the repository at this point in the history
  • Loading branch information
mounikahmcts authored Dec 13, 2024
2 parents 575ce73 + 24b304b commit 848d6f0
Show file tree
Hide file tree
Showing 16 changed files with 265 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,5 +382,41 @@
"CRUD": "R"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "joDefendantMarkedPaidInFullIssueDate",
"AccessControl": [
{
"UserRoles": [
"caseworker-civil-systemupdate"
],
"CRUD": "CRU"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "joMarkedPaidInFullIssueDate",
"AccessControl": [
{
"UserRoles": [
"caseworker-civil-systemupdate"
],
"CRUD": "CRU"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "joCoscRpaStatus",
"AccessControl": [
{
"UserRoles": [
"caseworker-civil-systemupdate"
],
"CRUD": "CRU"
}
]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,25 @@
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "respondentResponsePcqId",
"AccessControl": [
{
"UserRoles": [
"CITIZEN-DEFENDANT-PROFILE"
],
"CRUD": "CRU"
},
{
"UserRoles": [
"CITIZEN-CLAIMANT-PROFILE",
"caseworker-civil-citizen-ui-pcqextractor"
],
"CRUD": "R"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "helpWithFees",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,19 @@
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "gaDraftDocRespondentSol",
"AccessControl": [
{
"UserRoles": [
"CITIZEN-CLAIMANT-PROFILE",
"CITIZEN-DEFENDANT-PROFILE"
],
"CRUD": "CRU"
}
]
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"CaseFieldID": "gaDraftDocument",
Expand Down
8 changes: 8 additions & 0 deletions ccd-definition/CaseField/CaseField-CUI-R2.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
"SecurityClassification": "Public",
"Searchable": "Y"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "respondentResponsePcqId",
"Label": "PCQ id",
"FieldType": "Text",
"SecurityClassification": "Public",
"Searchable": "Y"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "helpWithFees",
Expand Down
25 changes: 25 additions & 0 deletions ccd-definition/CaseField/CaseField-JO-nonprod.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,5 +327,30 @@
"FieldType": "Date",
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "joDefendantMarkedPaidInFullIssueDate",
"Label": " ",
"FieldType": "DateTime",
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "joMarkedPaidInFullIssueDate",
"Label": " ",
"FieldType": "DateTime",
"SecurityClassification": "Public",
"Searchable": "N"
},
{
"CaseTypeID": "CIVIL${CCD_DEF_VERSION}",
"ID": "joCoscRpaStatus",
"Label": " ",
"FieldType": "FixedList",
"FieldTypeParameter": "CoscRpaStatus",
"SecurityClassification": "Public",
"Searchable": "N"
}
]
14 changes: 14 additions & 0 deletions ccd-definition/FixedLists/CoscRpaStatus-JO-nonprod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"ID": "CoscRpaStatus",
"ListElementCode": "CANCELLED",
"ListElement": "Cancelled",
"DisplayOrder": 1
},
{
"ID": "CoscRpaStatus",
"ListElementCode": "SATISFIED",
"ListElement": "Satisfied",
"DisplayOrder": 2
}
]
4 changes: 3 additions & 1 deletion codecept.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
exports.config = {
tests: process.env.CCD_UI_TESTS == 'true' ? [
tests: process.env.CCD_UI_TESTS === 'true' ? [
'./e2e/tests/ui_tests/*.js',
'./e2e/tests/ui_tests/damages/*_test.js',
'./e2e/tests/ui_tests/lrspec/*_test.js',
Expand All @@ -9,6 +9,7 @@ exports.config = {
'./e2e/tests/ui_tests/settle_discontinue/*_test.js',
'./e2e/tests/ui_tests/sdo/*_test.js',
'./e2e/tests/ui_tests/carm/*_test.js',
'./e2e/tests/ui_tests/minti/*_test.js',
'./e2e/tests/ui_tests/refunds/*_test.js',
'./e2e/tests/ui_tests/default_judgement/*_test.js',
'./e2e/tests/ui_tests/hearings/*_test.js',
Expand All @@ -18,6 +19,7 @@ exports.config = {
'./e2e/tests/api_tests/judgmentOnline/*_test.js',
'./e2e/tests/api_tests/mediation/*_test.js',
'./e2e/tests/api_tests/sdo_R2/*_test.js',
'./e2e/tests/api_tests/generalapplication/*_test.js',
'./e2e/tests/api_tests/defaultJudgments/*_test.js',
'./e2e/tests/api_tests/damages/*_test.js',
'./e2e/tests/api_tests/sdo/*_test.js',
Expand Down
23 changes: 0 additions & 23 deletions e2e/api/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const apiRequest = require('./apiRequest.js');
const claimData = require('../fixtures/events/createClaim.js');
const createDJ = require('../fixtures/events/createDJ.js');
const createDJDirectionOrder = require('../fixtures/events/createDJDirectionOrder.js');
const genAppClaimData = require('../fixtures/events/createGeneralApplication.js');
const genAppClaimDataLR = require('../fixtures/events/createGeneralApplicationLR.js');
const expectedEvents = require('../fixtures/ccd/expectedEvents.js');
const nonProdExpectedEvents = require('../fixtures/ccd/nonProdExpectedEvents.js');
const testingSupport = require('./testingSupport');
Expand Down Expand Up @@ -42,8 +40,6 @@ 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, hmcTest) => claimData.createClaim(mpScenario, claimAmount, pbaV3, sdoR2, hmcTest),
CREATE_CLAIM_RESPONDENT_LIP: claimData.createClaimLitigantInPerson,
CREATE_CLAIM_RESPONDENT_LR_LIP: claimData.createClaimLRLIP,
Expand Down Expand Up @@ -878,25 +874,6 @@ module.exports = {
return await fetchCaseDetails(user, caseId, expectedStatus);
},

initiateGeneralApplication: async (caseNumber, user, expectedState) => {
eventName = 'INITIATE_GENERAL_APPLICATION';
caseId = caseId || caseNumber;
console.log('caseid is..', caseId);

await apiRequest.setupTokens(user);
await apiRequest.startEvent(eventName, caseId);

var isCOSCEnabled = await checkToggleEnabled(COSC);
var gaData = isCOSCEnabled ? data.INITIATE_GENERAL_APPLICATION_LR : data.INITIATE_GENERAL_APPLICATION;
const response = await apiRequest.submitEvent(eventName, gaData, caseId);
const responseBody = await response.json();
assert.equal(response.status, 201);
assert.equal(responseBody.state, expectedState);

console.log('General application created when main case state is', expectedState);
assert.equal(responseBody.callback_response_status_code, 200);
},

addDefendantLitigationFriend: async (user, mpScenario, solicitor) => {
eventName = 'ADD_DEFENDANT_LITIGATION_FRIEND';
await apiRequest.setupTokens(user);
Expand Down
25 changes: 24 additions & 1 deletion e2e/api/steps_LRspec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {expect, assert} = chai;

const {waitForFinishedBusinessProcess} = require('../api/testingSupport');
const {assignCaseRoleToUser, addUserCaseMapping, unAssignAllUsers} = require('./caseRoleAssignmentHelper');
const {PBAv3, SDOR2, isJOLive} = require('../fixtures/featureKeys');
const {PBAv3, SDOR2, isJOLive, COSC} = require('../fixtures/featureKeys');
const apiRequest = require('./apiRequest.js');
const claimData = require('../fixtures/events/createClaimSpec.js');
const expectedEvents = require('../fixtures/ccd/expectedEventsLRSpec.js');
Expand Down Expand Up @@ -40,6 +40,8 @@ const discontinueClaimSpec = require('../fixtures/events/discontinueClaimSpec');
const validateDiscontinueClaimClaimantSpec = require('../fixtures/events/validateDiscontinueClaimClaimantSpec');
const {cloneDeep} = require('lodash');
const {adjustCaseSubmittedDateForMinti, getMintiTrackByClaimAmount, assertTrackAfterClaimCreation} = require('../helpers/mintiHelper');
const genAppClaimData = require('../fixtures/events/createGeneralApplication');
const genAppClaimDataLR = require('../fixtures/events/createGeneralApplicationLR');

let caseId, eventName, mintiClaimTrack;
let caseData = {};
Expand All @@ -48,6 +50,8 @@ let mpScenario = 'ONE_V_ONE';

const data = {
CREATE_CLAIM: (scenario, pbaV3, isMintiCaseEnabled, mintiClaimAmount) => claimData.createClaim(scenario, pbaV3, isMintiCaseEnabled, mintiClaimAmount),
INITIATE_GENERAL_APPLICATION: genAppClaimData.createGAData('Yes', null, '27500','FEE0442'),
INITIATE_GENERAL_APPLICATION_LR: genAppClaimDataLR.createGAData('Yes', null, '27500','FEE0442'),
DEFENDANT_RESPONSE: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec.js').respondToClaim(response, camundaEvent),
DEFENDANT_RESPONSE_MULTI_CLAIM: (response, camundaEvent) => require('../fixtures/events/defendantResponseMultiClaimSpec.js').respondToClaim(response, camundaEvent),
DEFENDANT_RESPONSE_INTERMEDIATE_CLAIM: (response, camundaEvent) => require('../fixtures/events/defendantResponseIntermediateClaimSpec.js').respondToClaim(response, camundaEvent),
Expand Down Expand Up @@ -1047,6 +1051,25 @@ module.exports = {
}
},

initiateGeneralApplication: async (caseNumber, user, expectedState) => {
eventName = 'INITIATE_GENERAL_APPLICATION';
caseId = caseId || caseNumber;
console.log('caseid is..', caseId);

await apiRequest.setupTokens(user);
await apiRequest.startEvent(eventName, caseId);

var isCOSCEnabled = await checkToggleEnabled(COSC);
var gaData = isCOSCEnabled ? data.INITIATE_GENERAL_APPLICATION_LR : data.INITIATE_GENERAL_APPLICATION;
const response = await apiRequest.submitEvent(eventName, gaData, caseId);
const responseBody = await response.json();
assert.equal(response.status, 201);
assert.equal(responseBody.state, expectedState);

console.log('General application created when main case state is', expectedState);
assert.equal(responseBody.callback_response_status_code, 200);
},

mediationUnsuccessful: async (user, carmEnabled = false) => {
eventName = 'MEDIATION_UNSUCCESSFUL';

Expand Down
19 changes: 19 additions & 0 deletions e2e/pages/bundlesTab.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const {I} = inject();

module.exports = {

async verifyBundleDetails() {
I.waitInUrl('#Bundles', 10);
I.see('Bundle name');
I.see('Document Uploaded DateTime',);
I.see('Hearing date');
I.see('Upload a file');
I.seeNumberOfElements('.complex-panel-table tbody .new-table-row', 2);
I.see('Test bundle name');
I.see('1 Jan 2026',);
I.see('01-01-2026-Test bundle name.pdf');
I.see('Test bundle name 1');
I.see('10 Oct 2027');
I.see('10-10-2027-Test bundle name 1.pdf');
},
};
8 changes: 8 additions & 0 deletions e2e/steps_file.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const cosNotifyClaimDetailsPage = require('./pages/notifyClaimDetails/certificat

const cosNotifyClaimCYAPage = require('./pages/cosNotifyClaimCYA.page');
const cosTab = require('./pages/cosTab.page');
const bundlesTab = require('./pages/bundlesTab.page');


const selectDefendantSolicitorPage = require('./pages/notifyClaimDetails/selectDefendantSolicitor.page');
Expand Down Expand Up @@ -699,6 +700,13 @@ module.exports = function () {
]);
},

async verifyBundleDetails(caseNumber) {
await this.triggerStepsWithScreenshot([
() =>caseViewPage.navigateToTab('Bundles'),
() => bundlesTab.verifyBundleDetails()
]);
},

async navigateToTab(tabName) {
await this.triggerStepsWithScreenshot([
() =>caseViewPage.navigateToTab(tabName),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const config = require('../../../config.js');
const {assignCaseRoleToUser, addUserCaseMapping, unAssignAllUsers} = require('../../../api/caseRoleAssignmentHelper');
const {waitForFinishedBusinessProcess} = require('../../../api/testingSupport');
const mpScenario = 'ONE_V_TWO_TWO_LEGAL_REP';
let caseNumber;

Feature('1v2 Different Solicitors General application creation @api-unspec @api-nonprod');

Scenario('Make a general application', async ({api_spec}) => {
await api_spec.createClaimWithRepresentedRespondent(config.applicantSolicitorUser);
await api_spec.informAgreedExtensionDate(config.applicantSolicitorUser);
await api_spec.defendantResponse(config.defendantSolicitorUser);
await api_spec.claimantResponse(config.applicantSolicitorUser, 'FULL_DEFENCE', 'ONE_V_ONE',
'AWAITING_APPLICANT_INTENTION');

await api_spec.initiateGeneralApplication(caseNumber, config.applicantSolicitorUser, 'JUDICIAL_REFERRAL');
});

AfterSuite(async () => {
await unAssignAllUsers();
});
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ Scenario.skip('Defendant solicitor uploads evidence', async ({I}) => {
await I.evidenceUpload(caseNumber, true);
}).retry(3);

Scenario('Make a general application', async ({api}) => {
if (['preview', 'demo'].includes(config.runningEnv)) {
await api.initiateGeneralApplication(caseNumber, config.applicantSolicitorUser, 'CASE_PROGRESSION');
}
}).retry(3);

Scenario('Create a Hearing Request', async ({I}) => {
if (['demo'].includes(config.runningEnv)) {
await I.login(config.hearingCenterAdminWithRegionId1);
Expand Down
31 changes: 31 additions & 0 deletions e2e/tests/ui_tests/minti/spec_intTrack_upload_bundle_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const config = require('../../../config.js');
const judgeUser = config.judgeUserWithRegionId1;
const hearingCenterAdminToBeUsed = config.hearingCenterAdminWithRegionId1;
let civilCaseReference;
const claimAmountPenniesIntermediate = '9900000';
const claimAmountIntermediate = '99000';

Feature('Intermediate track - Upload documents - Bundle @non-prod-e2e-ft');

async function prepareSpecClaim(api_spec, mpScenario) {
civilCaseReference = await api_spec.createClaimWithRepresentedRespondent(config.applicantSolicitorUser, mpScenario, false, true, claimAmountPenniesIntermediate);
}

Scenario('Spec Claim - Int track - 1v2 diff solicitor - Upload bundle', async ({ api_spec, I }) => {
const mpScenario = 'ONE_V_TWO';
await prepareSpecClaim(api_spec, mpScenario);
await api_spec.defendantResponse(config.defendantSolicitorUser, 'FULL_DEFENCE1', 'ONE_V_ONE_DIF_SOL', 'AWAITING_RESPONDENT_ACKNOWLEDGEMENT', false, true, claimAmountIntermediate);
await api_spec.defendantResponse(config.secondDefendantSolicitorUser, 'FULL_DEFENCE2', 'ONE_V_ONE_DIF_SOL', '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.scheduleHearing(hearingCenterAdminToBeUsed, 'FAST_TRACK_TRIAL');
await api_spec.amendHearingDueDate(config.systemupdate);
await api_spec.hearingFeePaid(hearingCenterAdminToBeUsed);
await api_spec.createFinalOrderJO(judgeUser, 'FREE_FORM_ORDER');
await I.login(config.secondDefendantSolicitorUser);
await I.evidenceUpload(civilCaseReference, true, true);
});

AfterSuite(async ({api_spec}) => {
await api_spec.cleanUp();
});
Loading

0 comments on commit 848d6f0

Please sign in to comment.