use of org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper in project head by mifos.
the class RemovePenaltiesTest method setUp.
@Override
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
this.navigationHelper = new NavigationHelper(selenium);
this.penaltyHelper = new PenaltyHelper(selenium);
this.dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
}
use of org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper in project head by mifos.
the class PenaltyTest method canRemoveAutomaticPenaltyAfterPaymentHasBeenMade.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canRemoveAutomaticPenaltyAfterPaymentHasBeenMade() throws Exception {
LoanAccountPage loanAccountPage = prepareLoanForPenaltyTest();
String accountId = loanAccountPage.getAccountId();
PenaltyHelper penaltyHelper = new PenaltyHelper(selenium);
String penaltyName = "Penalty_" + StringUtil.getRandomString(6);
penaltyHelper.createRatePenalty(penaltyName, PenaltyFormParameters.PERIOD_NONE, "", PenaltyFormParameters.FREQUENCY_MONTHLY, "33.3", PenaltyFormParameters.FORMULA_OVERDUE_AMOUNT, "0", "9999999");
ChargeParameters chargeParams = new ChargeParameters();
chargeParams.setType(penaltyName);
chargeParams.setAmount("");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanTestHelper.applyChargeUsingFeeLabel(accountId, chargeParams);
new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(new DateTime().plusYears(1));
loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
loanAccountPage = loanAccountPage.removePenalty(1);
loanAccountPage.verifyNoPenaltyRemovalLinkExists(1);
}
use of org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper in project head by mifos.
the class BatchJobPenaltyTest method setUp.
@Override
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
this.navigationHelper = new NavigationHelper(selenium);
this.penaltyHelper = new PenaltyHelper(selenium);
this.dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
}
use of org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper in project head by mifos.
the class MainPenaltyTest method checkPermissionsForPenalties.
@Test(enabled = true, dependsOnMethods = { "verifyCreateAndEditPenalty" })
public void checkPermissionsForPenalties() throws Exception {
String penaltyName = "Penalty Permission";
String accessDenied = "Access Denied";
String youAreNotAllowedToAccessThisPage = "You are not allowed to access this page.";
navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin").disablePermission("0_6").submitAndGotoViewRolesPage();
navigationHelper.navigateToAdminPage().navigateToDefineNewPenaltyPage();
Assert.assertTrue(selenium.isTextPresent(accessDenied));
Assert.assertTrue(selenium.isTextPresent(youAreNotAllowedToAccessThisPage));
navigationHelper.navigateToAdminPage().navigateToViewPenaltiesPage().navigateToDefineNewPenaltyPage();
Assert.assertTrue(selenium.isTextPresent(accessDenied));
Assert.assertTrue(selenium.isTextPresent(youAreNotAllowedToAccessThisPage));
navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin").enablePermission("0_6_0").submitAndGotoViewRolesPage();
new PenaltyHelper(selenium).createAmountPenalty(penaltyName, PERIOD_NONE, "", FREQUENCY_NONE, "1", "999", "5");
navigationHelper.navigateToAdminPage().navigateToViewPenaltiesPage().navigateToViewPenaltyPage(penaltyName).navigateToEditPenaltyPage();
Assert.assertTrue(selenium.isTextPresent(accessDenied));
Assert.assertTrue(selenium.isTextPresent(youAreNotAllowedToAccessThisPage));
navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin").enablePermission("0_6_1").submitAndGotoViewRolesPage();
new PenaltyHelper(selenium).editAmountPenalty(penaltyName, penaltyName, PERIOD_NONE, "", FREQUENCY_NONE, "1", "9999", "3");
}
Aggregations