use of org.mifos.test.acceptance.framework.admin.SystemInfoPage 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.admin.SystemInfoPage in project head by mifos.
the class SystemInfoDateTimeTest method verifyDatabaseInformationSource.
// TODO - need to support MIFOS_CONF variable
@Test(enabled = false)
public void verifyDatabaseInformationSource() throws Exception {
SystemInfoPage systemInfoPage = adminTestHelper.navigateToSystemInfoPage();
String data = systemInfoPage.getDatabaseSource();
String[] databaseConfigs = data.substring(1, data.length() - 1).split(", ");
List<File> temp = new ArrayList<File>();
for (String database : databaseConfigs) {
File oldFile = new File(database);
File tempFile = File.createTempFile(oldFile.getName(), ".tmp");
temp.add(tempFile);
if (oldFile.exists()) {
FileUtil.copyFile(oldFile, tempFile);
oldFile.delete();
}
}
SystemInfoPage systemInfoPage2 = adminTestHelper.navigateToSystemInfoPage();
systemInfoPage2.verifyDatabaseSource("[]");
Iterator<File> it = temp.iterator();
for (String database : databaseConfigs) {
File newFile = new File(database);
File tempFile = it.next();
FileUtil.copyFile(tempFile, newFile);
tempFile.delete();
}
}
use of org.mifos.test.acceptance.framework.admin.SystemInfoPage in project head by mifos.
the class SystemInfoDateTimeTest method verifyDateTimeAndTimeZone.
public void verifyDateTimeAndTimeZone() throws UnsupportedEncodingException {
DateTimeZone dateTimeZone = DateTimeZone.forOffsetHours(1);
DateTime targetTime = new DateTime(2008, 1, 1, 0, 0, 0, 0);
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime, dateTimeZone);
SystemInfoPage systemInfoPage = adminTestHelper.navigateToSystemInfoPage();
systemInfoPage.verifyDateTime(targetTime);
}
Aggregations