From e403d18e3eba83a5dd73c27b1095d1cd8d098e6e Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Mon, 26 Aug 2024 11:09:46 -0400 Subject: [PATCH] Fix #1956: improve assertion of bean validation error --- .../tck/faces/test/servlet50/beanValidation/Issue5171IT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tck/faces40/beanValidation/src/test/java/ee/jakarta/tck/faces/test/servlet50/beanValidation/Issue5171IT.java b/tck/faces40/beanValidation/src/test/java/ee/jakarta/tck/faces/test/servlet50/beanValidation/Issue5171IT.java index 6e500aebf2..ee30706fc7 100644 --- a/tck/faces40/beanValidation/src/test/java/ee/jakarta/tck/faces/test/servlet50/beanValidation/Issue5171IT.java +++ b/tck/faces40/beanValidation/src/test/java/ee/jakarta/tck/faces/test/servlet50/beanValidation/Issue5171IT.java @@ -39,8 +39,8 @@ public void test() throws Exception { page = page.getElementById("form:submit").click(); String simpleInputMessage = page.getElementById("form:simpleInputMessage").asNormalizedText(); String compositeInputMessage = page.getElementById("form:compositeInputMessage").asNormalizedText(); - assertEquals("simple input must trigger bean validation and show message", "must not be empty", simpleInputMessage); - assertEquals("composite input must trigger bean validation and show message", "must not be empty", compositeInputMessage); + assertTrue("simple input must trigger bean validation and show message", simpleInputMessage.endsWith("must not be empty")); + assertTrue("composite input must trigger bean validation and show message", compositeInputMessage.endsWith("must not be empty")); HtmlTextInput simpleInput = (HtmlTextInput) page.getElementById("form:simpleInput"); HtmlTextInput compositeInput = (HtmlTextInput) page.getElementById("form:composite:input");