CARDS-2175: form-completion-status tests - #1453
Conversation
|
rebased on the latest FAILURE! - in io.uhndata.cards.formcompletionstatus.AnswerCompletionStatusEditorTest [ERROR] enterForFormNodeAddsDifferentStatusFlags(io.uhndata.cards.formcompletionstatus.AnswerCompletionStatusEditorTest) Time elapsed: 0.373 s <<< FAILURE! |
865c44d to
8befaf5
Compare
0590bc5 to
1e0606e
Compare
Modernize the revived tests and complete the module coverage to 100%: - migrate the tests to the current platform APIs: jakarta.json, Mockito 5, sling-mock 4 - drop the Mockito runner in favor of plain mocks with reflection injection, since concurrently running runners collide on Mockito's global listener registry under the parallel surefire configuration - raise the sling-mock resource resolver factory timeout, the default 500ms is not always enough when several Oak-backed test contexts start in parallel - add tests for the previously uncovered classes: RegExpValueValidator, RangeMinMaxAnswersValidator, and the AnswerValidator default methods - cover the previously untested paths: the includes/excludes comparator family, empty and multivalued operands, unknown comparators, nested answers and questions, broken conditional definitions and values, answer options and suggested-only limits in MinMaxValueValidator, submitted forms and conditional sections in the completion status editor - extend the date fallback in conditional values: fixed dates that are not in the strict JCR format are now parsed with the lenient supported formats instead of failing the comparison with a ClassCastException, in the spirit of the CARDS-2877 fix - remove dead code: the never-invoked debugging toString methods, an unreachable summarize catch block, and a stream reduce combiner that can never run on a sequential stream; guard against sections that belong to no questionnaire - rename the remaining vague test names and drop the meaningless constructor smoke test - remove the module's coverage exemption, restoring the default 1.00 required instruction coverage ratio
1e0606e to
0c3a1ec
Compare
| TEST_ANSWER_SECTION_NAME, answerSectionNodeBuilder.getNodeState())); | ||
| } | ||
|
|
||
| private NodeBuilder getFormNodeBuilderWithAnswerAndAnswerSectionChildren(Object answerValue) |
| assertFalse(evaluateConditionalWithBrokenFixedValue("date", "2023-01-01")); | ||
| } | ||
|
|
||
| private boolean evaluateConditionalWithBrokenFixedValue(final String dataType, final String comparableValue) |
No description provided.