Search in sources :

Example 11 with CreateLoanAccountReviewInstallmentPage

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

the class CashFlowTest method verifyCashFlowPageInLoanAccountCreationFlow.

/**
     * Disabled after work on daily interest calculation for variable installments. - keithw-
     * 
     * Verify Cash Flow Page in Loan Account creation flow	
     * http://mifosforge.jira.com/browse/MIFOSTEST-672
     *
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void verifyCashFlowPageInLoanAccountCreationFlow() throws Exception {
    applicationDatabaseOperation.updateLSIM(1);
    DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
    productParams.setDefInstallments("12");
    productParams.setDefaultLoanAmount("2000");
    CreateLoanAccountSearchParameters loanSearchParams = new CreateLoanAccountSearchParameters();
    loanSearchParams.setSearchString(clientName);
    loanSearchParams.setLoanProduct(productParams.getOfferingName());
    DateTime disbursalDate = systemDateTime.plusDays(1);
    loanProductTestHelper.navigateToDefineNewLoanPageAndFillMandatoryFields(productParams).fillCashFlow("", "49", "400").fillVariableInstalmentOption("", "1", "").submitAndGotoNewLoanProductPreviewPage().submit();
    CreateLoanAccountCashFlowPage cashFlowPage = loanTestHelper.navigateToCreateLoanAccountCashFlowPage(loanSearchParams);
    cashFlowPage.verifyTableExist();
    cashFlowPage.validateCashFlowMonths(disbursalDate, 12, DefineNewLoanProductPage.SubmitFormParameters.WEEKS);
    cashFlowPage.cancel();
    loanTestHelper.navigateToCreateLoanAccountCashFlowPage(loanSearchParams);
    cashFlowPage.submitWithErrors();
    cashFlowPage.verifyInvalidTextTyped();
    cashFlowPage.verifyErrorsOnPage();
    cashFlowPage.verifyMonths();
    cashFlowPage.verifyErrorsOnFields();
    cashFlowPage.enterValidData("1000", 1000, 100, "4000", "5000");
    cashFlowPage = cashFlowPage.submitWithErrors();
    cashFlowPage.verifyErrorsOnPage("Indebtedness rate of the client is 175 % which is greater than allowed value of 49 %.");
    cashFlowPage.enterValidData("1000", 1000, 100, "5000", "400");
    CreateLoanAccountReviewInstallmentPage reviewPage = cashFlowPage.clickContinue();
    reviewPage.verifyCashFlow(100, 2000, new String[] { "100", "1858", "1445", "1716", "2334.7", "2600" }, new String[] { "0", "15.5", "37.2", "28.5", "6.6", "0" });
    reviewPage = reviewPage.clickPreview();
    reviewPage.verifyErrorsOnPage("Repayment Capacity of the client is 127.06 % which should be greater than the required value of 400.0 %");
    cashFlowPage = reviewPage.editCashFlow();
    cashFlowPage.enterValidData("1000", 1000, 1100, "5000", "400");
    reviewPage = cashFlowPage.clickContinue();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = reviewPage.clickPreviewAndNavigateToPreviewPage();
    createLoanAccountPreviewPage.verifyLoanAmount("2,000");
    createLoanAccountPreviewPage.verifyInterestTypeInLoanPreview("Declining Balance");
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submit();
    createLoanAccountConfirmationPage.isTextPresentInPage("View loan account details now");
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    loanAccountPage.verifyDisbursalDate("12/10/2010");
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
    String[][] tableAfterLastInstallment = { { "Future Installments", "", "", "", "", "", "" }, { "1", "19-Oct-2010", "-", "163.7", "7.3", "0", "0", "0", "171" }, { "2", "26-Oct-2010", "-", "164.3", "6.7", "0", "0", "0", "171" }, { "3", "02-Nov-2010", "-", "165", "6", "0", "0", "0", "171" }, { "4", "09-Nov-2010", "-", "165.6", "5.4", "0", "0", "0", "171" }, { "5", "16-Nov-2010", "-", "166.2", "4.8", "0", "0", "0", "171" }, { "6", "23-Nov-2010", "-", "166.8", "4.2", "0", "0", "0", "171" }, { "7", "30-Nov-2010", "-", "167.5", "3.5", "0", "0", "0", "171" }, { "8", "07-Dec-2010", "-", "168.1", "2.9", "0", "0", "0", "171" }, { "9", "14-Dec-2010", "-", "168.7", "2.3", "0", "0", "0", "171" }, { "10", "21-Dec-2010", "-", "169.3", "1.7", "0", "0", "0", "171" }, { "11", "28-Dec-2010", "-", "169.9", "1.1", "0", "0", "0", "171" }, { "12", "04-Jan-2011", "-", "164.9", "0.4", "0", "0", "0", "165.3" } };
    viewRepaymentSchedulePage.verifyScheduleTable(tableAfterLastInstallment);
    loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
    EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
    editLoanAccountInformationPage.verifyInstallments("12");
    editLoanAccountInformationPage.verifyInterestRate("19");
    editLoanAccountInformationPage.verifyDisbursalDate("12", "10", "2010");
    editLoanAccountInformationPage.verifyLoanAmount("2000.0");
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) CreateLoanAccountCashFlowPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountCashFlowPage) 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) Test(org.testng.annotations.Test)

Example 12 with CreateLoanAccountReviewInstallmentPage

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

the class VariableInstalmentRecalculationTest method verifyPrincipalAndInterestRecalculationAfterDisbursal.

private void verifyPrincipalAndInterestRecalculationAfterDisbursal(boolean fixedRepaymentSchedule, List<String> totals, List<String> dueDates) throws SQLException {
    int noOfInstallments = 4;
    int loanAmount = 1000;
    int interestRate = 20;
    DefineNewLoanProductPage.SubmitFormParameters formParameters = defineLoanProductParameters(noOfInstallments, loanAmount, interestRate);
    formParameters.setFixedRepaymentSchedule(fixedRepaymentSchedule);
    applicationDatabaseOperation.updateLSIM(1);
    int maxGap = 10;
    int minGap = 1;
    int minInstalmentAmount = 100;
    int cashFlowIncremental = 1;
    int cashFlowBase = 100000;
    double warningThreshold = 1.0;
    DateTime disbursalDate = systemDateTime.plusDays(3);
    createLoanProduct(maxGap, minGap, minInstalmentAmount, formParameters, warningThreshold);
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createNewLoanAccountAndNavigateToRepaymentSchedule(disbursalDate).enterValidData("100", cashFlowIncremental, cashFlowBase, null, null).clickContinue();
    createLoanAccountReviewInstallmentPage.clickPreviewAndNavigateToPreviewPage().submitForApprovalAndNavigateToConfirmationPage().navigateToLoanAccountDetailsPage().changeAccountStatusToAccepted().disburseLoan(DisburseLoanParameters.getDisbursalParameters("11", "10", "2010")).navigateToRepaymentSchedulePage().verifyScheduleAndAmounts(totals, dueDates);
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) DateTime(org.joda.time.DateTime) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)

Example 13 with CreateLoanAccountReviewInstallmentPage

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

the class CreateClientLoanAccountTest method verifyCancelButtons.

/**
    * Verify functionality of 'Cancel' buttons during the Loan creation flow
    * http://mifosforge.jira.com/browse/MIFOSTEST-1178
    *
    * @throws Exception
    */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyCancelButtons() throws Exception {
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    createLoanAccountSearchPage.cancel();
    clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("%");
    createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
    createLoanAccountSearchPage.cancel();
    clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters2 = new CreateLoanAccountSearchParameters();
    formParameters2.setSearchString("Client1233266063395");
    CreateLoanAccountSelectLoanProductPage createLoanAccountSelectLoanProductPage = createLoanAccountSearchPage.navigateToCreateLoanAccountSelectLoanProductPage(formParameters2);
    createLoanAccountSelectLoanProductPage.cancel();
    clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    formParameters2.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
    createLoanAccountEntryPage.cancel();
    clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    createLoanAccountReviewInstallmentPage.cancel();
    clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
    createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    createLoanAccountPreviewPage.cancel();
}
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) CreateLoanAccountSelectLoanProductPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSelectLoanProductPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 14 with CreateLoanAccountReviewInstallmentPage

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

the class CreateClientLoanAccountTest method createLoanInPartialApplicationStatus.

/**
    * Create a new Client Loan in 'Partial Application' status
    * http://mifosforge.jira.com/browse/MIFOSTEST-1177
    *
    * @throws Exception
    */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createLoanInPartialApplicationStatus() throws Exception {
    setAppDate(new DateTime(2011, 4, 27, 15, 0, 0, 0));
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("Client1233266063395");
    formParameters.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    verifyFirstInstallmentAndDisbursalDateOnReviewPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    verifyFirstInstallmentAndDisbursalDateOnPreviewPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForLaterAndNavigateToConfirmationPage();
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    loanAccountPage.verifyLoanIsInPartialApplication();
    loanAccountPage.verifyNumberOfInstallments("10");
    loanAccountPage.verifyDisbursalDate("02/05/2011");
    loanAccountPage.verifyPrincipalOriginal("1,000");
    loanAccountPage.verifyLoanTotalBalance("1,000");
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "09-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "16-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "23-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "30-May-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(7, "06-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(8, "13-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(9, "20-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(10, "27-Jun-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(11, "04-Jul-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(12, "11-Jul-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(7, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(8, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(9, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(10, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(11, "100");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(12, "100");
    viewRepaymentSchedulePage.navigateToLoanAccountPage();
}
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 15 with CreateLoanAccountReviewInstallmentPage

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

the class CreateGLIMLoanAccountTest method checkGLIMLoanCreatedBySubmitForApproval.

/*
     * This test is to verify that you can edit a GLIM loan account after it has been
     * dibursed without getting an invalid disbursal date error. See MIFOS-2597.
     */
// http://mifosforge.jira.com/browse/MIFOSTEST-132
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void checkGLIMLoanCreatedBySubmitForApproval() throws Exception {
    //Given
    applicationDatabaseOperation.updateGLIM(1);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 03, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    //When
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("Default Group");
    formParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
    createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    verifyGLIMErrorMessage();
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 3, 04, 15, 0, 0, 0));
    createLoanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "9999.9", "0009-Horse");
    createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "9999.9", "0001-Cow Purchase");
    createLoanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "9999.9", "0003-Goat Purchase");
    createLoanAccountEntryPage.selectGLIMClients(3, "Holiday TestClient Client Id: 0002-000000023", "9999.9", "0003-Goat Purchase");
    selectAdditionalFees();
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    verifyFirstInstallmentAndDisbursalDateOnReviewPage();
    verifyAdditionalFeesOnReviewPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    verifyFirstInstallmentAndDisbursalDateOnPreviewPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    String loanId = loanAccountPage.getAccountId();
    loanAccountPage.verifyLoanIsPendingApproval();
    loanAccountPage.verifyNumberOfInstallments("4");
    loanAccountPage.verifyDisbursalDate("04/03/2011");
    loanAccountPage.verifyPrincipalOriginal("39999.6");
    loanAccountPage.verifyLoanTotalBalance("41147.0");
    loanAccountPage.verifyFeesOriginal("410.0");
    loanAccountPage.verifyInterestOriginal("737.4");
    verifyFees();
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "11-Mar-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "18-Mar-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "25-Mar-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "01-Apr-2011");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "9999.9");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "9999.9");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "9999.9");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "9999.9");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(3, "110.0");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(4, "100.0");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(5, "100.0");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(6, "100.0");
    viewRepaymentSchedulePage.navigateToLoanAccountPage();
    loanId = loanAccountPage.getAccountId();
    dateTimeUpdaterRemoteTestingService.setDateTime(new LocalDate(2011, 3, 8).toDateTimeAtStartOfDay());
    EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
    statusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
    statusParameters.setNote("Test");
    loanTestHelper.changeLoanAccountStatus(loanId, statusParameters);
    DisburseLoanParameters params = new DisburseLoanParameters();
    params.setDisbursalDateDD("8");
    params.setDisbursalDateMM("3");
    params.setDisbursalDateYYYY("2011");
    params.setPaymentType(DisburseLoanParameters.CASH);
    loanTestHelper.disburseLoan(loanId, params);
    dateTimeUpdaterRemoteTestingService.setDateTime(new LocalDate(2011, 3, 15).toDateTimeAtStartOfDay());
    EditLoanAccountInformationParameters editLoanAccountInformationParameters = new EditLoanAccountInformationParameters();
    editLoanAccountInformationParameters.setExternalID("ID2323ID");
    loanTestHelper.changeLoanAccountInformation(loanId, new CreateLoanAccountSubmitParameters(), editLoanAccountInformationParameters);
    applicationDatabaseOperation.updateGLIM(0);
}
Also used : EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters) DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) EditLoanAccountInformationParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters) LocalDate(org.joda.time.LocalDate) DateTime(org.joda.time.DateTime) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Aggregations

CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)16 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)14 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)12 DateTime (org.joda.time.DateTime)11 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)11 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)11 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)9 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)8 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)7 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)7 Test (org.testng.annotations.Test)6 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)4 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)3 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)3 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)3 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)3 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)3 EditLoanAccountInformationParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters)2 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)2 ArrayList (java.util.ArrayList)1