Skip to content

Commit

Permalink
Merge branch 'feat/CIV-13484' of https://github.com/hmcts/civil-service
Browse files Browse the repository at this point in the history
… into feat/CIV-13484
  • Loading branch information
neeta-hmcts committed May 15, 2024
2 parents ac71121 + 7ea6e43 commit d807f09
Show file tree
Hide file tree
Showing 48 changed files with 460 additions and 195 deletions.
1 change: 0 additions & 1 deletion Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ withPipeline(type, product, component) {
}

before('smoketest:preview') {
validateRpaContract()
env.URL="https://xui-civil-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"
env.CIVIL_SERVICE_URL="https://civil-service-pr-${CHANGE_ID}.preview.platform.hmcts.net"

Expand Down
2 changes: 2 additions & 0 deletions bin/add-roles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
./bin/utils/ccd-add-role.sh "judge-profile"
./bin/utils/ccd-add-role.sh "APP-SOL-UNSPEC-PROFILE"
./bin/utils/ccd-add-role.sh "APP-SOL-SPEC-PROFILE"
./bin/utils/ccd-add-role.sh "APPLICANT-PROFILE-SPEC"
./bin/utils/ccd-add-role.sh "RESPONDENT-ONE-PROFILE-SPEC"
./bin/utils/ccd-add-role.sh "RES-SOL-ONE-UNSPEC-PROFILE"
./bin/utils/ccd-add-role.sh "RES-SOL-ONE-SPEC-PROFILE"
./bin/utils/ccd-add-role.sh "RES-SOL-TWO-UNSPEC-PROFILE"
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ allprojects {
// Solves CVE-2022-31159, happens only on local builds when running dependencyCheck gradle task
dependencySet(
group: 'com.amazonaws',
version: '1.12.720'
version: '1.12.721'
) {
entry 'aws-java-sdk-core'
entry 'aws-java-sdk-kms'
Expand Down Expand Up @@ -397,7 +397,7 @@ dependencies {
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: '2.23.1'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.12.0'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.89'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '10.1.23'
implementation group: 'org.apache.tomcat.embed', name: 'tomcat-embed-websocket', version: '10.1.24'
implementation group: 'org.elasticsearch', name: 'elasticsearch', version: '7.17.21'
implementation group: 'com.networknt', name: 'json-schema-validator', version: '1.4.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,22 @@ void should_create_scenario_for_claim_fee_required_small_claims() throws Excepti
jsonPath("$[5].currentStatusEn").value("Not available yet"),
jsonPath("$[6].taskNameEn").value("<a>View mediation documents</a>"),
jsonPath("$[6].currentStatusEn").value("Not available yet"),
jsonPath("$[7].taskNameEn").value("<a>View hearings</a>"),
jsonPath("$[7].taskNameEn").value("<a>View the hearing</a>"),
jsonPath("$[7].currentStatusEn").value("Not available yet"),
jsonPath("$[8].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[8].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[8].currentStatusEn").value("Not available yet"),
jsonPath("$[9].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[9].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[9].currentStatusEn").value("Not available yet"),
jsonPath("$[10].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[10].taskNameEn").value("<a>View documents</a>"),
jsonPath("$[10].currentStatusEn").value("Not available yet"),
jsonPath("$[11].taskNameEn").value("<a href={VIEW_ORDERS_AND_NOTICES} rel=\"noopener noreferrer\" class=\"govuk-link\">View orders and notices</a>"),
jsonPath("$[11].currentStatusEn").value("Available"),
jsonPath("$[12].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[12].currentStatusEn").value("Not available yet"),
jsonPath("$[13].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[13].currentStatusEn").value("Not available yet")
jsonPath("$[11].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[11].currentStatusEn").value("Not available yet"),
jsonPath("$[12].taskNameEn").value("<a href={VIEW_ORDERS_AND_NOTICES} rel=\"noopener noreferrer\" class=\"govuk-link\">View orders and notices</a>"),
jsonPath("$[12].currentStatusEn").value("Available"),
jsonPath("$[13].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[13].currentStatusEn").value("Not available yet"),
jsonPath("$[14].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[14].currentStatusEn").value("Not available yet")

);

Expand Down Expand Up @@ -129,23 +131,25 @@ void should_create_scenario_for_claim_fee_required_fast_track() throws Exception
jsonPath("$[5].currentStatusEn").value("Not available yet"),
jsonPath("$[6].taskNameEn").value("<a>View mediation documents</a>"),
jsonPath("$[6].currentStatusEn").value("Not available yet"),
jsonPath("$[7].taskNameEn").value("<a>View hearings</a>"),
jsonPath("$[7].taskNameEn").value("<a>View the hearing</a>"),
jsonPath("$[7].currentStatusEn").value("Not available yet"),
jsonPath("$[8].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[8].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[8].currentStatusEn").value("Not available yet"),
jsonPath("$[9].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[9].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[9].currentStatusEn").value("Not available yet"),
jsonPath("$[10].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[10].taskNameEn").value("<a>View documents</a>"),
jsonPath("$[10].currentStatusEn").value("Not available yet"),
jsonPath("$[11].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[11].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[11].currentStatusEn").value("Not available yet"),
jsonPath("$[12].taskNameEn").value(
jsonPath("$[12].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[12].currentStatusEn").value("Not available yet"),
jsonPath("$[13].taskNameEn").value(
"<a href={VIEW_ORDERS_AND_NOTICES} rel=\"noopener noreferrer\" class=\"govuk-link\">View orders and notices</a>"),
jsonPath("$[12].currentStatusEn").value("Available"),
jsonPath("$[13].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[13].currentStatusEn").value("Not available yet"),
jsonPath("$[14].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[14].currentStatusEn").value("Not available yet")
jsonPath("$[13].currentStatusEn").value("Available"),
jsonPath("$[14].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[14].currentStatusEn").value("Not available yet"),
jsonPath("$[15].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[15].currentStatusEn").value("Not available yet")

);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package uk.gov.hmcts.reform.civil.controllers.dashboard.scenarios.claimant;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import uk.gov.hmcts.reform.civil.controllers.DashboardBaseIntegrationTest;
import uk.gov.hmcts.reform.civil.handler.callback.camunda.dashboardnotifications.claimant.ClaimantResponseNotificationHandler;
import uk.gov.hmcts.reform.civil.model.CaseData;
import uk.gov.hmcts.reform.civil.model.Party;
import uk.gov.hmcts.reform.civil.model.citizenui.CaseDataLiP;
import uk.gov.hmcts.reform.civil.model.citizenui.ChooseHowToProceed;
import uk.gov.hmcts.reform.civil.model.citizenui.ClaimantLiPResponse;
import uk.gov.hmcts.reform.civil.model.citizenui.dto.ClaimantResponseOnCourtDecisionType;

import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

public class ClaimantRequestedJudgeToMakeNewPlanScenarioTest extends DashboardBaseIntegrationTest {

@Autowired
private ClaimantResponseNotificationHandler handler;

@Test
void should_create_claimant_requested_judgment_by_admission() throws Exception {
String caseId = "456567";

CaseData caseData = CaseData.builder()
.legacyCaseReference("reference")
.ccdCaseReference(Long.valueOf(caseId))
.caseDataLiP(CaseDataLiP.builder()
.applicant1LiPResponse(ClaimantLiPResponse.builder().applicant1ChoosesHowToProceed(
ChooseHowToProceed.REQUEST_A_CCJ).claimantResponseOnCourtDecision(
ClaimantResponseOnCourtDecisionType.JUDGE_REPAYMENT_DATE).build()).build())
.applicant1(Party.builder().type(Party.Type.INDIVIDUAL).individualTitle("Mr")
.individualFirstName("Claimant").build())
.respondent1(Party.builder().type(Party.Type.INDIVIDUAL).individualTitle("Mr").individualFirstName(
"Defendant").individualLastName("Guy").build())
.build();

handler.handle(callbackParams(caseData));

//Verify Notification is created
doGet(BEARER_TOKEN, GET_NOTIFICATIONS_URL, caseId, "CLAIMANT").andExpect(status().isOk()).andExpectAll(
status().is(HttpStatus.OK.value()),
jsonPath("$[0].titleEn").value(
"You requested a County Court Judgment against Mr Defendant Guy"),
jsonPath("$[0].descriptionEn").value(
"<p class=\"govuk-body\">You rejected the <a href=\"{VIEW_CCJ_REPAYMENT_PLAN_CLAIMANT}\" class=\"govuk-link\">repayment plan</a>.</p><p class=\"govuk-body\">When a judge has made a decision, we’ll post a copy of the judgment to you.</p>"),
jsonPath("$[0].titleCy").value(
"Rydych wedi gwneud cais am Ddyfarniad Llys Sirol yn erbyn Mr Defendant Guy"),
jsonPath("$[0].descriptionCy").value(
"<p class=\"govuk-body\">Rydych wedi gwrthod y <a href=\"{VIEW_CCJ_REPAYMENT_PLAN_CLAIMANT}\" class=\"govuk-link\">cynllun ad-dalu</a>.</p><p class=\"govuk-body\">Pan fydd barnwr wedi gwneud penderfyniad, byddwn yn anfon copi o’r dyfarniad drwy’r post atoch chi.</p>")
);
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,24 @@ void should_create_draft_claim_scenario() throws Exception {
jsonPath("$[5].currentStatusEn").value("Not available yet"),
jsonPath("$[6].taskNameEn").value("<a>View mediation documents</a>"),
jsonPath("$[6].currentStatusEn").value("Not available yet"),
jsonPath("$[7].taskNameEn").value("<a>View hearings</a>"),
jsonPath("$[7].taskNameEn").value("<a>View the hearing</a>"),
jsonPath("$[7].currentStatusEn").value("Not available yet"),
jsonPath("$[8].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[8].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[8].currentStatusEn").value("Not available yet"),
jsonPath("$[9].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[9].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[9].currentStatusEn").value("Not available yet"),
jsonPath("$[10].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[10].taskNameEn").value("<a>View documents</a>"),
jsonPath("$[10].currentStatusEn").value("Not available yet"),
jsonPath("$[11].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[11].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[11].currentStatusEn").value("Not available yet"),
jsonPath("$[12].taskNameEn").value("<a>View orders and notices</a>"),
jsonPath("$[12].taskNameEn").value("<a>View the bundle</a>"),
jsonPath("$[12].currentStatusEn").value("Not available yet"),
jsonPath("$[13].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[13].taskNameEn").value("<a>View orders and notices</a>"),
jsonPath("$[13].currentStatusEn").value("Not available yet"),
jsonPath("$[14].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[14].currentStatusEn").value("Not available yet")
jsonPath("$[14].taskNameEn").value("<a>View the judgment</a>"),
jsonPath("$[14].currentStatusEn").value("Not available yet"),
jsonPath("$[15].taskNameEn").value("<a>View applications</a>"),
jsonPath("$[15].currentStatusEn").value("Not available yet")

);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ void should_create_hearing_fee_unpaid_scenario() throws Exception {
.andExpectAll(
status().is(HttpStatus.OK.value()),
jsonPath("$[0].reference").value(caseId.toString()),
jsonPath("$[0].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[0].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[0].currentStatusEn").value("Inactive"),
jsonPath("$[1].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[1].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[1].currentStatusEn").value("Inactive"),
jsonPath("$[2].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[2].taskNameEn").value("<a>Add the trial arrangements</a>"),
jsonPath("$[2].currentStatusEn").value("Inactive")

);
}

Expand Down Expand Up @@ -106,9 +107,9 @@ void should_create_hearing_fee_unpaid_scenario_without_trial_arrangements_when_s
.andExpectAll(
status().is(HttpStatus.OK.value()),
jsonPath("$[0].reference").value(caseId.toString()),
jsonPath("$[0].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[0].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[0].currentStatusEn").value("Inactive"),
jsonPath("$[1].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[1].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[1].currentStatusEn").value("Inactive"),
jsonPath("$[2].currentStatusEn").doesNotHaveJsonPath()
);
Expand Down Expand Up @@ -149,9 +150,9 @@ void should_create_hearing_fee_unpaid_trial_ready_scenario() throws Exception {
.andExpectAll(
status().is(HttpStatus.OK.value()),
jsonPath("$[0].reference").value(caseId.toString()),
jsonPath("$[0].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[0].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[0].currentStatusEn").value("Inactive"),
jsonPath("$[1].taskNameEn").value("<a>Pay the hearing fee</a>"),
jsonPath("$[1].taskNameEn").value("<a>Upload hearing documents</a>"),
jsonPath("$[1].currentStatusEn").value("Inactive"),
jsonPath("$[2].currentStatusEn").doesNotHaveJsonPath()
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ void should_create_hearing_scheduled_scenario() throws Exception {
status().is(HttpStatus.OK.value()),
jsonPath("$[0].reference").value(caseId),
jsonPath("$[0].taskNameEn").value(
"<a href={VIEW_HEARINGS} rel=\"noopener noreferrer\" class=\"govuk-link\">View hearings</a>"),
"<a href={VIEW_HEARINGS} rel=\"noopener noreferrer\" class=\"govuk-link\">View the hearing</a>"),
jsonPath("$[0].currentStatusEn").value(TaskStatus.AVAILABLE.getName()),
jsonPath("$[0].taskNameCy").value(
"<a href={VIEW_HEARINGS} rel=\"noopener noreferrer\" class=\"govuk-link\">View hearings</a>"),
"<a href={VIEW_HEARINGS} rel=\"noopener noreferrer\" class=\"govuk-link\">View the hearing</a>"),
jsonPath("$[0].currentStatusCy").value(TaskStatus.AVAILABLE.getName()),
jsonPath("$[1].reference").value(caseId),
jsonPath("$[1].taskNameEn").value(
Expand Down
Loading

0 comments on commit d807f09

Please sign in to comment.