From caa692e5a5981fef306a221d7876efbae0006989 Mon Sep 17 00:00:00 2001 From: sstewart <202802468+scottstewart-sl@users.noreply.github.com> Date: Sat, 16 May 2026 08:09:03 +0100 Subject: [PATCH 1/5] HDPI-6028: Help with Fees screens --- .../hmcts/reform/pcs/ccd/ShowConditions.java | 4 ++ .../ccd/domain/genapp/XuiGenAppRequest.java | 11 ++- .../ccd/event/genapp/MakeAnApplication.java | 6 ++ .../AppliedForHelpWithFees.java | 34 ++++++++++ .../ChooseAnApplication.java | 1 + .../HearingInNext14Days.java | 18 ++++- .../makeanapplication/HelpWithFeesNeeded.java | 37 +++++++--- .../MustApplyForHelpWithFees.java | 67 +++++++++++++++++++ .../reform/pcs/ccd/ShowConditionsTest.java | 24 +++++++ .../event/genapp/MakeAnApplicationTest.java | 14 ++++ .../HearingInNext14DaysTest.java | 40 +++++++++++ .../MustApplyForHelpWithFeesTest.java | 33 +++++++++ 12 files changed, 278 insertions(+), 11 deletions(-) create mode 100644 src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java create mode 100644 src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java create mode 100644 src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14DaysTest.java create mode 100644 src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFeesTest.java diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditions.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditions.java index b83b1d069d..42aedb0147 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditions.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditions.java @@ -25,4 +25,8 @@ public static String fieldContains(String fieldId, Enum value) { return "%sCONTAINS\"%s\"".formatted(fieldId, value.name()); } + public static String and(String... conditions) { + return String.join(" AND ", conditions); + } + } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/genapp/XuiGenAppRequest.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/genapp/XuiGenAppRequest.java index 70279b0760..a97d1c49fb 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/genapp/XuiGenAppRequest.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/domain/genapp/XuiGenAppRequest.java @@ -29,9 +29,15 @@ public class XuiGenAppRequest implements GenAppRequest { @CCD(label = "Does the defendant need help paying the fee for this application?") private VerticalYesNo needHwf; + @CCD(label = "Have they already applied for help with their application fee?") private VerticalYesNo appliedForHwf; - @CCD(max = 100) + @CCD( + label = "Enter their Help with Fees reference number", + hint = "The defendant will have received this number when they applied for Help with Fees. This reference " + + "must not have been used for a previous application. For example, HWF-A1B-23C", + max = 60 + ) private String hwfReference; private VerticalYesNo otherPartiesAgreed; @@ -57,4 +63,7 @@ public class XuiGenAppRequest implements GenAppRequest { @CCD(searchable = false) private String maxFee; + @CCD(searchable = false) + private VerticalYesNo showHwfScreens; + } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplication.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplication.java index f1c328295a..85bda0de10 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplication.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplication.java @@ -19,10 +19,12 @@ import uk.gov.hmcts.reform.pcs.ccd.entity.GenAppEntity; import uk.gov.hmcts.reform.pcs.ccd.entity.PcsCaseEntity; import uk.gov.hmcts.reform.pcs.ccd.entity.party.PartyEntity; +import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.AppliedForHelpWithFees; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.ChooseAnApplication; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.DocumentUploadWanted; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.HearingInNext14Days; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.HelpWithFeesNeeded; +import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.MustApplyForHelpWithFees; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.OtherPartiesAgreed; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.SelectParty; import uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication.StartAdjourn; @@ -81,6 +83,8 @@ public void configureDecentralised(DecentralisedConfigBuilder eventPayload) { applyApplicationFeeAmounts(caseData); + caseData.getXuiGenAppRequest().setShowHwfScreens(VerticalYesNo.YES); + return caseData; } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java new file mode 100644 index 0000000000..a63edd434f --- /dev/null +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java @@ -0,0 +1,34 @@ +package uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import uk.gov.hmcts.reform.pcs.ccd.ShowConditions; +import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; +import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; +import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo; +import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.XuiGenAppRequest; + +import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.fieldEquals; + +@Slf4j +@AllArgsConstructor +public class AppliedForHelpWithFees implements CcdPageConfiguration { + + @Override + public void addTo(PageBuilder pageBuilder) { + pageBuilder + .page("appliedForHelpWithFees") + .pageLabel("Have they already applied for help with their application fee?") + .showCondition(ShowConditions.and( + fieldEquals("xui_genapp_ShowHwfScreens", VerticalYesNo.YES), + fieldEquals("xui_genapp_NeedHwf", VerticalYesNo.YES) + )) + .label("appliedForHelpWithFees-lineSeparator", "---") + .complex(PCSCase::getXuiGenAppRequest) + .mandatory(XuiGenAppRequest::getAppliedForHwf) + .mandatory(XuiGenAppRequest::getHwfReference, fieldEquals("xui_genapp_AppliedForHwf", VerticalYesNo.YES)) + .done(); + } + +} diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/ChooseAnApplication.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/ChooseAnApplication.java index 75001ba471..16a9d60ab6 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/ChooseAnApplication.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/ChooseAnApplication.java @@ -45,6 +45,7 @@ public void addTo(PageBuilder pageBuilder) { .complex(PCSCase::getXuiGenAppRequest) .readonly(XuiGenAppRequest::getStandardFee, NEVER_SHOW, true) .readonly(XuiGenAppRequest::getMaxFee, NEVER_SHOW, true) + .readonly(XuiGenAppRequest::getShowHwfScreens, NEVER_SHOW, true) .mandatory(XuiGenAppRequest::getApplicationType) .done(); } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14Days.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14Days.java index 96c157a171..91c446bab9 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14Days.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14Days.java @@ -2,9 +2,12 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import uk.gov.hmcts.ccd.sdk.api.CaseDetails; +import uk.gov.hmcts.ccd.sdk.api.callback.AboutToStartOrSubmitResponse; import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.State; import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.GenAppType; import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.XuiGenAppRequest; @@ -17,7 +20,7 @@ public class HearingInNext14Days implements CcdPageConfiguration { @Override public void addTo(PageBuilder pageBuilder) { pageBuilder - .page("hearingInNext14Days") + .page("hearingInNext14Days", this::midEvent) .pageLabel("Is the defendant’s court hearing in the next 14 days?") .showCondition(fieldEquals("xui_genapp_ApplicationType", GenAppType.ADJOURN)) .label("hearingInNext14Days-lineSeparator", "---") @@ -26,4 +29,17 @@ public void addTo(PageBuilder pageBuilder) { .done(); } + private AboutToStartOrSubmitResponse midEvent(CaseDetails details, + CaseDetails detailsBefore) { + + PCSCase caseData = details.getData(); + XuiGenAppRequest xuiGenAppRequest = caseData.getXuiGenAppRequest(); + + xuiGenAppRequest.setShowHwfScreens(xuiGenAppRequest.getWithin14Days()); + + return AboutToStartOrSubmitResponse.builder() + .data(caseData) + .build(); + } + } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java index 5878e1ac1c..cbdbe7eec0 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java @@ -4,19 +4,34 @@ import lombok.extern.slf4j.Slf4j; import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; +import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo; +import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.XuiGenAppRequest; + +import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.fieldEquals; @Slf4j @AllArgsConstructor public class HelpWithFeesNeeded implements CcdPageConfiguration { - private static final String PLACEHOLDER = """ -
-
-

- Placeholder -

-
-
+ private static final String INFO_MARKDOWN = """ +

It usually costs ${xui_genapp_StandardFee} to apply. The fee will + increase to ${xui_genapp_MaxFee} if:

+
    +
  • the defendant has already told the other party that they are making + this application, and
  • +
  • the other party did not agree to it + (this means that they objected to it)
  • +
+

You’ll see the final application fee before you pay.

+ +

The defendant may be able to get help paying the fee + if they (one or more of the following):

+
    +
  • are on certain benefits
  • +
  • have little or no savings
  • +
  • have low income
  • +
"""; @Override @@ -24,8 +39,12 @@ public void addTo(PageBuilder pageBuilder) { pageBuilder .page("helpWithFeesNeeded") .pageLabel("Confirm if the defendant needs help paying fees") + .showCondition(fieldEquals("xui_genapp_ShowHwfScreens", VerticalYesNo.YES)) .label("helpWithFeesNeeded-lineSeparator", "---") - .label("helpWithFeesNeeded-placeholder", PLACEHOLDER); + .label("helpWithFeesNeeded-info", INFO_MARKDOWN) + .complex(PCSCase::getXuiGenAppRequest) + .mandatory(XuiGenAppRequest::getNeedHwf) + .done(); } } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java new file mode 100644 index 0000000000..e25ab564f0 --- /dev/null +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java @@ -0,0 +1,67 @@ +package uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import uk.gov.hmcts.ccd.sdk.api.CaseDetails; +import uk.gov.hmcts.ccd.sdk.api.callback.AboutToStartOrSubmitResponse; +import uk.gov.hmcts.reform.pcs.ccd.ShowConditions; +import uk.gov.hmcts.reform.pcs.ccd.common.CcdPageConfiguration; +import uk.gov.hmcts.reform.pcs.ccd.common.PageBuilder; +import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.State; +import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo; + +import static uk.gov.hmcts.reform.pcs.ccd.ShowConditions.fieldEquals; + +@Slf4j +@AllArgsConstructor +public class MustApplyForHelpWithFees implements CcdPageConfiguration { + + private static final String INFO_MARKDOWN = """ +

+ The defendant needs to apply for Help with Fees (GOV.UK, opens in new tab) + before you can continue with this application. If you are applying for Help with Fees on the defendant’s + behalf, you should do that now before you continue with this application. +

+

+ Enter the court form number 'N244' when asked. This will be one of the first questions + when you (or they) apply for Help with Fees. +

+

+ After you (or they) have applied you (or they) will receive a Help With Fees reference number. + Enter the reference number when you return to this application. +

+

+ If they receive any benefit that qualifies them for Help with Fees, you (or they) must include + evidence of it when you (or they) apply online for Help with Fees. +

+

+ If you already have their Help with Fees reference number, you can return to the previous screen + and enter it there. +

+ """; + + @Override + public void addTo(PageBuilder pageBuilder) { + pageBuilder + .page("mustApplyForHelpWithFees", this::midEvent) + .pageLabel("The defendant needs to apply for help with their application fee") + .showCondition(ShowConditions.and( + fieldEquals("xui_genapp_ShowHwfScreens", VerticalYesNo.YES), + fieldEquals("xui_genapp_NeedHwf", VerticalYesNo.YES), + fieldEquals("xui_genapp_AppliedForHwf", VerticalYesNo.NO) + )) + .label("mustApplyForHelpWithFees-lineSeparator", "---") + .label("mustApplyForHelpWithFees-placeholder", INFO_MARKDOWN); + } + + private AboutToStartOrSubmitResponse midEvent(CaseDetails details, + CaseDetails detailsBefore) { + + return AboutToStartOrSubmitResponse.builder() + .errorMessageOverride("You cannot continue until you have their reference number for Help with Fees") + .build(); + } + +} diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditionsTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditionsTest.java index e8f82dbd1e..f3633a6b9b 100644 --- a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditionsTest.java +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/ShowConditionsTest.java @@ -1,8 +1,14 @@ package uk.gov.hmcts.reform.pcs.ccd; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; import uk.gov.hmcts.reform.pcs.ccd.domain.State; +import java.util.List; +import java.util.stream.Stream; + import static org.assertj.core.api.Assertions.assertThat; class ShowConditionsTest { @@ -39,6 +45,24 @@ void shouldCreateShowConditionForFieldContains() { assertThat(showCondition).isEqualTo("testFieldId1CONTAINS\"BLUE\""); } + @ParameterizedTest + @MethodSource("joinWithAndScenarios") + void shouldJoinShowConditionWithAnd(List showConditionsToJoin, String expectedJoinedShowConditions) { + String showCondition = ShowConditions.and(showConditionsToJoin.toArray(new String[0])); + + assertThat(showCondition).isEqualTo(expectedJoinedShowConditions); + } + + private static Stream joinWithAndScenarios() { + return Stream.of( + // Show conditions to join, expected joined show condition + Arguments.argumentSet("no params", List.of(), ""), + Arguments.argumentSet("one param", List.of("a"), "a"), + Arguments.argumentSet("two params", List.of("a", "b"), "a AND b"), + Arguments.argumentSet("three params", List.of("a", "b", "c"), "a AND b AND c") + ); + } + private enum TestEnum { RED, GREEN, diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java index e7ffeadfac..842b6cfe9e 100644 --- a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java @@ -193,6 +193,20 @@ void shouldSetTheApplicationFees() { feeSetterCaptor.getValue().accept(caseData, formattedMaxFee); assertThat(caseData.getXuiGenAppRequest().getMaxFee()).isEqualTo(formattedMaxFee); } + + @Test + void shouldShowHwfScreensFlagToYes() { + // Given + PCSCase caseData = PCSCase.builder() + .xuiGenAppRequest(XuiGenAppRequest.builder().build()) + .build(); + + // When + callStartHandler(caseData); + + // Then + assertThat(caseData.getXuiGenAppRequest().getShowHwfScreens()).isEqualTo(VerticalYesNo.YES); + } } @Nested diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14DaysTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14DaysTest.java new file mode 100644 index 0000000000..307f9de954 --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HearingInNext14DaysTest.java @@ -0,0 +1,40 @@ +package uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; +import uk.gov.hmcts.ccd.sdk.api.callback.AboutToStartOrSubmitResponse; +import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.State; +import uk.gov.hmcts.reform.pcs.ccd.domain.VerticalYesNo; +import uk.gov.hmcts.reform.pcs.ccd.domain.genapp.XuiGenAppRequest; +import uk.gov.hmcts.reform.pcs.ccd.page.BasePageTest; + +import static org.assertj.core.api.Assertions.assertThat; + +class HearingInNext14DaysTest extends BasePageTest { + + @BeforeEach + void setUp() { + setPageUnderTest(new HearingInNext14Days()); + } + + @ParameterizedTest + @EnumSource(value = VerticalYesNo.class) + void shouldSetShowHwfScreens(VerticalYesNo hearingWithinNext14Days) { + // Given + PCSCase caseData = PCSCase.builder() + .xuiGenAppRequest(XuiGenAppRequest.builder() + .within14Days(hearingWithinNext14Days) + .build()) + .build(); + + // When + AboutToStartOrSubmitResponse response = callMidEventHandler(caseData); + + // Then + PCSCase updatedCaseData = response.getData(); + assertThat(updatedCaseData.getXuiGenAppRequest().getShowHwfScreens()).isEqualTo(hearingWithinNext14Days); + } + +} diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFeesTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFeesTest.java new file mode 100644 index 0000000000..31df897d3e --- /dev/null +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFeesTest.java @@ -0,0 +1,33 @@ +package uk.gov.hmcts.reform.pcs.ccd.page.makeanapplication; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import uk.gov.hmcts.ccd.sdk.api.callback.AboutToStartOrSubmitResponse; +import uk.gov.hmcts.reform.pcs.ccd.domain.PCSCase; +import uk.gov.hmcts.reform.pcs.ccd.domain.State; +import uk.gov.hmcts.reform.pcs.ccd.page.BasePageTest; + +import static org.assertj.core.api.Assertions.assertThat; + +class MustApplyForHelpWithFeesTest extends BasePageTest { + + @BeforeEach + void setUp() { + setPageUnderTest(new MustApplyForHelpWithFees()); + } + + @Test + void shouldAlwaysReturnErrorFromMidEvent() { + // Given + PCSCase caseData = PCSCase.builder() + .build(); + + // When + AboutToStartOrSubmitResponse response = callMidEventHandler(caseData); + + // Then + assertThat(response.getErrorMessageOverride()) + .isEqualTo("You cannot continue until you have their reference number for Help with Fees"); + } + +} From 94e445da9617b419f9af3af69a109f955ec7fd7c Mon Sep 17 00:00:00 2001 From: sstewart <202802468+scottstewart-sl@users.noreply.github.com> Date: Sat, 16 May 2026 09:56:14 +0100 Subject: [PATCH 2/5] HDPI-6028: Fix unit test --- .../reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java index 842b6cfe9e..df29a7d752 100644 --- a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java @@ -105,6 +105,7 @@ void shouldSetRepresentedPartiesFieldWhenUserRepresentsOne() { .thenReturn(Optional.of(expectedPartyNameList)); PCSCase caseData = PCSCase.builder() + .xuiGenAppRequest(XuiGenAppRequest.builder().build()) .build(); // When @@ -133,6 +134,7 @@ void shouldSetMultipleRepresentedPartiesFlag(int numRepresentedParties, Vertical .thenReturn(Optional.of(expectedPartyNameList)); PCSCase caseData = PCSCase.builder() + .xuiGenAppRequest(XuiGenAppRequest.builder().build()) .build(); // When @@ -160,6 +162,7 @@ void shouldNotSetRepresentedPartiesFieldWhenUserDoesNotRepresentAny() { .thenReturn(Optional.empty()); PCSCase caseData = PCSCase.builder() + .xuiGenAppRequest(XuiGenAppRequest.builder().build()) .build(); // When From 3e8149ea0f2c1234d656b67786796e82403131c5 Mon Sep 17 00:00:00 2001 From: sstewart <202802468+scottstewart-sl@users.noreply.github.com> Date: Tue, 19 May 2026 08:14:04 +0100 Subject: [PATCH 3/5] HDPI-6028: Gen app - HWF content tweaks Signed-off-by: sstewart <202802468+scottstewart-sl@users.noreply.github.com> --- .../AppliedForHelpWithFees.java | 32 ++++++++++++++++++- .../makeanapplication/HelpWithFeesNeeded.java | 4 +-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java index a63edd434f..e5af17f393 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java @@ -19,7 +19,7 @@ public class AppliedForHelpWithFees implements CcdPageConfiguration { public void addTo(PageBuilder pageBuilder) { pageBuilder .page("appliedForHelpWithFees") - .pageLabel("Have they already applied for help with their application fee?") + .pageLabel("Confirm if they have they already applied for help with their application fee") .showCondition(ShowConditions.and( fieldEquals("xui_genapp_ShowHwfScreens", VerticalYesNo.YES), fieldEquals("xui_genapp_NeedHwf", VerticalYesNo.YES) @@ -31,4 +31,34 @@ public void addTo(PageBuilder pageBuilder) { .done(); } + /* + + MyHMCTS +Manage cases +Sign out +Case list +Create case +Find case +PROTOTYPE +This is a new service – your feedback will help us to improve it. +Make an application +Confirm if they have they already applied for help with their +application fee +Case number: 1234-5678-9101-1121 +15 Garden Drive, Luton, Bedfordshire, LU1 1AB +Warrant number: 123456789 +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et massa mi. Aliquam in hendrerit urna. +Have they already applied for help with their application fee? +Label +This will affect the fee you will invoice to the defendant. They will not need to pay a fee if their court hearing is (at least) 14 days away. +Yes +No +Previous +Continue +Cancel +All content is available under the Open Government Licence v3.0, except where otherwise stated +© Crown copyright + + */ + } diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java index cbdbe7eec0..2732d3fc9c 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/HelpWithFeesNeeded.java @@ -15,7 +15,7 @@ public class HelpWithFeesNeeded implements CcdPageConfiguration { private static final String INFO_MARKDOWN = """ -

It usually costs ${xui_genapp_StandardFee} to apply. The fee will +

It usually costs ${xui_genapp_StandardFee} to apply. The fee will increase to ${xui_genapp_MaxFee} if:

  • the defendant has already told the other party that they are making @@ -25,7 +25,7 @@ public class HelpWithFeesNeeded implements CcdPageConfiguration {

You’ll see the final application fee before you pay.

-

The defendant may be able to get help paying the fee +

The defendant may be able to get help paying the fee if they (one or more of the following):

  • are on certain benefits
  • From c4ebfae8a34fae8b70c40e7c67d6b549c0865ca9 Mon Sep 17 00:00:00 2001 From: sstewart <202802468+scottstewart-sl@users.noreply.github.com> Date: Tue, 19 May 2026 08:35:18 +0100 Subject: [PATCH 4/5] HDPI-6028: Remove comment accidentally left in Signed-off-by: sstewart <202802468+scottstewart-sl@users.noreply.github.com> --- .../AppliedForHelpWithFees.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java index e5af17f393..1231b04742 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/AppliedForHelpWithFees.java @@ -31,34 +31,4 @@ public void addTo(PageBuilder pageBuilder) { .done(); } - /* - - MyHMCTS -Manage cases -Sign out -Case list -Create case -Find case -PROTOTYPE -This is a new service – your feedback will help us to improve it. -Make an application -Confirm if they have they already applied for help with their -application fee -Case number: 1234-5678-9101-1121 -15 Garden Drive, Luton, Bedfordshire, LU1 1AB -Warrant number: 123456789 -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et massa mi. Aliquam in hendrerit urna. -Have they already applied for help with their application fee? -Label -This will affect the fee you will invoice to the defendant. They will not need to pay a fee if their court hearing is (at least) 14 days away. -Yes -No -Previous -Continue -Cancel -All content is available under the Open Government Licence v3.0, except where otherwise stated -© Crown copyright - - */ - } From e2cfc7798dc69cb0a15f0fe179211bcbc69fcb8d Mon Sep 17 00:00:00 2001 From: sstewart <202802468+scottstewart-sl@users.noreply.github.com> Date: Wed, 20 May 2026 17:35:02 +0100 Subject: [PATCH 5/5] HDPI-6028: Update label name and test name --- .../ccd/page/makeanapplication/MustApplyForHelpWithFees.java | 2 +- .../reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java index e25ab564f0..5dcabdf425 100644 --- a/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java +++ b/src/main/java/uk/gov/hmcts/reform/pcs/ccd/page/makeanapplication/MustApplyForHelpWithFees.java @@ -53,7 +53,7 @@ public void addTo(PageBuilder pageBuilder) { fieldEquals("xui_genapp_AppliedForHwf", VerticalYesNo.NO) )) .label("mustApplyForHelpWithFees-lineSeparator", "---") - .label("mustApplyForHelpWithFees-placeholder", INFO_MARKDOWN); + .label("mustApplyForHelpWithFees-info", INFO_MARKDOWN); } private AboutToStartOrSubmitResponse midEvent(CaseDetails details, diff --git a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java index df29a7d752..3cbc11fd39 100644 --- a/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java +++ b/src/test/java/uk/gov/hmcts/reform/pcs/ccd/event/genapp/MakeAnApplicationTest.java @@ -198,7 +198,7 @@ void shouldSetTheApplicationFees() { } @Test - void shouldShowHwfScreensFlagToYes() { + void shouldSetShowHwfScreensFlagToYes() { // Given PCSCase caseData = PCSCase.builder() .xuiGenAppRequest(XuiGenAppRequest.builder().build())