use of org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage in project head by mifos.
the class NavigationHelper method navigateToLoanProductDetailsPage.
public LoanProductDetailsPage navigateToLoanProductDetailsPage(String loanProduct) {
ViewLoanProductsPage loanProductsPage = navigateToLoanProductsPage();
LoanProductDetailsPage loanProductDetailsPage = loanProductsPage.viewLoanProductDetails(loanProduct);
loanProductDetailsPage.verifyPage();
return loanProductDetailsPage;
}
use of org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage in project head by mifos.
the class EditLoanProductTest method editExistingLoanProduct.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // one of the dependent methods throws Exception
void editExistingLoanProduct() throws Exception {
EditLoanProductPage editLoanProductPage = createNewLoanProductAndNavigateToEditLoanPage();
editLoanProductPage.verifyPage();
SubmitFormParameters formParameters = new SubmitFormParameters();
formParameters.setDescription("Modified Description");
formParameters.setMaxInterestRate("44");
formParameters.setMinInterestRate("3");
formParameters.setDefaultInterestRate("18");
EditLoanProductPreviewPage editLoanProductPreviewPage = editLoanProductPage.submitDescriptionAndInterestChanges(formParameters);
LoanProductDetailsPage loanProductDetailsPage = editLoanProductPreviewPage.submit();
loanProductDetailsPage.verifyPage();
loanProductDetailsPage.editLoanProduct();
editLoanProductPage.verifyPage();
editLoanProductPage.verifyModifiedDescriptionAndInterest(formParameters);
}
use of org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage in project head by mifos.
the class LoanAccountCycleTest method verifyAmountAndInstallmentsByCycles.
/**
* Verify loan amount with number of installments by loan cycle can be used to create new loans.
* http://mifosforge.jira.com/browse/MIFOSTEST-107
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyAmountAndInstallmentsByCycles() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("product107");
productParams.setOfferingShortName("p107");
productParams.setCalculateLoanAmount(SubmitFormParameters.BY_LOAN_CYCLE);
String[][] cycleLoanAmount = getAmountsByCycle();
productParams.setCycleLoanAmount(cycleLoanAmount);
productParams.setCalculateInstallments(SubmitFormParameters.BY_LOAN_CYCLE);
String[][] calculateInstallments = getInstallmentsByCycle();
productParams.setCycleInstallments(calculateInstallments);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu1233171716380 Client1233171716380");
searchParams.setLoanProduct("product107");
DisburseLoanParameters disburseParams = DisburseLoanParameters.getDisbursalParameters("25", "02", "2011");
LoanProductDetailsPage loanProductDetailsPage = loanProductTestHelper.defineNewLoanProduct(productParams);
loanProductDetailsPage.verifyLoanAmountTableTypeFromCycle(cycleLoanAmount);
loanProductDetailsPage.verifyInstallmentsTableTypeFromCycle(calculateInstallments);
LoanAccountPage loanAccountPage = loanTestHelper.createWithVerificationAndActivationLoanAccount(searchParams, new String[] { "1,000", "5,000", "3000.0" }, null, new String[] { "26", "52", "52" });
loanAccountPage.disburseLoan(disburseParams);
loanTestHelper.createWithVerificationAndActivationLoanAccount(searchParams, new String[] { "2,000", "6,000", "4000.0" }, null, new String[] { "20", "30", "30" });
}
use of org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage in project head by mifos.
the class LoanAccountCycleTest method verifyAmountsAndInstallmentsByLastAmount.
/**
* Verify loan amount with number of installments by last loan amount can be used to create new loans.
* http://mifosforge.jira.com/browse/MIFOSTEST-116
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyAmountsAndInstallmentsByLastAmount() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
productParams.setOfferingName("product116");
productParams.setOfferingShortName("p116");
productParams.setCalculateLoanAmount(SubmitFormParameters.BY_LAST_LOAN_AMOUNT);
String[][] lastLoanAmount = getAmountsFromLastAmount();
productParams.setAmountsByLastLoanAmount(lastLoanAmount);
productParams.setCalculateInstallments(SubmitFormParameters.BY_LAST_LOAN_AMOUNT);
String[][] calculateInstallments = getInstallmentsFromLastAmount();
productParams.setInstallmentsByLastLoanAmount(calculateInstallments);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Stu1233171716380 Client1233171716380");
searchParams.setLoanProduct("product116");
DisburseLoanParameters disburseParams = DisburseLoanParameters.getDisbursalParameters("25", "02", "2011");
LoanProductDetailsPage loanProductDetailsPage = loanProductTestHelper.defineNewLoanProduct(productParams);
loanProductDetailsPage.verifyAmountTableTypeFromLastAmount(lastLoanAmount);
loanProductDetailsPage.verifyInstallmentTableTypeFromLastAmount(calculateInstallments);
LoanAccountPage loanAccountPage = loanTestHelper.createWithVerificationAndActivationLoanAccount(searchParams, new String[] { "500", "1,500", "1200.0" }, null, new String[] { "5", "10", "5" });
String loanFirstID = loanAccountPage.getAccountId();
loanAccountPage.disburseLoan(disburseParams);
loanTestHelper.createWithVerificationAndActivationLoanAccount(searchParams, new String[] { "500", "1,500", "1200.0" }, null, new String[] { "5", "10", "5" });
loanTestHelper.repayLoan(loanFirstID);
loanTestHelper.createWithVerificationAndActivationLoanAccount(searchParams, new String[] { "1,500", "2,500", "2200.0" }, null, new String[] { "10", "20", "15" });
}
use of org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage 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