Search in sources :

Example 6 with ClientsAndAccountsHomepage

use of org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage in project head by mifos.

the class CreateGroupLoanAccountTest method CreateLoanWithGLIMandLSIMenabled.

/**
    * Create a new Group Loan with GLIM and LSIM enabled
    * http://mifosforge.jira.com/browse/MIFOSTEST-1179
    *
    * @throws Exception
    */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void CreateLoanWithGLIMandLSIMenabled() throws Exception {
    applicationDatabaseOperation.updateGLIM(1);
    applicationDatabaseOperation.updateLSIM(1);
    setAppDate(new DateTime(2011, 4, 29, 15, 0, 0, 0));
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("Default Group");
    formParameters.setLoanProduct("GroupEmergencyLoan");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
    verifyDisbursalDateOnLoanEntryPage();
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 30, 15, 0, 0, 0));
    verifyDisbursalDateErrorMessage();
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 21, 15, 0, 0, 0));
    verifyDisbursalDateErrorMessage();
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 29, 15, 0, 0, 0));
    createLoanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "500", "0000-Animal Husbandry");
    createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "1000", "0001-Cow Purchase");
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    verifyFirstInstallmentAndDisbursalDateOnReviewPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    verifyFirstInstallmentAndDisbursalDateOnPreviewPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    loanAccountPage.verifyLoanIsPendingApproval();
    loanAccountPage.verifyNumberOfInstallments("10");
    loanAccountPage.verifyDisbursalDate("29/04/2011");
    loanAccountPage.verifyPrincipalOriginal("1,500");
    loanAccountPage.verifyLoanTotalBalance("1,500");
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "06-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "13-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "20-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "27-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(7, "03-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(8, "10-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(9, "17-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(10, "24-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(11, "01-Jul-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(12, "08-Jul-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(7, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(8, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(9, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(10, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(11, "150");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(12, "150");
    viewRepaymentSchedulePage.navigateToLoanAccountPage();
    applicationDatabaseOperation.updateGLIM(0);
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTime(org.joda.time.DateTime) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 7 with ClientsAndAccountsHomepage

use of org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage in project head by mifos.

the class CollectionSheetEntryCustomerAccountTest method unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@Test(enabled = true)
public void unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved() throws Exception {
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountDataOnSecondEditing(formParameters, TEST_ACCT_VALUES, FIRST_PARTIAL_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, 77.0);
    enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(3, 6, 251.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) Test(org.testng.annotations.Test)

Example 8 with ClientsAndAccountsHomepage

use of org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage in project head by mifos.

the class ClientTest method navigateToClientDetailsPage.

private void navigateToClientDetailsPage() {
    ClientsAndAccountsHomepage clientsPage = navigationHelper.navigateToClientsAndAccountsPage();
    ClientSearchResultsPage searchResultsPage = clientsPage.searchForClient("client1 lastname");
    searchResultsPage.verifyPage();
    viewClientDetailsPage = searchResultsPage.navigateToSearchResult("client1 lastname: ID 0002-000000005");
}
Also used : ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)

Example 9 with ClientsAndAccountsHomepage

use of org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage in project head by mifos.

the class ApplyPaymentOnGLIMLoanAccountTest method createNewLoan.

private LoanAccountPage createNewLoan() {
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("Default Group");
    formParameters.setLoanProduct("GroupEmergencyLoan");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 3, 4, 15, 0, 0, 0));
    createLoanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "250", "0009-Horse");
    createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "500", "0001-Cow Purchase");
    createLoanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1000", "0003-Goat Purchase");
    createLoanAccountEntryPage.setInstallments("10");
    createLoanAccountEntryPage.setInterestRate("0");
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    return createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) DateTime(org.joda.time.DateTime) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 10 with ClientsAndAccountsHomepage

use of org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage in project head by mifos.

the class UpdateCustomPropertiesTest method verifyPropertyClientRulesCenterHierarchyExistsFalse.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-232
@Test(enabled = true)
public void verifyPropertyClientRulesCenterHierarchyExistsFalse() throws Exception {
    //Given
    propertiesHelper.setCenterHierarchyExists("false");
    //When
    ClientsAndAccountsHomepage clientsAndAccountsHomePage = navigationHelper.navigateToClientsAndAccountsPage();
    //Then
    clientsAndAccountsHomePage.verifyMenuWithCenterHierarchyOff();
    //Given
    propertiesHelper.setCenterHierarchyExists("true");
    //When
    clientsAndAccountsHomePage = navigationHelper.navigateToClientsAndAccountsPage();
    //Then
    clientsAndAccountsHomePage.verifyMenuWithCenterHierarchyOn();
}
Also used : ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) Test(org.testng.annotations.Test)

Aggregations

ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)26 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)12 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)11 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)10 Test (org.testng.annotations.Test)10 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)8 DateTime (org.joda.time.DateTime)7 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)7 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)7 HomePage (org.mifos.test.acceptance.framework.HomePage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)4 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)4 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)3 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)3 LoginPage (org.mifos.test.acceptance.framework.login.LoginPage)3 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)2 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)2 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)2 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)2