Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RET-3188: Update Submission Reasons #52

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</input>
<input id="InputClause_0z98r1i" label="Submission Reason (Claimant)" biodi:width="212">
<inputExpression id="LiteralExpression_1ebb1do" typeRef="string">
<text>if(additionalData!=null and additionalData.Data!=null and additionalData.Data.genericTseApplicationCollection!=null and
<text>if(additionalData!=null and additionalData.Data!=null and additionalData.Data.genericTseApplicationCollection!=null and
count(additionalData.Data.genericTseApplicationCollection) &gt; 0)
then (reverse(additionalData.Data.genericTseApplicationCollection)[1]).value.type
else null</text>
Expand Down Expand Up @@ -687,9 +687,7 @@ else null</text>
<rule id="DecisionRule_01ceigg">
<inputEntry id="UnaryTests_1my06mo">
<text>"SUBMIT_CLAIMANT_TSE",
"CLAIMANT_TSE_RESPOND",
"respondentTSE",
"tseRespond"</text>
"CLAIMANT_TSE_RESPOND"</text>
</inputEntry>
<inputEntry id="UnaryTests_0n6e17i">
<text>"Accepted"</text>
Expand All @@ -704,7 +702,18 @@ else null</text>
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_070tybt">
<text></text>
<text>"Withdraw all/part of claim",
"Postpone a hearing",
"Vary/revoke an order",
"Consider a decision afresh",
"Amend my claim",
"Order respondent to do something",
"Order a witness to attend",
"Tell tribunal respondent not complied",
"Restrict publicity",
"Strike out all/part of response",
"Reconsider judgement",
"Contact about something else"</text>
</inputEntry>
<inputEntry id="UnaryTests_1lpacxp">
<text></text>
Expand All @@ -722,6 +731,52 @@ else null</text>
<text>"Application"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_13kxwo2">
<inputEntry id="UnaryTests_102z0ce">
<text>"respondentTSE",
"tseRespond"</text>
</inputEntry>
<inputEntry id="UnaryTests_0aggoos">
<text>"Accepted"</text>
</inputEntry>
<inputEntry id="UnaryTests_0xrr6wt">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1kq2anx">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_092b3dg">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_057bwbn">
<text></text>
</inputEntry>
<inputEntry id="UnaryTests_1p5id4s">
<text>"Amend response",
"Claimant not complied",
"Consider a decision afresh",
"Contact the tribunal",
"Order other party",
"Order a witness to attend to give evidence",
"Postpone a hearing",
"Reconsider judgement",
"Restrict publicity",
"Strike out all or part of a claim",
"Vary or revoke an order"</text>
</inputEntry>
<outputEntry id="LiteralExpression_1rzxzd9">
<text>"ContactTribunalWithAnApplication"</text>
</outputEntry>
<outputEntry id="LiteralExpression_1w8pyhw">
<text>"Contact Tribunal With An Application"</text>
</outputEntry>
<outputEntry id="LiteralExpression_091hz5k">
<text></text>
</outputEntry>
<outputEntry id="LiteralExpression_0p5w9w2">
<text>"Application"</text>
</outputEntry>
</rule>
<rule id="DecisionRule_06u0rar">
<inputEntry id="UnaryTests_1wnkgbd">
<text>"SUBMIT_CLAIMANT_TSE"</text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,11 @@ public static Stream<Arguments> scenarioProvider() {
Arguments.of(
"CLAIMANT_TSE_RESPOND",
"Accepted",
null,
mapAdditionalData("{\n"
+ " \"Data\":{\n"
+ CLAIMANT_REASON_AMEND
+ " }"
+ "}"),
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
Expand Down Expand Up @@ -369,7 +373,11 @@ public static Stream<Arguments> scenarioProvider() {
Arguments.of(
"tseRespond",
"Accepted",
null,
mapAdditionalData("{\n"
+ " \"Data\":{\n"
+ RESPONDENT_REASON_AMEND
+ " }"
+ "}"),
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
Expand All @@ -392,11 +400,6 @@ public static Stream<Arguments> scenarioProvider() {
+ " }"
+ "}"),
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
"Contact Tribunal With An Application",
"Application"
),
mapExpectedOutput(
"AmendPartyDetails",
"Amend Party Details",
Expand All @@ -409,11 +412,6 @@ public static Stream<Arguments> scenarioProvider() {
"Accepted",
null,
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
"Contact Tribunal With An Application",
"Application"
),
mapExpectedOutput(
"AmendPartyDetails",
"Amend Party Details",
Expand All @@ -425,16 +423,11 @@ public static Stream<Arguments> scenarioProvider() {
"respondentTSE",
"Accepted",
mapAdditionalData("{\n"
+ " \"Data\":{\n"
+ RESPONDENT_REASON_PERSONALDETAILS
+ " }"
+ "}"),
+ " \"Data\":{\n"
+ RESPONDENT_REASON_PERSONALDETAILS
+ " }"
+ "}"),
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
"Contact Tribunal With An Application",
"Application"
),
mapExpectedOutput(
"AmendPartyDetails",
"Amend Party Details",
Expand All @@ -447,11 +440,6 @@ public static Stream<Arguments> scenarioProvider() {
"Accepted",
null,
List.of(
mapExpectedOutput(
"ContactTribunalWithAnApplication",
"Contact Tribunal With An Application",
"Application"
),
mapExpectedOutput(
"AmendPartyDetails",
"Amend Party Details",
Expand Down Expand Up @@ -482,7 +470,7 @@ void given_input_should_return_outcome_dmn(String eventId,
void if_this_test_fails_needs_updating_with_your_changes() {
//The purpose of this test is to prevent adding new rows without being tested
DmnDecisionTableImpl logic = (DmnDecisionTableImpl) decision.getDecisionLogic();
assertThat(logic.getRules().size(), is(23));
assertThat(logic.getRules().size(), is(24));
}

private static Map<String, String> mapExpectedOutput(String taskId, String name, String processCategories) {
Expand Down