Search in sources :

Example 6 with CreateLoanAccountEntryPage

use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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 7 with CreateLoanAccountEntryPage

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

the class LoanTestHelper method navigateToCreateLoanAccountEntryPageWithoutLogout.

public CreateLoanAccountEntryPage navigateToCreateLoanAccountEntryPageWithoutLogout(CreateLoanAccountSearchParameters searchParameters) {
    ClientsAndAccountsHomepage clientsAndAccountsPage = new HomePage(selenium).navigateToClientsAndAccountsUsingHeaderTab();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
    createLoanAccountSearchPage.verifyPage();
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
    createLoanAccountEntryPage.verifyPage();
    return createLoanAccountEntryPage;
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 8 with CreateLoanAccountEntryPage

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

the class LoanTestHelper method createLoanAccountForMultipleClientsInGroup.

/**
     * Creates a loan account.
     * @param loanSaveType : True - submit for approval, False - save for later
     * @return LoanAccountPage
     */
public LoanAccountPage createLoanAccountForMultipleClientsInGroup(boolean loanSaveType) {
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Default Group");
    searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
    CreateLoanAccountEntryPage loanAccountEntryPage = this.navigateToCreateLoanAccountEntryPage(searchParameters);
    List<GLIMClient> clients = new ArrayList<GLIMClient>();
    clients.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 \n Client Id: 0002-000000012", "9999.9", "0009-Horse"));
    clients.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 \n Client Id: 0002-000000013", "99999.9", "0001-Cow Purchase"));
    clients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 \n Client Id: 0002-000000014", "99999.9", "0003-Goat Purchase"));
    List<GLIMClient> clients2 = new ArrayList<GLIMClient>();
    clients2.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "9999.9", "0009-Horse"));
    clients2.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "99999.9", "0001-Cow Purchase"));
    clients2.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "99999.9", "0003-Goat Purchase"));
    for (GLIMClient glimClient : clients2) {
        loanAccountEntryPage.selectGLIMClients(glimClient.getClientNumber(), glimClient.getClientName(), glimClient.getLoanAmount(), glimClient.getLoanPurpose());
    }
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage;
    if (loanSaveType) {
        createLoanAccountConfirmationPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPage();
    } else {
        createLoanAccountConfirmationPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPageSaveForLaterButton();
    }
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    loanAccountPage.verifyGLIMIndividualScheduleLinks(3, true);
    if (loanSaveType) {
        loanAccountPage.verifyLoanIsPendingApproval();
    } else {
        loanAccountPage.verifyLoanIsInPartialApplication();
    }
    EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
    for (GLIMClient glimClient : clients) {
        editLoanAccountInformationPage.verifyGLIMClient(glimClient.getClientNumber(), glimClient.getClientName(), glimClient.getLoanAmount(), glimClient.getLoanPurpose());
    }
    editLoanAccountInformationPage.navigateBack();
    loanAccountPage.verifyGLIMIndividualScheduleLinks(3, true);
    return loanAccountPage;
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ArrayList(java.util.ArrayList) GLIMClient(org.mifos.test.acceptance.framework.loan.GLIMClient) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 9 with CreateLoanAccountEntryPage

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

the class LoanTestHelper method navigateToLoanAccountEntryPage.

private CreateLoanAccountEntryPage navigateToLoanAccountEntryPage(CreateLoanAccountSearchParameters searchParameters) {
    CreateLoanAccountSearchPage createLoanAccountSearchPage = navigateToCreateLoanAccountSearchPage();
    createLoanAccountSearchPage.verifyPage();
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
    createLoanAccountEntryPage.verifyPage();
    return createLoanAccountEntryPage;
}
Also used : CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 10 with CreateLoanAccountEntryPage

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

the class LoanTestHelper method createGroupLoanAccount.

public LoanAccountPage createGroupLoanAccount(CreateLoanAccountSearchParameters searchParameters, List<GLIMClient> glimClients) {
    CreateLoanAccountEntryPage loanAccountEntryPage = navigateToCreateLoanAccountEntryPage(searchParameters);
    for (GLIMClient client : glimClients) {
        loanAccountEntryPage.selectGLIMClients(client.getClientNumber(), client.getClientName(), client.getLoanAmount());
    }
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = loanAccountEntryPage.navigateToReviewInstallmentsPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    return createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Also used : GLIMClient(org.mifos.test.acceptance.framework.loan.GLIMClient) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Aggregations

CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)33 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)22 DateTime (org.joda.time.DateTime)16 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)14 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)13 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)12 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)12 Test (org.testng.annotations.Test)12 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)10 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)10 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)7 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)6 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)6 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)5 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)5 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)5 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)5 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)5 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)4 ArrayList (java.util.ArrayList)2