Search in sources :

Example 36 with HomePage

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();
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage)

Example 37 with HomePage

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();
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClosedAccountsPage(org.mifos.test.acceptance.framework.loan.ClosedAccountsPage) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage)

Example 38 with HomePage

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");
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage) ViewNextInstallmentDetailsPage(org.mifos.test.acceptance.framework.loan.ViewNextInstallmentDetailsPage)

Example 39 with HomePage

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();
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryConfirmationPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)

Example 40 with HomePage

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;
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) ArrayList(java.util.ArrayList) MifosPage(org.mifos.test.acceptance.framework.MifosPage) HashMap(java.util.HashMap) Map(java.util.Map) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage)

Aggregations

HomePage (org.mifos.test.acceptance.framework.HomePage)42 LoginPage (org.mifos.test.acceptance.framework.login.LoginPage)20 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)14 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)10 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)10 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)6 Test (org.testng.annotations.Test)6 MifosPage (org.mifos.test.acceptance.framework.MifosPage)4 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)4 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)3 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)3 ClosedAccountsPage (org.mifos.test.acceptance.framework.loan.ClosedAccountsPage)3 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)3 DateTime (org.joda.time.DateTime)2 CenterViewDetailsPage (org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)2 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)2 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)2 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)2 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)2 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)2