@Test public void testShowAndHideTimeEditor() { calendar.setDateTime(todayMidday.plusMonths(1)); TimeEditor timeEditor = calendar.getPopup().getFooterControls().getTimeEditor(); executeJSFromElement(showTimeEditor); Graphene.waitGui() .withMessage("time editor should be visible") .until(timeEditor.isVisibleCondition()); executeJSFromElement(hideTimeEditor); Graphene.waitGui() .withMessage("time editor should not be visible") .until(timeEditor.isNotVisibleCondition()); }
@Test @RegressionTest({ "https://issues.jboss.org/browse/RF-9837", "https://issues.jboss.org/browse/RF-10085" }) public void testDefaultTime() { final String t = "06:06"; calendarAttributes.set(CalendarAttributes.defaultTime, t); setCurrentDateWithCalendarsTodayButtonAction.perform(); String text = calendar.openPopup().getFooterControls().getTimeEditorOpenerElement().getText(); assertTrue(text.equals(t), "Default time"); // another check in time editor TimeEditor timeEditor = calendar.openPopup().getFooterControls().openTimeEditor(); DateTime setTime = timeEditor.getTime(); DateTime reference = todayMidday.withHourOfDay(6).withMinuteOfHour(6); assertEquals(setTime.getHourOfDay(), reference.getHourOfDay()); assertEquals(setTime.getMinuteOfHour(), reference.getMinuteOfHour()); }