Search in sources :

Example 41 with LoanAccountPage

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

the class ClientLoanStatusChangeTest method testBackDatedApprovals.

public void testBackDatedApprovals() {
    customPropertiesHelper.setAllowBackdatedApproval(true);
    LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount("Stu1233171716380 Client1233171716380", "WeeklyFlatLoanWithOneTimeFees");
    loanAccountPage.verifyStatus("Application Pending Approval");
    AccountChangeStatusPage changeStatusPage = loanAccountPage.navigateToEditAccountStatus();
    LocalDate approvalDate = new LocalDate(2009, 6, 1);
    EditAccountStatusParameters editAccountStatusParams = new EditAccountStatusParameters();
    editAccountStatusParams.setNote("test note");
    editAccountStatusParams.setAccountStatus(AccountStatus.LOAN_APPROVED);
    editAccountStatusParams.setTrxnDate(approvalDate);
    loanAccountPage = changeStatusPage.setChangeStatusParametersAndSubmit(editAccountStatusParams).submitAndNavigateToLoanAccountPage();
    loanAccountPage.verifyStatus("Application Approved");
    loanAccountPage.verifyLastNoteDate(approvalDate);
}
Also used : AccountChangeStatusPage(org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) LocalDate(org.joda.time.LocalDate) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)

Example 42 with LoanAccountPage

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

the class HolidayTest method holidaysRepaymentRuleWithBatchJobs.

//http://mifosforge.jira.com/browse/MIFOSTEST-75
@Test(enabled = true)
public void holidaysRepaymentRuleWithBatchJobs() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2034, 1, 1, 13, 0, 0, 0));
    //When
    CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
    CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
    LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
    String loanId = page.getAccountId();
    page.navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("13-Jan-2034", "20-Jan-2034", "27-Jan-2034", "03-Feb-2034", "10-Feb-2034", "17-Feb-2034", "24-Feb-2034", "03-Mar-2034", "10-Mar-2034", "17-Mar-2034");
    createHolidayForInstallments(getHolidayParameters("2034"));
    //Then
    runBatchJobsForHoliday();
    navigationHelper.navigateToLoanAccountPage(loanId).navigateToRepaymentSchedulePage();
    loanTestHelper.verifyRepaymentScheduleForHolidays("13-Jan-2034", "20-Jan-2034", "27-Jan-2034", "03-Feb-2034", "10-Feb-2034", "03-Mar-2034", "03-Mar-2034", "03-Mar-2034", "10-Mar-2034", "17-Mar-2034");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 43 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 44 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 45 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)

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