use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class AdditionalHolidayTest method testHolidayAffectsFeeSchedule.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-281
void testHolidayAffectsFeeSchedule() throws Exception {
DateTime targetTime = new DateTime(2009, 3, 11, 0, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
// Given
ChargeParameters chargeParameters = new ChargeParameters();
String officeName = "MyOfficeDHMFT";
String centerName = "Default Center";
String groupName = "Default Group";
String clientName = "Holiday TestClient";
String loanId = "000100000000035";
CreateHolidaySubmitParameters params = new CreateHolidayEntryPage.CreateHolidaySubmitParameters();
params.setName("Holiday" + StringUtil.getRandomString(8));
params.setFromDateDD("16");
params.setFromDateMM("03");
params.setFromDateYYYY("2009");
params.setRepaymentRule(CreateHolidaySubmitParameters.MORATORIUM);
params.addOffice(officeName);
// When
chargeParameters.setType("Misc Fees");
chargeParameters.setAmount("100");
centerTestHelper.applyCharge(centerName, chargeParameters);
String centerAmount = navigationHelper.navigateToCenterViewDetailsPage(centerName).getAmountDue();
chargeParameters.setType("Misc Fees");
chargeParameters.setAmount("100");
groupTestHelper.applyCharge(groupName, chargeParameters);
String groupAmount = navigationHelper.navigateToGroupViewDetailsPage(groupName).getAmountDue();
chargeParameters.setType("Misc Fees");
chargeParameters.setAmount("100");
clientTestHelper.applyCharge(clientName, chargeParameters);
String clientAmount = navigationHelper.navigateToClientViewDetailsPage(clientName).getAmountDue();
chargeParameters.setType("loanWeeklyFee");
chargeParameters.setAmount("100");
loanTestHelper.applyChargeUsingFeeLabel(loanId, chargeParameters);
holidayTestHelper.createHoliday(params);
navigationHelper.navigateToAdminPage();
applicationDatabaseOperation.cleanBatchJobTables();
List<String> jobsToRun = new ArrayList<String>();
jobsToRun.add("ApplyHolidayChangesTaskJob");
new BatchJobHelper(selenium).runSomeBatchJobs(jobsToRun);
targetTime = new DateTime(2009, 3, 17, 0, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToCenterViewDetailsPage(centerName).verifyAmountDue(centerAmount);
navigationHelper.navigateToGroupViewDetailsPage(groupName).verifyAmountDue(groupAmount);
navigationHelper.navigateToClientViewDetailsPage(clientName).verifyAmountDue(clientAmount);
navigationHelper.navigateToLoanAccountPage(loanId).navigateToRepaymentSchedulePage().verifyScheduleNotContainDate("16-Mar-2009");
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class AdditionalHolidayTest method getCreateHolidaySubmitParameters.
private CreateHolidaySubmitParameters getCreateHolidaySubmitParameters() {
CreateHolidaySubmitParameters params = new CreateHolidayEntryPage.CreateHolidaySubmitParameters();
params.setName("Holiday" + StringUtil.getRandomString(8));
params.setFromDateDD("01");
params.setFromDateMM("02");
params.setFromDateYYYY("2011");
params.setThruDateDD("14");
params.setThruDateMM("02");
params.setThruDateYYYY("2011");
params.setRepaymentRule(CreateHolidaySubmitParameters.MORATORIUM);
params.addOffice("MyOfficeDHMFT");
return params;
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class AdditionalHolidayTest method testHolidayLoanDisbursement.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void testHolidayLoanDisbursement() throws Exception {
DateTime targetTime = new DateTime(2020, 8, 9, 0, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
String officeName = "MyOfficeDHMFT";
String loanId = "000100000000035";
CreateHolidaySubmitParameters holidayParams = new CreateHolidayEntryPage.CreateHolidaySubmitParameters();
holidayParams.setName("Holiday" + StringUtil.getRandomString(8));
holidayParams.setFromDateDD("16");
holidayParams.setFromDateMM("08");
holidayParams.setFromDateYYYY("2020");
holidayParams.setRepaymentRule(CreateHolidaySubmitParameters.MORATORIUM);
holidayParams.addOffice(officeName);
holidayTestHelper.createHoliday(holidayParams);
DateTime targetTime1 = new DateTime(2020, 8, 16, 0, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime1);
DisburseLoanParameters disburseParams = new DisburseLoanParameters();
disburseParams.setDisbursalDateDD("16");
disburseParams.setDisbursalDateMM("08");
disburseParams.setDisbursalDateYYYY("2020");
disburseParams.setPaymentType(DisburseLoanParameters.CASH);
loanTestHelper.prepareToDisburseLoan(loanId).submitAndNavigateToDisburseLoanConfirmationPage(disburseParams).submitButDisbursalFailed("Disbursement date must be on a working day.");
}
use of org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters 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.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters in project head by mifos.
the class HolidayTest method getHolidayParameters.
private CreateHolidaySubmitParameters getHolidayParameters() {
CreateHolidaySubmitParameters params = new CreateHolidayEntryPage.CreateHolidaySubmitParameters();
params.setName("Holiday Test" + StringUtil.getRandomString(2));
params.setFromDateDD("14");
params.setFromDateMM("02");
params.setFromDateYYYY("2010");
params.setThruDateDD("28");
params.setThruDateMM("02");
params.setThruDateYYYY("2010");
params.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_MEETING_OR_REPAYMENT);
params.addOffice("Mifos HO");
return params;
}
Aggregations