From 9966a9d4f9b17161f28fd24e6ab33163d74eb431 Mon Sep 17 00:00:00 2001 From: LeonardoPalmeiro <93268657+LeonardoPalmeiro@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:28:57 +0000 Subject: [PATCH] CIV-15815 remove logic to show the pay the additional fee button (#1616) * remove logic to show the pay the additional fee button * simplified if --------- Co-authored-by: sankhajuria --- .../reform/civil/service/JudicialDecisionHelper.java | 8 ++------ .../reform/civil/service/JudicialDecisionHelperTest.java | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelper.java b/src/main/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelper.java index fab69135e..9c311796b 100644 --- a/src/main/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelper.java +++ b/src/main/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelper.java @@ -64,12 +64,8 @@ public boolean isApplicationUncloakedWithAdditionalFee(CaseData caseData) { } public boolean containsTypesNeedNoAdditionalFee(CaseData caseData) { - if (caseData.getGeneralAppType().getTypes().size() == 1 + return caseData.getGeneralAppType().getTypes().size() == 1 && caseData.getGeneralAppType().getTypes() - .contains(GeneralApplicationTypes.SET_ASIDE_JUDGEMENT)) { - return true; - } - return caseData.getGeneralAppType().getTypes() - .contains(GeneralApplicationTypes.VARY_ORDER); + .contains(GeneralApplicationTypes.SET_ASIDE_JUDGEMENT); } } diff --git a/src/test/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelperTest.java b/src/test/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelperTest.java index 6aae362e2..a283e809d 100644 --- a/src/test/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelperTest.java +++ b/src/test/java/uk/gov/hmcts/reform/civil/service/JudicialDecisionHelperTest.java @@ -325,7 +325,7 @@ void shouldReturnTrue_WhenApplicationIsUncloakedTypeRequestMoreInformation_has_v .types(List.of(VARY_ORDER, EXTEND_TIME)) .build()) .build(); - assertThat(helper.containsTypesNeedNoAdditionalFee(caseData)).isTrue(); + assertThat(helper.containsTypesNeedNoAdditionalFee(caseData)).isFalse(); } }