use of org.mifos.test.acceptance.framework.TimeMachinePage in project head by mifos.
the class SystemInfoDateTimeTest method verifyDateTimeWithTimeMachineModification.
/**
* Verify current date and time display and that current
* date and time can be modified using "time machine"
* http://mifosforge.jira.com/browse/MIFOSTEST-639
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyDateTimeWithTimeMachineModification() throws Exception {
DateTime targetTime = new DateTime(2008, 1, 1, 0, 0, 0, 0);
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
TimeMachinePage timeMachinePage = dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
timeMachinePage.verifySuccess(targetTime);
SystemInfoPage systemInfoPage = adminTestHelper.navigateToSystemInfoPage();
systemInfoPage.verifyDateTime(targetTime);
}
use of org.mifos.test.acceptance.framework.TimeMachinePage in project head by mifos.
the class DateTimeUpdaterRemoteTestingService method setDateTime.
public TimeMachinePage setDateTime(DateTime dateTime, DateTimeZone dateTimeZone) throws UnsupportedEncodingException {
DateTimeFormatter formatter = ISODateTimeFormat.basicDateTimeNoMillis().withZone(dateTimeZone);
String timeMachineUrl = "dateTimeUpdate.ftl?dateTime=" + getUrlEncodedTimeMachineDate(dateTime, formatter);
selenium.open(timeMachineUrl);
waitForPageToLoad();
return new TimeMachinePage(selenium);
}
Aggregations