Search in sources :

Example 1 with LoanAccountPage

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

the class UpdateCustomPropertiesTest method changeDigitsAfterDecimal.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-200
@Test
public void changeDigitsAfterDecimal() throws Exception {
    propertiesHelper.setDigitsAfterDecimal(3);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000015");
    loanAccountPage.verifyExactLoanAmount("1,000");
    propertiesHelper.setDigitsAfterDecimal(2);
    loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000015");
    loanAccountPage.verifyExactLoanAmount("1,000");
    propertiesHelper.setDigitsAfterDecimal(0);
    loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000015");
    loanAccountPage.verifyExactLoanAmount("1,000");
    propertiesHelper.setDigitsAfterDecimal(1);
    loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000015");
    loanAccountPage.verifyExactLoanAmount("1,000");
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 2 with LoanAccountPage

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

the class RemovePenaltiesTest method shouldRemovePenaltyWithoutPayment.

@Test(enabled = true)
public void shouldRemovePenaltyWithoutPayment() throws Exception {
    final String accountId = setUpPenaltyAndLoanAccount(true, PenaltyFormParameters.FREQUENCY_WEEKLY);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
    loanAccountPage.removePenalty(1);
    loanAccountPage.verifyNoOneTimePenaltyRemovalLinkExists(1);
    verifyCalculatePenaltyWithoutPenalty(accountId);
}
Also used : LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 3 with LoanAccountPage

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

the class RemovePenaltiesTest method shouldRemovePenaltyBeforeDisbursal.

@Test(enabled = true)
public void shouldRemovePenaltyBeforeDisbursal() throws Exception {
    final String accountId = setUpPenaltyAndLoanAccount(false, PenaltyFormParameters.FREQUENCY_NONE);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
    loanAccountPage.removeOneTimePenalty(1);
    loanAccountPage.verifyNoOneTimePenaltyRemovalLinkExists(1);
    final DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setAmount(loanAccountPage.getOriginalTotalAmount());
    disburseParams.setDisbursalDateDD("15");
    disburseParams.setDisbursalDateMM("2");
    disburseParams.setDisbursalDateYYYY("2012");
    disburseParams.setPaymentType(DisburseLoanParameters.CASH);
    loanAccountPage.changeAccountStatusToAccepted().disburseLoan(disburseParams);
    changeDateTime(04, 1);
    verifyCalculatePenaltyWithoutPenalty(accountId);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 4 with LoanAccountPage

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

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

the class RedoNewGlimLoanDisbursalTest method checkRedoLoanDisbursal.

@Test(enabled = true)
public void checkRedoLoanDisbursal() throws Exception {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    RedoLoanDisbursalSearchPage redoLoanDisbursalSearchPage = adminPage.navigateToRedoLoanDisbursal();
    RedoLoanDisbursalSearchResultsPage redoLoanDisbursalSearchResultsPage = redoLoanDisbursalSearchPage.searchAndNavigateToRedoLoanDisbursalPage("Default Group");
    RedoLoanDisbursalChooseLoanInstancePage redoLoanDisbursalChooseLoanInstancePage = redoLoanDisbursalSearchResultsPage.navigateToRedoLoanDisbursalChooseLoanProductPage("Default Group:ID0002-000000011");
    RedoLoanDisbursalEntryPage redoLoanDisbursalEntryPage = redoLoanDisbursalChooseLoanInstancePage.submitAndNavigateToRedoLoanDisbursalEntryPage("WeeklyGroupDeclineLoanWithPeriodicFee");
    RedoLoanDisbursalParameters redoLoanDisbursalParameters = new RedoLoanDisbursalParameters();
    redoLoanDisbursalParameters.addClient(0, "1000", "0001-Cow Purchase");
    redoLoanDisbursalParameters.addClient(1, "2000", "0001-Cow Purchase");
    redoLoanDisbursalParameters.setInterestRate("10.0");
    redoLoanDisbursalParameters.setDisbursalDateDD("23");
    //one month earlier
    redoLoanDisbursalParameters.setDisbursalDateMM("02");
    redoLoanDisbursalParameters.setDisbursalDateYYYY("2011");
    RedoLoanDisbursalSchedulePreviewPage redoLoanDisbursalPreviewSchedulePage = redoLoanDisbursalEntryPage.submitWithGLIMandLSIPAndNavigateToPreviewPage(redoLoanDisbursalParameters, true);
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(12, 0, "0", "10/03/2011");
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(13, 0, "0", "10/03/2011");
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(12, 1, "200", "11/03/2011");
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(13, 1, "300", "11/03/2011");
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(12, 2, "100", "12/03/2011");
    redoLoanDisbursalPreviewSchedulePage.typeIndividualPaidInstallment(13, 2, "100", "12/03/2011");
    LoanAccountPage loanAccountDetailsPage = redoLoanDisbursalPreviewSchedulePage.submitAndNavigateToRedoLoanDisbursalPreviewPage(true).submitAndNavigateToLoanAccountConfirmationPage().navigateToLoanAccountDetailsPage();
    loanAccountDetailsPage.verifyStatus(LoanAccountPage.ACTIVE);
    loanAccountDetailsPage.verifyAccountSummary("512", "18/03/2011", "209");
    loanAccountDetailsPage.verifyNumberOfInstallments("10");
    loanAccountDetailsPage.verifyTotalAmountPaid("700");
    loanAccountDetailsPage.verifyTotalOriginalLoan("3,033");
    loanAccountDetailsPage.verifyPrincipalBalance("2,315.5");
    loanAccountDetailsPage.verifyInterestOriginal("33");
    ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountDetailsPage.navigateToRepaymentSchedulePage();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(3, "1", "25-Feb-2011", "11-Mar-2011", "297.3", "5.7", "0", "0", "14", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(4, "2", "04-Mar-2011", "12-Mar-2011", "297.8", "5.2", "0", "0", "8", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(5, "3", "11-Mar-2011", "12-Mar-2011", "89.4", "4.6", "0", "0", "1", "94");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(7, "3", "11-Mar-2011", "-", "209", "0", "0", "0", "1", "209");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(9, "4", "18-Mar-2011", "-", "299", "4", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(10, "5", "25-Mar-2011", "-", "299.5", "3.5", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(11, "6", "01-Apr-2011", "-", "300.1", "2.9", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(12, "7", "08-Apr-2011", "-", "300.7", "2.3", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(13, "8", "15-Apr-2011", "-", "301.2", "1.8", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(14, "9", "22-Apr-2011", "-", "301.8", "1.2", "0", "0", "0", "303");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(15, "10", "29-Apr-2011", "-", "304.2", "1.8", "0", "0", "0", "306");
    loanAccountDetailsPage = viewRepaymentSchedulePage.navigateToLoanAccountPage().navigateToIndividualLoanAccountPage(0);
    loanAccountDetailsPage.verifyAccountSummary("104", "18/03/2011", "3");
    loanAccountDetailsPage.verifyNumberOfInstallments("10");
    loanAccountDetailsPage.verifyTotalAmountPaid("300");
    loanAccountDetailsPage.verifyTotalOriginalLoan("1,011");
    loanAccountDetailsPage.verifyPrincipalBalance("705.1");
    loanAccountDetailsPage.verifyInterestOriginal("11");
    viewRepaymentSchedulePage = loanAccountDetailsPage.navigateToRepaymentSchedulePage();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(3, "1", "25-Feb-2011", "11-Mar-2011", "99.1", "1.9", "0", "0", "14", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(4, "2", "04-Mar-2011", "12-Mar-2011", "99.3", "1.7", "0", "0", "8", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(5, "3", "11-Mar-2011", "12-Mar-2011", "96.5", "1.5", "0", "0", "1", "98");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(7, "3", "11-Mar-2011", "-", "3", "0", "0", "0", "1", "3");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(9, "4", "18-Mar-2011", "-", "99.7", "1.3", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(10, "5", "25-Mar-2011", "-", "99.8", "1.2", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(11, "6", "01-Apr-2011", "-", "100", "1", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(12, "7", "08-Apr-2011", "-", "100.2", "0.8", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(13, "8", "15-Apr-2011", "-", "100.4", "0.6", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(14, "9", "22-Apr-2011", "-", "100.6", "0.4", "0", "0", "0", "101");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(15, "10", "29-Apr-2011", "-", "101.4", "0.6", "0", "0", "0", "102");
    loanAccountDetailsPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
    loanAccountDetailsPage = loanAccountDetailsPage.navigateToGroupLoanPageFromIndividualLoanPage();
    loanAccountDetailsPage = loanAccountDetailsPage.navigateToIndividualLoanAccountPage(1);
    loanAccountDetailsPage.verifyAccountSummary("408", "18/03/2011", "206");
    loanAccountDetailsPage.verifyNumberOfInstallments("10");
    loanAccountDetailsPage.verifyTotalAmountPaid("400");
    loanAccountDetailsPage.verifyTotalOriginalLoan("2,022");
    loanAccountDetailsPage.verifyPrincipalBalance("1,607.3");
    loanAccountDetailsPage.verifyInterestOriginal("22");
    viewRepaymentSchedulePage = loanAccountDetailsPage.navigateToViewRepaymentSchedule();
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(3, "1", "25-Feb-2011", "11-Mar-2011", "198.2", "3.8", "0", "0", "14", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(4, "2", "04-Mar-2011", "12-Mar-2011", "194.5", "3.5", "0", "0", "8", "198");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(6, "2", "04-Mar-2011", "-", "4", "0", "0", "0", "8", "4");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(7, "3", "11-Mar-2011", "-", "198.9", "3.1", "0", "0", "4", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(9, "4", "18-Mar-2011", "-", "199.3", "2.7", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(10, "5", "25-Mar-2011", "-", "199.7", "2.3", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(11, "6", "01-Apr-2011", "-", "200.1", "1.9", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(12, "7", "08-Apr-2011", "-", "200.5", "1.5", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(13, "8", "15-Apr-2011", "-", "200.8", "1.2", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(14, "9", "22-Apr-2011", "-", "201.2", "0.8", "0", "0", "0", "202");
    viewRepaymentSchedulePage.verifyRepaymentScheduleTableRow(15, "10", "29-Apr-2011", "-", "202.8", "1.2", "0", "0", "0", "204");
}
Also used : RedoLoanDisbursalSchedulePreviewPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSchedulePreviewPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) RedoLoanDisbursalParameters(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) RedoLoanDisbursalSearchPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSearchPage) RedoLoanDisbursalChooseLoanInstancePage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalChooseLoanInstancePage) RedoLoanDisbursalEntryPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalEntryPage) RedoLoanDisbursalSearchResultsPage(org.mifos.test.acceptance.framework.loan.RedoLoanDisbursalSearchResultsPage) Test(org.testng.annotations.Test)

Aggregations

LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)130 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)50 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)37 Test (org.testng.annotations.Test)36 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)29 DateTime (org.joda.time.DateTime)28 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)22 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)20 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)16 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)15 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)14 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)10 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)10 ArrayList (java.util.ArrayList)9 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)9 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)9 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)9 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)8 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)8 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)8