Search in sources :

Example 1 with TimeMachinePage

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);
}
Also used : TimeMachinePage(org.mifos.test.acceptance.framework.TimeMachinePage) SystemInfoPage(org.mifos.test.acceptance.framework.admin.SystemInfoPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Example 2 with TimeMachinePage

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);
}
Also used : TimeMachinePage(org.mifos.test.acceptance.framework.TimeMachinePage) DateTimeFormatter(org.joda.time.format.DateTimeFormatter)

Aggregations

TimeMachinePage (org.mifos.test.acceptance.framework.TimeMachinePage)2 DateTime (org.joda.time.DateTime)1 DateTimeFormatter (org.joda.time.format.DateTimeFormatter)1 SystemInfoPage (org.mifos.test.acceptance.framework.admin.SystemInfoPage)1 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)1