Skip to content

Commit

Permalink
Changes some "true"s to true. Removes some unnecessary changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bseeger committed Oct 12, 2023
1 parent 55bd8fb commit 4485490
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public void modelIncludesCurrentSubflowItem() throws Exception {
submission.setInputData(Map.of("testSubflow", List.of(subflowItem)));
getPageExpectingSuccess("subflowAddItem/aaa-bbb-ccc");
}

}

@Nested
Expand Down Expand Up @@ -246,6 +245,4 @@ public void fieldsStillHaveValuesWhenFieldValidationFailsInSubflowPage2() throws
assertEquals("Radio B", page2.getRadioValue("radioInputSubflowPage2"));
assertEquals("Select C", page2.getSelectValue("selectInputSubflowPage2"));
}


}
26 changes: 13 additions & 13 deletions src/test/java/formflow/library/pdf/SubflowFieldPreparersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,42 +50,42 @@ void shouldNotMapIterationsInASubflowGreaterThanMaxIterations() {
iteration1.put("foo", "the foo 1");
iteration1.put("bar", "the bar 1");
iteration1.put("uuid", "uuid1");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration2 = new HashMap<>();
iteration2.put("foo", "the foo 2");
iteration2.put("bar", "the bar 2");
iteration2.put("uuid", "uuid2");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration3 = new HashMap<>();
iteration3.put("foo", "the foo 3");
iteration3.put("bar", "the bar 3");
iteration3.put("uuid", "uuid3");
iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration4 = new HashMap<>();
iteration4.put("foo", "the foo 4");
iteration4.put("bar", "the bar 4");
iteration4.put("uuid", "uuid4");
iteration4.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration4.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration5 = new HashMap<>();
iteration5.put("foo", "the foo 5");
iteration5.put("bar", "the bar 5");
iteration5.put("uuid", "uuid5");
iteration5.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration5.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration6 = new HashMap<>();
iteration6.put("foo", "the foo 6");
iteration6.put("bar", "the bar 6");
iteration6.put("uuid", "uuid6");
iteration6.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration6.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration7 = new HashMap<>();
iteration7.put("foo", "the foo 7");
iteration7.put("bar", "the bar 7");
iteration7.put("uuid", "uuid7");
iteration7.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration7.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration8 = new HashMap<>();
iteration8.put("foo", "the foo 8");
iteration8.put("bar", "the bar 8");
iteration8.put("uuid", "uuid8");
iteration8.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration8.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
submission = Submission.builder().flow("flow1")
.inputData(
Map.of(
Expand Down Expand Up @@ -130,17 +130,17 @@ void submissionWithLessIterationsThanMaxIterationsShouldOnlyMapExistingIteration
iteration1.put("foo", "the foo 1");
iteration1.put("bar", "the bar 1");
iteration1.put("uuid", "uuid1");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration2 = new HashMap<>();
iteration2.put("foo", "the foo 2");
iteration2.put("bar", "the bar 2");
iteration2.put("uuid", "uuid2");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration3 = new HashMap<>();
iteration3.put("foo", "the foo 3");
iteration3.put("bar", "the bar 3");
iteration3.put("uuid", "uuid3");
iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration3.put(Submission.ITERATION_IS_COMPLETE_KEY, true);

submission = Submission.builder().flow("flow1")
.inputData(
Expand Down Expand Up @@ -177,13 +177,13 @@ void shouldAddCorrectSuffixForCheckboxFieldsInSubflows() {
iteration1.put("bar", "the bar 1");
iteration1.put("checkboxInput[]", List.of("item1", "item2", "item3"));
iteration1.put("uuid", "uuid1");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration1.put(Submission.ITERATION_IS_COMPLETE_KEY, true);
Map<String, Object> iteration2 = new HashMap<>();
iteration2.put("foo", "the foo 2");
iteration2.put("bar", "the bar 2");
iteration2.put("checkboxInput[]", List.of("item1", "item2", "item3"));
iteration2.put("uuid", "uuid2");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, "true");
iteration2.put(Submission.ITERATION_IS_COMPLETE_KEY, true);

submission = Submission.builder().flow("flow1")
.inputData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ void shouldSetCreatedAtAndUpdatedAtFields() {
assertThat(updatedSubmission.getUpdatedAt()).isInThePast();
assertThat(updatedSubmission.getUpdatedAt()).isNotEqualTo(savedSubmission.getUpdatedAt());
}
}
}

0 comments on commit 4485490

Please sign in to comment.