Search in sources :

Example 21 with ViewRepaymentSchedulePage

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

the class PenaltyTest method verifyRepaymentSchelude.

private void verifyRepaymentSchelude(LoanAccountPage loanAccountPage, String penalty, String payment, String diff) {
    DisburseLoanParameters disburseLoanParameters = new DisburseLoanParameters();
    disburseLoanParameters.setPaymentType(DisburseLoanParameters.CASH);
    loanAccountPage.navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseLoanParameters).submitAndNavigateToLoanAccountPage();
    ViewRepaymentSchedulePage repaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
    repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
    ApplyPaymentPage paymentPage = repaymentSchedulePage.navigateToApplyPaymentPage();
    PaymentParameters paymentParameters = new PaymentParameters();
    paymentParameters.setTransactionDateDD("28");
    paymentParameters.setTransactionDateMM("02");
    paymentParameters.setTransactionDateYYYY("2011");
    paymentParameters.setAmount(payment);
    paymentParameters.setPaymentType(PaymentParameters.CASH);
    paymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParameters).submitAndNavigateToLoanAccountDetailsPage().navigateToRepaymentSchedulePage();
    repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 6, payment);
    repaymentSchedulePage.verifyRepaymentScheduleTableRow(3, 8, payment);
    repaymentSchedulePage.verifyRepaymentScheduleTableRow(5, 6, diff);
    repaymentSchedulePage.verifyRunningBalanceTableRow(3, 3, diff);
    ApplyAdjustmentPage adjustmentPage = repaymentSchedulePage.navigateToApplyAdjustment();
    adjustmentPage.fillAdjustmentFieldsAndSubmit(payment).navigateToRepaymentSchedulePage();
    repaymentSchedulePage.verifyRepaymentScheduleTablePenalties(3, penalty);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) ApplyAdjustmentPage(org.mifos.test.acceptance.framework.loan.ApplyAdjustmentPage) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Aggregations

ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)21 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)15 Test (org.testng.annotations.Test)10 DateTime (org.joda.time.DateTime)8 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)8 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)7 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)7 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)6 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)6 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)5 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)5 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)4 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)4 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)3 TransactionHistoryPage (org.mifos.test.acceptance.framework.loan.TransactionHistoryPage)3 ImportTransactionsConfirmationPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsConfirmationPage)2 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)2