Search in sources :

Example 1 with EditLoanAccountInformationPage

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

the class ModifyingGroupLoanTest method editAccountInfoTest.

public void editAccountInfoTest() throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2013, 02, 9, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Default Group");
    searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
    List<GLIMClient> glimClients = new ArrayList<GLIMClient>();
    glimClients.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "1500", null));
    glimClients.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "37", null));
    glimClients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1500", null));
    LoanAccountPage loanAccountPage = loanTestHelper.createGroupLoanAccount(searchParameters, glimClients);
    EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
    editLoanAccountInformationPage.setInterestRate("33");
    editLoanAccountInformationPage.setNumberOfInstallments("8");
    EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
    editAccountParameters.setCollateralNotes("Test Edit new GLIM Loan");
    editAccountParameters.setExternalID("1234");
    editLoanAccountInformationPage.editAccountParams(new CreateLoanAccountSubmitParameters(), editAccountParameters);
    loanAccountPage = editLoanAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage().submitAndNavigateToLoanAccountPage();
    verifyEditedAccountParameters(loanAccountPage);
    verifyModifiedAccountParametersFromIndividualMemberAccount(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) EditLoanAccountInformationParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Example 2 with EditLoanAccountInformationPage

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

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

the class ViewOriginalLoanScheduleTest method verifyForVariableInstallmentLoanEarlyDisbursal.

// http://mifosforge.jira.com/browse/MIFOSTEST-1163
//blocked by http://mifosforge.jira.com/browse/MIFOS-5026 - ldomzalski
@Test(enabled = false)
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyForVariableInstallmentLoanEarlyDisbursal() throws Exception {
    //Given
    int interestType = DefineNewLoanProductPage.SubmitFormParameters.DECLINING_BALANCE;
    DateTime disbursalDate = systemDateTime.plusDays(1);
    applicationDatabaseOperation.updateLSIM(1);
    DefineNewLoanProductPage.SubmitFormParameters formParameters = defineLoanProductParameters(interestType);
    CreateLoanAccountSubmitParameters accountSubmitParameters = new CreateLoanAccountSubmitParameters();
    accountSubmitParameters.setAmount("1000.0");
    accountSubmitParameters.setInterestRate("20");
    accountSubmitParameters.setNumberOfInstallments("5");
    accountSubmitParameters.setDd("11");
    accountSubmitParameters.setMm("10");
    accountSubmitParameters.setYy("2011");
    String[] fees = { "fixedFeePerAmountAndInterest", "fixedFeePerInterest" };
    EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
    editAccountParameters.setGracePeriod("0");
    formParameters.addFee("fixedFeePerAmountAndInterest");
    formParameters.addFee("fixedFeePerInterest");
    //When
    DefineNewLoanProductPage defineNewLoanProductPage = loanProductTestHelper.navigateToDefineNewLoanPageAndFillMandatoryFields(formParameters).fillVariableInstalmentOption("30", "1", "100");
    defineNewLoanProductPage.submitWithErrors("fee cannot be applied to variable installment loan product");
    defineNewLoanProductPage.setInterestRateType(DefineNewLoanProductPage.SubmitFormParameters.DECLINING_BALANCE_INTEREST_RECALCULATION);
    defineNewLoanProductPage.submitWithErrors("The selected interest type is invalid for variable installment loan product");
    defineNewLoanProductPage.setInterestRateType(interestType);
    defineNewLoanProductPage.submitAndGotoNewLoanProductPreviewPage().submit();
    List<String> errors = new ArrayList<String>();
    errors.add("fixedFeePerAmountAndInterest fee cannot be applied to loan with variable installments");
    errors.add("fixedFeePerInterest fee cannot be applied to loan with variable installments.");
    navigationHelper.navigateToHomePage();
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = loanTestHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(setLoanSearchParameters()).setDisbursalDate(disbursalDate).applyAdditionalFees(fees).submitWithErrors(errors).unselectAdditionalFees().clickContinue();
    createLoanAccountReviewInstallmentPage.isDueDatesEditable(Integer.parseInt(formParameters.getDefInstallments()));
    createLoanAccountReviewInstallmentPage.isTotalsEditable(Integer.parseInt(formParameters.getDefInstallments()));
    String total = createLoanAccountReviewInstallmentPage.getTotalForInstallment(1);
    createLoanAccountReviewInstallmentPage.setTotalForInstallment(1, "3");
    createLoanAccountReviewInstallmentPage.submitWithErrors("has total amount less than the sum of interest and fees");
    createLoanAccountReviewInstallmentPage.setTotalForInstallment(1, "5");
    createLoanAccountReviewInstallmentPage.submitWithErrors("has total amount less than the allowed value");
    createLoanAccountReviewInstallmentPage.setTotalForInstallment(1, total);
    createLoanAccountReviewInstallmentPage.validate();
    Calendar calendar = Calendar.getInstance();
    calendar.set(2011, 9, 13);
    String prevDueDate = createLoanAccountReviewInstallmentPage.getDueDateForInstallment(1);
    createLoanAccountReviewInstallmentPage.typeInstallmentDueDateByPicker(1, calendar);
    createLoanAccountReviewInstallmentPage.setDueDateForInstallment(1, prevDueDate);
    prevDueDate = createLoanAccountReviewInstallmentPage.getDueDateForInstallment(5);
    createLoanAccountReviewInstallmentPage.setDueDateForInstallment(5, "07/11/11");
    createLoanAccountReviewInstallmentPage.submitWithErrors("Gap between the due dates of installment 5 and the previous installment is less than allowed");
    createLoanAccountReviewInstallmentPage.setDueDateForInstallment(5, prevDueDate);
    List<String> totals = createLoanAccountReviewInstallmentPage.getTotalsInstallments(Integer.parseInt(formParameters.getDefInstallments()));
    List<String> dueDates = createLoanAccountReviewInstallmentPage.getDueDatesInstallments(Integer.parseInt(formParameters.getDefInstallments()));
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    createLoanAccountPreviewPage.verifyInstallmentsSchedule(totals, dueDates, Integer.parseInt(formParameters.getDefInstallments()));
    LoanAccountPage loanAccountPage = createLoanAccountPreviewPage.submit().navigateToLoanAccountDetailsPage();
    loanAccountPage.verifyDisbursalDate(disbursalDate);
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
    viewRepaymentSchedulePage.verifyScheduleAndAmounts(totals, dueDates);
    viewRepaymentSchedulePage.navigateBack();
    EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
    editLoanAccountInformationPage.verifyAccountParams(accountSubmitParameters, editAccountParameters);
    editLoanAccountInformationPage.navigateBack();
    loanTestHelper.applyCharge(ChargeParameters.MISC_FEES, "10");
    loanTestHelper.applyCharge(ChargeParameters.MISC_PENALTY, "10");
    loanTestHelper.approveLoan();
    loanTestHelper.disburseLoan(systemDateTime);
    String[][] tableOnOriginalInstallment = OriginalScheduleData.VARIABLE_LOAN_EARLY_DISBURSAL_SCHEDULE;
    verifyOriginalSchedule(tableOnOriginalInstallment);
    loanTestHelper.applyCharge(ChargeParameters.MISC_FEES, "10");
    loanTestHelper.applyCharge(ChargeParameters.MISC_PENALTY, "10");
    verifyOriginalSchedule(tableOnOriginalInstallment);
    loanTestHelper.makePayment(systemDateTime.plusDays(5), "100");
    //Then
    verifyOriginalSchedule(tableOnOriginalInstallment);
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) Calendar(java.util.Calendar) ArrayList(java.util.ArrayList) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) EditLoanAccountInformationParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters) DateTime(org.joda.time.DateTime) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) Test(org.testng.annotations.Test)

Example 4 with EditLoanAccountInformationPage

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

the class CreateLSIMClientLoanAccountTest method createLoanAccountWithNonMeetingDatesForDisburseAndRepay.

// http://mifosforge.jira.com/browse/MIFOSTEST-123
@Test(enabled = true)
public void createLoanAccountWithNonMeetingDatesForDisburseAndRepay() throws Exception {
    //Given
    setTime(2011, 03, 24);
    String errorMessage = "";
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setLoanProduct("ClientEmergencyLoan");
    formParameters.setSearchString("UpdateCustomProperties TestClient");
    for (int i = 0; i < 2; i++) {
        CreateLoanAccountSearchPage createLoanAccountSearchPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu();
        formParameters.setSearchString("1");
        createLoanAccountSearchPage = createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
        errorMessage = "No text <Stu12332659912419 Client12332659912419:ID0002-000000030> present on the page";
        createLoanAccountSearchPage.verifyTextPresent("Stu12332659912419 Client12332659912419:ID0002-000000030", errorMessage);
        createLoanAccountSearchPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu();
        formParameters.setSearchString(" ");
        createLoanAccountSearchPage = createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
        errorMessage = "No text <Stu1233266063395 Client1233266063395:ID0002-000000003> present on the page";
        createLoanAccountSearchPage.verifyTextPresent("Stu1233266063395 Client1233266063395:ID0002-000000003", errorMessage);
        createLoanAccountSearchPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu();
        formParameters.setSearchString("%");
        createLoanAccountSearchPage = createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
        createLoanAccountSearchPage.waitForElementToPresent("name=customerSearchResults_length");
        verify10SearchResults();
        verify25SearchResults();
        verify50SearchResults();
        verify100SearchResults();
        formParameters.setSearchString("UpdateCustomProperties TestClient");
        navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().verifyNoSelectLoanProduct(formParameters, "Please select a Loan product name");
        createLoanAccountSearchPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu();
        formParameters.setSearchString("UpdateCustomProperties TestClient");
        CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
        createLoanAccountEntryPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(formParameters);
        createLoanAccountEntryPage.verifyAllowedAmounts("1,000", "10,000", "1000.0");
        createLoanAccountEntryPage.verifyDisbsursalDate("25", "3", "2011");
        createLoanAccountEntryPage.setAmount("");
        createLoanAccountEntryPage.setInstallments("");
        createLoanAccountEntryPage.setDisbursalDate("", "", "");
        createLoanAccountEntryPage.setInterestRate("");
        createLoanAccountEntryPage.setLonaPurpose("0008-Animal Trading");
        createLoanAccountEntryPage = createLoanAccountEntryPage.clickContinueButExpectValidationFailure();
        createLoanAccountEntryPage.verifyError("Please specify valid Amount. Amount should be a value between 1,000 and 10,000, inclusive.");
        createLoanAccountEntryPage.verifyError("Please specify valid Interest rate. Interest rate should be a value between 0 and 0, inclusive.");
        createLoanAccountEntryPage.verifyError("Please specify valid No. of installments. No. of installments should be a value between 1 and 10, inclusive.");
        createLoanAccountEntryPage.verifyError("You have entered an invalid disbursal date. Please check the date format.");
        createLoanAccountEntryPage.setDisbursalDate("26", "02", "2011");
        createLoanAccountEntryPage = createLoanAccountEntryPage.clickContinueButExpectValidationFailure();
        createLoanAccountEntryPage.verifyError("The disbursement date is invalid. Disbursement date must be on or after todays date.");
        createLoanAccountEntryPage.setDisbursalDate("21", "01", "2012");
        createLoanAccountEntryPage = createLoanAccountEntryPage.clickContinueButExpectValidationFailure();
        if (i % 2 == 0) {
            createLoanAccountEntryPage.verifyNoError("The disbursement date is invalid. It must fall on a valid customer meeting schedule.");
        } else {
            createLoanAccountEntryPage.verifyError("The disbursement date is invalid. It must fall on a valid customer meeting schedule.");
        }
        createLoanAccountEntryPage.setDisbursalDate("25", "3", "2011");
        createLoanAccountEntryPage.setAmount("999999999999999999.88888888");
        createLoanAccountEntryPage.setInterestRate("999999999999.88888888");
        createLoanAccountEntryPage = createLoanAccountEntryPage.clickContinueButExpectValidationFailure();
        createLoanAccountEntryPage.verifyError("The interest rate is invalid as the number of digits after the decimal separator exceeds the allowed number of 5.");
        createLoanAccountEntryPage.verifyError("The amount is invalid because the number of digits before the decimal separator exceeds the allowed number of 14.");
        createLoanAccountEntryPage.setAmount("12345678901234");
        createLoanAccountEntryPage.setInterestRate("999999999999.88888888");
        createLoanAccountEntryPage = createLoanAccountEntryPage.clickContinueButExpectValidationFailure();
        createLoanAccountEntryPage.verifyError("The interest rate is invalid as the number of digits after the decimal separator exceeds the allowed number of 5.");
        CreateLoanAccountSubmitParameters formParametersFees = new CreateLoanAccountSubmitParameters();
        formParametersFees.setAdditionalFee1("loanWeeklyFee");
        formParametersFees.setAdditionalFee2("oneTimeFee");
        createLoanAccountEntryPage.setAmount("5000");
        createLoanAccountEntryPage.setInterestRate("0.0");
        createLoanAccountEntryPage.setInstallments("10");
        createLoanAccountEntryPage.fillAdditionalFee(formParametersFees);
        CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.clickContinue();
        createLoanAccountReviewInstallmentPage.verifyLoanAmount("5,000");
        createLoanAccountReviewInstallmentPage.verifyDueDate(1, "01/04/11");
        createLoanAccountReviewInstallmentPage.verifyDueDate(2, "08/04/11");
        createLoanAccountReviewInstallmentPage.verifyDueDate(10, "03/06/11");
        CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndNavigateToPreviewPage();
        createLoanAccountPreviewPage.verifyLoanAmount("5,000");
        createLoanAccountPreviewPage.verifyInterestTypeInLoanPreview("Flat");
        createLoanAccountPreviewPage.verifyDueDate(1, "01-Apr-2011");
        createLoanAccountPreviewPage.verifyDueDate(2, "08-Apr-2011");
        createLoanAccountPreviewPage.verifyDueDate(10, "03-Jun-2011");
        createLoanAccountEntryPage = createLoanAccountPreviewPage.editAccountInformation();
        createLoanAccountEntryPage.setAmount("2000.0");
        createLoanAccountPreviewPage = createLoanAccountEntryPage.clickContinue().clickPreviewAndNavigateToPreviewPage();
        createLoanAccountPreviewPage.verifyLoanAmount("2,000");
        CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
        errorMessage = "No text <View loan account details now> present on the page";
        createLoanAccountConfirmationPage.verifyTextPresent("View loan account details now", errorMessage);
        LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
        loanAccountPage.verifyStatus("Application Pending Approval");
        loanAccountPage.verifyDisbursalDate("25/03/2011");
        String[][] accountSummaryTable = { { "", "Original Loan", "Amount paid", "Loan balance" }, { "Principal", "2,000", "0", "2,000" }, { "Interest", "0", "0", "0" }, { "Fees", "1,010", "0", "1,010" }, { "Penalty", "0", "0", "0" }, { "Total", "3,010", "0", "3,010" } };
        loanAccountPage.verifyAccountSummary(accountSummaryTable);
        loanAccountPage.verifyInterestRate("0");
        ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
        viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "01-Apr-2011");
        viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "08-Apr-2011");
        viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "22-Apr-2011");
        loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
        EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
        editLoanAccountInformationPage.setAmount("3000.0");
        loanAccountPage = editLoanAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage().submitAndNavigateToLoanAccountPage();
        loanAccountPage.verifyLoanAmount("3000.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) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Example 5 with EditLoanAccountInformationPage

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

the class CreateGLIMLoanAccountTest method newMonthlyGLIMAccount.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newMonthlyGLIMAccount() throws Exception {
    applicationDatabaseOperation.updateLSIM(1);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Default Group");
    searchParameters.setLoanProduct("MonthlyGroupFlatLoan1stOfMonth");
    CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
    loanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "3010", "0012-Sheep Purchase");
    loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "4010", "0012-Sheep Purchase");
    loanAccountEntryPage.setDisbursalDate("1", "3", "2011");
    EditLoanAccountInformationPage editPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPage().navigateToLoanAccountDetailsPage().navigateToEditAccountInformation();
    editPage.setDayOfMonth("56");
    editPage.submitWithErrors();
    editPage.verifyErrorInForm("Repayment day format is not valid");
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Aggregations

EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)10 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)8 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)7 Test (org.testng.annotations.Test)6 DateTime (org.joda.time.DateTime)4 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)4 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)4 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)4 ArrayList (java.util.ArrayList)3 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)3 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)3 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)3 EditLoanAccountInformationParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationParameters)3 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)3 GLIMClient (org.mifos.test.acceptance.framework.loan.GLIMClient)2 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)2 Calendar (java.util.Calendar)1 CreateLoanAccountCashFlowPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountCashFlowPage)1 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)1 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)1