@Test public void testRequiredMessage() { String msg = "RichFaces 4"; calendarAttributes.set(CalendarAttributes.requiredMessage, msg); calendarAttributes.set(CalendarAttributes.required, Boolean.TRUE); submitWithA4jSubmitBtn(); assertTrue(message.advanced().isVisible()); assertEquals(message.getDetail(), msg); }
@Test @UseWithField(field = "booleanValue", valuesFrom = FROM_FIELD, value = "booleans") public void testRequired() { calendarAttributes.set(CalendarAttributes.required, booleanValue); submitWithA4jSubmitBtn(); if (booleanValue) { assertTrue(message.advanced().isVisible()); assertEquals(message.getDetail(), "value is required"); } else { assertFalse(message.advanced().isVisible()); } }
@Test @RegressionTest("https://issues.jboss.org/browse/RF-11313") public void testConverterMessage() { String errorMsg = "conversion error"; calendarAttributes.set(CalendarAttributes.enableManualInput, Boolean.TRUE); calendarAttributes.set(CalendarAttributes.converterMessage, errorMsg); popupCalendar.getInput().sendKeys("RF 4"); submitWithA4jSubmitBtn(); message.advanced().waitUntilMessageIsVisible().perform(); assertEquals(message.getDetail(), errorMsg); }