Skip to content

Commit

Permalink
Merge branch 'master' into feat/CIV-15393
Browse files Browse the repository at this point in the history
  • Loading branch information
mounikahmcts authored Dec 12, 2024
2 parents 670247a + 6f855c4 commit 2aac6a3
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 30 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"
}
]
}
]
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
}
]
1 change: 1 addition & 0 deletions codecept.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,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
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

0 comments on commit 2aac6a3

Please sign in to comment.