use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyInterestCalculatedWith365Days.
/**
* Verify the interest should be calculated with 365 days as the base.
* http://mifosforge.jira.com/browse/MIFOSTEST-199
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyInterestCalculatedWith365Days() throws Exception {
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("000100000000052");
LoanAccountPage loanAccountPage = loanTestHelper.navigateToLoanAccountPage(searchParams);
loanAccountPage.verifyPrincipalOriginal("10,000");
loanAccountPage.verifyInterestOriginal("461");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("10461.0");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ProperLoanProductCalculationsTest method verifyProperInterestAndPaymentMonthlyFlatProduct.
/**
* Flat interest rate monthly loan calculates and displays proper interest and payment information.
* http://mifosforge.jira.com/browse/MIFOSTEST-64
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyProperInterestAndPaymentMonthlyFlatProduct() throws Exception {
DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getMonthlyLoanProductParameters();
String productName = "LoanProduct" + StringUtil.getRandomString(5);
productParams.setOfferingName(productName);
productParams.setOfferingShortName(StringUtil.getRandomString(4));
productParams.setDefaultInterestRate("23");
productParams.setMaxInterestRate("50");
productParams.setInterestTypes(SubmitFormParameters.FLAT);
productParams.setDefaultLoanAmount("17231");
productParams.setDefInstallments("23");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString("Client - Mary Monthly");
searchParams.setLoanProduct(productName);
loanProductTestHelper.defineNewLoanProduct(productParams);
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
loanAccountPage.verifyPrincipalOriginal("17,231");
loanAccountPage.verifyInterestOriginal("7,596");
loanAccountPage.verifyFeesOriginal("0");
loanAccountPage.verifyPenaltyOriginal("0");
loanAccountPage.verifyTotalOriginalLoan("24827.0");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class ApplyAdjustmentGroupLoanTest method adjustmentWithCommaTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void adjustmentWithCommaTest() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2013, 02, 8, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Default Group");
searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
loanAccountEntryPage.setDisbursalDate(new DateTime(2013, 2, 8, 15, 0, 0, 0));
loanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "1500", null);
loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1500", null);
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = loanAccountEntryPage.navigateToReviewInstallmentsPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
String loanId = loanAccountPage.getAccountId();
EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
statusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
statusParameters.setNote("Test new GLIM");
loanTestHelper.changeLoanAccountStatus(loanId, statusParameters);
DisburseLoanParameters params = new DisburseLoanParameters();
params.setPaymentType(DisburseLoanParameters.CASH);
loanTestHelper.disburseLoan(loanId, params);
PaymentParameters paymentParameters = new PaymentParameters();
paymentParameters.setAmount("2500.0");
paymentParameters.setPaymentType(PaymentParameters.CASH);
paymentParameters.setTransactionDateDD("08");
paymentParameters.setTransactionDateMM("2");
paymentParameters.setTransactionDateYYYY("2013");
loanTestHelper.applyGroupPayment(loanId, paymentParameters);
loanAccountPage.navigateToApplyAdjustment().fillAdjustmentFieldsWithoutRevertingAndSubmitGroupLoan("2500.0");
Assert.assertFalse(selenium.isTextPresent("stack trace"));
Assert.assertTrue(selenium.isTextPresent("2,500"));
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class SavingsPaymentTest method makePaymentFromSavings.
private LoanAccountPage makePaymentFromSavings(String loanGlobalNum, String savingsGlobalNum, int amount) {
CreateLoanAccountSearchParameters loanSearchParams = new CreateLoanAccountSearchParameters();
loanSearchParams.setSearchString(loanGlobalNum);
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanGlobalNum);
ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setAmount(String.valueOf(amount));
paymentParams.setPaymentType(PaymentParameters.TRANSFER);
paymentParams.setSavingsAccountGlobalNum(savingsGlobalNum);
paymentParams.setTransactionDateDD("13");
paymentParams.setTransactionDateMM("03");
paymentParams.setTransactionDateYYYY("2011");
paymentParams.setSavingsAccountBalance(String.valueOf(SAVINGS_START_BALANCE));
paymentParams.setSavingsAccountMaxWithdrawalAmount(String.valueOf(0));
paymentParams.setSavingsAccountType("Voluntary");
paymentParams.setSavingsAccountName("MonthlyClientSavingsAccount");
ApplyPaymentConfirmationPage paymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
return paymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class LoanProcessWithDifferentCurrencyTest method createLoanAccountOfDifferentCurrency.
@SuppressWarnings({ "PMD.SignatureDeclareThrowsException" })
private // one of the dependent methods throws Exception
String createLoanAccountOfDifferentCurrency(String clientName) throws Exception {
loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString(clientName);
searchParameters.setLoanProduct("Loan With Different Currency");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012");
String fee = "USDfeeAdditional";
submitAccountParameters.setAdditionalFee1(fee);
return createLoanAndCheckAmount(searchParameters, submitAccountParameters);
}
Aggregations