use of org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage in project head by mifos.
the class CreateClientLoanAccountTest method newWeeklyClientLoanAccountWithModifyErrors.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// add grace period of 10 to "Flat Interest Loan Product With Fee"
@Test(enabled = true)
public void newWeeklyClientLoanAccountWithModifyErrors() throws Exception {
setAppDate(new DateTime(2011, 3, 7, 15, 0, 0, 0));
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("client1 lastname");
searchParameters.setLoanProduct("Flat Interest Loan Product With Fee");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012.0");
String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
submitAccountParameters.setAmount("10666.0");
EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
editAccountParameters.setGracePeriod("15");
EditLoanAccountInformationPage editPreviewLoanAccountPage = loanTestHelper.changeLoanAccountInformationWithErrors(loanId, submitAccountParameters, editAccountParameters);
editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Amount. Amount should be a value between 1 and 10,000, inclusive");
editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Grace period for repayments. Grace period for repayments should be a value less than 12");
}
use of org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage in project head by mifos.
the class CreateGLIMLoanAccountTest method newWeeklyGLIMAccount.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newWeeklyGLIMAccount() throws Exception {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Default Group");
searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
loanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "301", "0012-Sheep Purchase");
loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "401", "0012-Sheep Purchase");
//MIFOS-5703
applicationDatabaseOperation.updateLSIM(1);
EditLoanAccountInformationPage editPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPage().navigateToLoanAccountDetailsPage().navigateToEditAccountInformation();
editPage.verifyRepaymentDayAccessibility(true);
editPage.setWeekFrequency("5");
LoanAccountPage loanPage = editPage.submitAndNavigateToAccountInformationPreviewPage().submitAndNavigateToLoanAccountPage();
loanPage.verifyFrequencyInstallments("5");
EditLoanAccountStatusParameters statusParams = new EditLoanAccountStatusParameters();
statusParams.setNote("GLIM test");
statusParams.setStatus(EditLoanAccountStatusParameters.APPROVED);
loanPage.changeAccountStatus(statusParams);
editPage = loanPage.navigateToEditAccountInformation();
editPage.verifyRepaymentDayAccessibility(true);
editPage.navigateBack();
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD("1");
disburseParams.setDisbursalDateMM("03");
disburseParams.setDisbursalDateYYYY("2011");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanPage.disburseLoan(disburseParams);
editPage = loanPage.navigateToEditAccountInformation();
editPage.verifyRepaymentDayAccessibility(false);
applicationDatabaseOperation.updateLSIM(0);
}
use of org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage in project head by mifos.
the class EditLoanAccountTest method editLoanAccount.
private LoanAccountPage editLoanAccount(String accountID, EditLoanAccountInformationParameters params) {
NavigationHelper helper = new NavigationHelper(selenium);
LoanAccountPage loanAccountPage = helper.navigateToLoanAccountPage(accountID);
EditLoanAccountInformationPage editAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
editAccountInformationPage.editExternalID(params);
EditPreviewLoanAccountPage editPreviewLoanAccountPage = editAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage();
loanAccountPage = editPreviewLoanAccountPage.submitAndNavigateToLoanAccountPage();
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage in project head by mifos.
the class LoanTestHelper method changeLoanAccountInformation.
/**
* TODO: Create a helper for creating a GLIM loan account.
*/
/**
* Edits the loan account with id loanId and updates its settings with the ones in params.
* @param loanId The account id.
* @param accountSubmitParameters The create loan parameters.
* @param editAccountParameters The edit loan parameters.
* @return edit preview loan account page
*/
public LoanAccountPage changeLoanAccountInformation(String loanId, CreateLoanAccountSubmitParameters accountSubmitParameters, EditLoanAccountInformationParameters editAccountParameters) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
EditPreviewLoanAccountPage editPreviewLoanAccountPage = editLoanAccountInformationPage.editAccountParams(accountSubmitParameters, editAccountParameters).submitAndNavigateToAccountInformationPreviewPage();
loanAccountPage = editPreviewLoanAccountPage.submitAndNavigateToLoanAccountPage();
loanAccountPage.verifyLoanDetails(accountSubmitParameters, editAccountParameters);
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage 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);
}
Aggregations