Skip to content

Commit

Permalink
refactor: make assertion work with javax and jakarta
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Feb 3, 2023
1 parent 0336ceb commit efe2985
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ public void testTextFieldValidation() {

private void testFieldOverflow(TextFieldElement textFieldElement) {
textFieldElement.setValue(IntStream.range(0, 256).mapToObj(i -> "A").collect(Collectors.joining()));
Assert.assertEquals("maximum length is 255 characters", getErrorMessage(textFieldElement));
String msg = getErrorMessage(textFieldElement);
Assert.assertTrue(msg.matches("(maximum length is 255 characters|size must be between 0 and 255)"));
}

private void testClearRequiredField(TextFieldElement textFieldElement) {
Expand Down

0 comments on commit efe2985

Please sign in to comment.