use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class UpdateCustomPropertiesTest method verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts.
/*
* FIXME - keithw - test passes when run individually but not as part of ci build. it appears that question groups data is not
* cleaned up right as instead of stepping to review installments, the questionnaire page is presented.
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-215
@Test(enabled = true)
public void verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts() throws Exception {
//Given
propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
propertiesHelper.setLoanPendingApprovalStateEnabled("true");
propertiesHelper.setGroupPendingApprovalStateEnabled("true");
//When
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString("UpdateCustomProperties TestClient");
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("248.0");
SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
savingsAccountPage.verifyPage();
//Then
savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
savingsAccountPage.verifyStatus("Application Pending Approval");
//when
CreateLoanAccountSearchParameters searchParameters2 = new CreateLoanAccountSearchParameters();
searchParameters2.setSearchString("UpdateCustomProperties TestClient");
searchParameters2.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountSubmitParameters submitAccountParameters2 = new CreateLoanAccountSubmitParameters();
submitAccountParameters2.setAmount("2765.0");
submitAccountParameters2.setGracePeriodTypeNone(true);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount(searchParameters2, submitAccountParameters2);
loanAccountPage.verifyStatus("Application Pending Approval");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class ClientTest method addLoanToCustomer.
private LoanAccountPage addLoanToCustomer(String searchString, boolean active, String loanProduct, DateTime date) throws UnsupportedEncodingException {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
CreateLoanAccountSubmitParameters submitParameters = new CreateLoanAccountSubmitParameters();
submitParameters.setAmount("1000");
submitParameters.setDd(String.valueOf(date.getDayOfMonth()));
submitParameters.setMm(String.valueOf(date.getMonthOfYear()));
submitParameters.setYy(String.valueOf(date.getYear()));
searchParameters.setLoanProduct(loanProduct);
searchParameters.setSearchString(searchString);
LoanAccountPage lap = loanTestHelper.createLoanAccount(searchParameters, submitParameters);
if (active) {
loanTestHelper.activateLoanAccount(lap.getAccountId());
loanTestHelper.disburseLoan(date);
}
return lap;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleSameDayWithBatchJobs.
//http://mifosforge.jira.com/browse/MIFOSTEST-74
@Test(enabled = true)
public void holidaysRepaymentRuleSameDayWithBatchJobs() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2035, 1, 1, 13, 0, 0, 0));
//When
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
String lid = page.getAccountId();
page.navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
CreateHolidaySubmitParameters param = getHolidayParameters("2035");
param.setRepaymentRule(CreateHolidaySubmitParameters.SAME_DAY);
createHolidayForInstallments(param);
//Then
runBatchJobsForHoliday();
navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleNextWorkingDayWithBatchJobs.
//http://mifosforge.jira.com/browse/MIFOSTEST-76
@Test(enabled = true)
public void holidaysRepaymentRuleNextWorkingDayWithBatchJobs() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2036, 1, 1, 13, 0, 0, 0));
//When
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
String lid = page.getAccountId();
page.navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "15-Feb-2036", "22-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
CreateHolidaySubmitParameters param = getHolidayParameters("2036");
param.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_WORKING_DAY);
createHolidayForInstallments(param);
//Then
runBatchJobsForHoliday();
navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "29-Feb-2036", "29-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRule.
/*
* FIXME: KEITHW - disabling these holiday tests as when they create a loan, they are expecting to go to a
* 'nextPayment_loanAccount' page to see 'review of installments'???
*/
//http://mifosforge.jira.com/browse/MIFOSTEST-79
@Test(enabled = true)
public void holidaysRepaymentRule() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2031, 1, 1, 13, 0, 0, 0));
//When
createHolidayForInstallments(getHolidayParameters("2031"));
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
//Then
loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("10-Jan-2031", "17-Jan-2031", "24-Jan-2031", "31-Jan-2031", "07-Feb-2031", "07-Mar-2031", "07-Mar-2031", "07-Mar-2031", "07-Mar-2031", "14-Mar-2031");
}
Aggregations