use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ViewOriginalLoanScheduleTest method setLoanSearchParameters.
private CreateLoanAccountSearchParameters setLoanSearchParameters() {
CreateLoanAccountSearchParameters accountSearchParameters = new CreateLoanAccountSearchParameters();
accountSearchParameters.setLoanProduct(loanProductName);
accountSearchParameters.setSearchString(clientName);
return accountSearchParameters;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method verifyCancelButtons.
/**
* Verify functionality of 'Cancel' buttons during the Loan creation flow
* http://mifosforge.jira.com/browse/MIFOSTEST-1178
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyCancelButtons() throws Exception {
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("%");
createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
createLoanAccountSearchPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters2 = new CreateLoanAccountSearchParameters();
formParameters2.setSearchString("Client1233266063395");
CreateLoanAccountSelectLoanProductPage createLoanAccountSelectLoanProductPage = createLoanAccountSearchPage.navigateToCreateLoanAccountSelectLoanProductPage(formParameters2);
createLoanAccountSelectLoanProductPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
formParameters2.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
createLoanAccountEntryPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
createLoanAccountReviewInstallmentPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
createLoanAccountPreviewPage.cancel();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method createLoanAccountsWithRestrictedProductsMix.
/**
* Verify a user is prevented to create loan accounts of loan products restricted by the mix.
* http://mifosforge.jira.com/browse/MIFOSTEST-94
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createLoanAccountsWithRestrictedProductsMix() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 1, 24, 15, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("product94");
productParams.setOfferingShortName("p94");
productParams.setDefaultInterestRate("15.3");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE);
productParams.setDefaultLoanAmount("13333");
productParams.setDefInstallments("13");
productParams.setApplicableFor(DefineNewLoanProductPage.SubmitFormParameters.GROUPS);
loanProductTestHelper.defineNewLoanProduct(productParams);
productParams.setOfferingName("product94B");
productParams.setOfferingShortName("p94b");
loanProductTestHelper.defineNewLoanProduct(productParams);
CreateLoanAccountSearchParameters searchParams1 = new CreateLoanAccountSearchParameters();
searchParams1.setSearchString("GroupWeekly");
searchParams1.setLoanProduct("product94");
CreateLoanAccountSearchParameters searchParams2 = new CreateLoanAccountSearchParameters();
searchParams2.setSearchString("GroupWeekly");
searchParams2.setLoanProduct("product94B");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
disburseParams.setDisbursalDateDD("24");
disburseParams.setDisbursalDateMM("01");
disburseParams.setDisbursalDateYYYY("2011");
String error = "The loan could not be disbursed as " + searchParams1.getLoanProduct() + " and " + searchParams2.getLoanProduct() + " are not allowed to co-exist";
LoanAccountPage loanAccountPage = loanTestHelper.createTwoLoanAccountsWithMixedRestricedPoducts(searchParams1, searchParams2, disburseParams, new DateTime(2011, 02, 28, 10, 0, 0, 0));
loanAccountPage.verifyError(error);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method verifyAccountFromProductInstallmentsSame.
/**
* Verify loan product created with default loan amount and number of installments
* are "same for all loans" can be used to create new loan accounts with the correct default amounts.
* http://mifosforge.jira.com/browse/MIFOSTEST-97
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public //CreateClient: weekly, Stu12332659912419 Client12332659912419, monday, activate
void verifyAccountFromProductInstallmentsSame() throws Exception {
setAppDate(new DateTime(2011, 1, 24, 15, 0, 0, 0));
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("ProdTest97");
productParams.setOfferingShortName("T97");
productParams.setMinLoanAmount("1000");
productParams.setMaxLoanAmount("10000");
productParams.setDefaultLoanAmount("5000");
productParams.setMinInstallemnts("10");
productParams.setMaxInstallments("100");
productParams.setDefInstallments("50");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu12332659912419 Client12332659912419");
searchParams.setLoanProduct("ProdTest97");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
disburseParams.setDisbursalDateDD("24");
disburseParams.setDisbursalDateMM("01");
disburseParams.setDisbursalDateYYYY("2011");
ChargeParameters chargeParameters = new ChargeParameters();
chargeParameters.setType(ChargeParameters.MISC_FEES);
chargeParameters.setAmount("599.0");
LoanAccountPage loanAccountPage = loanTestHelper.createProductAndThenAccount(productParams, searchParams, disburseParams);
loanAccountPage.verifyNumberOfInstallments("10", "100", "50");
loanAccountPage.verifyPrincipalBalance("5,000");
loanTestHelper.applyOneChargeOnLoanAccount(chargeParameters);
loanAccountPage.navigateToViewInstallmentDetails().verifyInstallmentAmount(4, 1, "599");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method verifyCreatingLoanAccountsOnProductWithLoanCycles.
/**
* Verify the loan product created with default number of installments
* by loan cycle can be used to create new loans accounts.
* http://mifosforge.jira.com/browse/MIFOSTEST-99
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyCreatingLoanAccountsOnProductWithLoanCycles() throws Exception {
setAppDate(new DateTime(2011, 1, 24, 15, 0, 0, 0));
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("ProdTest99");
productParams.setOfferingShortName("T99");
productParams.setMinLoanAmount("1000");
productParams.setMaxLoanAmount("10000");
productParams.setDefaultLoanAmount("5000");
productParams.setCalculateInstallments(SubmitFormParameters.BY_LOAN_CYCLE);
String[][] cycleInstallments = { { "26", "52", "52" }, { "20", "30", "30" }, { "15", "25", "25" }, { "10", "15", "15" }, { "5", "10", "10" }, { "1", "5", "5" } };
productParams.setCycleInstallments(cycleInstallments);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu12332659912419 Client12332659912419");
searchParams.setLoanProduct("ProdTest99");
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
disburseParams.setDisbursalDateDD("24");
disburseParams.setDisbursalDateMM("01");
disburseParams.setDisbursalDateYYYY("2011");
LoanProductDetailsPage loanProductDetailsPage = loanProductTestHelper.defineNewLoanProduct(productParams);
loanProductDetailsPage.verifyLoanAmountTableTypeSame("1,000", "10,000", "5,000");
loanProductDetailsPage.verifyInstallmentsTableTypeFromCycle(cycleInstallments);
LoanAccountPage loanAccountPage = loanTestHelper.createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
loanAccountPage.verifyNumberOfInstallments("26", "52", "52");
String loan1ID = loanAccountPage.getAccountId();
loanTestHelper.repayLoan(loan1ID);
loanTestHelper.createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
//extension MIFOSTEST-1186
loanAccountPage.navigateToViewLoanAccountActivityPage();
loanAccountPage.verifyPage("ViewLoanAccountActivity");
Assert.assertEquals(selenium.getTable("accountActivityTable.2.1"), "Loan Disbursal");
Assert.assertEquals(selenium.getTable("accountActivityTable.2.2"), "5,000");
Assert.assertEquals(selenium.getTable("accountActivityTable.2.11"), "5,288");
loanAccountPage.navigateBack();
loanAccountPage.verifyNumberOfInstallments("20", "30", "30");
String loan2ID = loanAccountPage.getAccountId();
loanTestHelper.repayLoan(loan2ID);
loanTestHelper.createActivateAndDisburseDefaultLoanAccount(searchParams, disburseParams);
loanAccountPage.verifyNumberOfInstallments("15", "25", "25");
// extension to verify MIFOS-5005
DisburseLoanConfirmationPage disburseLoanConfirmationPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams).navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(disburseParams);
disburseLoanConfirmationPage.submitButDisbursalFailed("This loan cannot be disbursed because the customer already has an active loan for this loan product.");
}
Aggregations