use of org.mifos.test.acceptance.framework.HomePage in project head by mifos.
the class LoanTestHelper method navigateToCreateLoanAccountSearchPage.
private CreateLoanAccountSearchPage navigateToCreateLoanAccountSearchPage() {
LoginPage loginPage = new AppLauncher(selenium).launchMifos().logout();
loginPage.verifyPage();
HomePage homePage = loginPage.loginSuccessfullyUsingDefaultCredentials();
homePage.verifyPage();
ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
return clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
}
use of org.mifos.test.acceptance.framework.HomePage in project head by mifos.
the class ViewClosedAccountsTest method navigateToClientDetailsFromClosedAccounts.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void navigateToClientDetailsFromClosedAccounts() throws Exception {
LoginPage loginPage = appLauncher.launchMifos();
HomePage homePage = loginPage.loginSuccessfullyUsingDefaultCredentials();
homePage.verifyPage();
SearchResultsPage searchResultsPage = homePage.search("Client1233266063395");
searchResultsPage.verifyPage();
ClientViewDetailsPage clientViewDetailsPage = searchResultsPage.navigateToClientViewDetailsPage("link=Stu*");
ClosedAccountsPage closedAccountsPage = clientViewDetailsPage.navigateToClosedAccountsPage();
closedAccountsPage.verifyPage();
closedAccountsPage.returnToClientViewDetailsPage();
}
use of org.mifos.test.acceptance.framework.HomePage in project head by mifos.
the class WaiveLoanFeeTest method waiveFeeOnLastInstallment.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void waiveFeeOnLastInstallment() throws Exception {
LoginPage loginPage = appLauncher.launchMifos();
HomePage homePage = loginPage.loginSuccessfullyUsingDefaultCredentials();
SearchResultsPage searchResultsPage = homePage.search("000100000000012");
searchResultsPage.verifyPage();
LoanAccountPage loanAccountPage = searchResultsPage.navigateToLoanAccountDetailPage("000100000000012");
ViewNextInstallmentDetailsPage viewInstallmentDetailsPage = loanAccountPage.navigateToViewNextInstallmentDetails();
viewInstallmentDetailsPage.verifyInstallmentAmount(11, 2, "10");
viewInstallmentDetailsPage.waiveOverdueInstallmentFee();
viewInstallmentDetailsPage.verifyInstallmentAmount(11, 2, "0");
}
use of org.mifos.test.acceptance.framework.HomePage in project head by mifos.
the class CollectionSheetEntryCustomerAccountTest method previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void previousPaidFeeNotDisplayedOnSecondCollectionSheetEntry() throws Exception {
SubmitFormParameters formParameters = getFormParametersForTestOffice();
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountData(formParameters, BASIC_CUSTOMER_ACCT_VALUES);
// navigate back to collection sheet entry
HomePage homePage = confirmationPage.navigateToHomePage();
ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
CollectionSheetEntrySelectPage selectPage = clientsAndAccountsPage.navigateToEnterCollectionSheetDataUsingLeftMenu();
selectPage.verifyPage();
// enter same search data and inspect displayed client account (A/C
// Collection) values
CollectionSheetEntryEnterDataPage enterDataPage = selectCenterAndContinue(formParameters, selectPage);
enterDataPage.verifyCustomerAccountValue(0, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(1, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(3, 6, 0.0);
enterDataPage.verifyCustomerAccountValue(4, 6, 0.0);
enterDataPage.cancel();
}
use of org.mifos.test.acceptance.framework.HomePage in project head by mifos.
the class BatchJobHelper method checkBatchJobsHaveFinished.
@SuppressWarnings("PMD")
private boolean checkBatchJobsHaveFinished(Map<String, String> previousRuns) {
(new MifosPage(selenium)).logout();
UiTestUtils.sleep(WAITING_TIME);
LoginPage loginPage = appLauncher.launchMifos();
loginPage.tryLoginUsingDefaultCredentials();
if (!selenium.isElementPresent("//span[@id='page.id']") || "Login".equals(selenium.getAttribute("page.id@title"))) {
return false;
} else {
Assert.assertEquals(selenium.getAttribute("page.id@title"), "Home");
}
HomePage homePage = new HomePage(selenium);
homePage.tryNavigateToAdminPage();
if ("Login".equals(selenium.getAttribute("page.id@title"))) {
return false;
} else {
Assert.assertEquals(selenium.getAttribute("page.id@title"), AdminPage.PAGE_ID);
}
adminPage.tryNavigateToBatchJobsPage();
if (selenium.isElementPresent("//span[@id='page.id']")) {
// TODO Batch Jobs page do not have page.id!
if ("Login".equals(selenium.getAttribute("page.id@title"))) {
return false;
} else {
Assert.assertTrue(false, "Expected Batch Jobs page, but was: " + selenium.getAttribute("page.id@title"));
}
}
List<String> completedJobs = new ArrayList<String>();
for (Map.Entry<String, String> entry : previousRuns.entrySet()) {
if (entry.getValue().equals(batchJobsPage.getPreviousRunStart(entry.getKey()))) {
for (String job : completedJobs) {
previousRuns.remove(job);
}
return false;
}
Assert.assertEquals(batchJobsPage.getPreviousRunStatus(entry.getKey()), "Previous run status: Completed");
completedJobs.add(entry.getKey());
}
return true;
}
Aggregations