use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class CreateMultipleLoanAccountTest method setUp.
@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
officeHelper = new OfficeHelper(selenium);
userHelper = new UserHelper(selenium);
centerTestHelper = new CenterTestHelper(selenium);
navigationHelper = new NavigationHelper(selenium);
loanProductTestHelper = new LoanProductTestHelper(selenium);
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper 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.NavigationHelper in project head by mifos.
the class CreateSavingsAccountTest method verifyPaymentTypesForWithdrawalsAndDeposits.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(singleThreaded = true, groups = { "savings", "acceptance", "ui", "no_db_unit" })
public void verifyPaymentTypesForWithdrawalsAndDeposits() throws Exception {
//When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsWithdrawalsType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsWithdrawalsType(defineAcceptedPaymentTypesPage.VOUCHER);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsDepositsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsDepositsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("248.0");
SavingsAccountDetailPage savingsAccountDetailPage = savingsAccountHelper.createSavingsAccountWithQG(searchParameters, submitAccountParameters);
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("test");
savingsAccountDetailPage = savingsAccountHelper.changeStatus(savingsAccountDetailPage.getAccountId(), editAccountStatusParameters);
SavingsDepositWithdrawalPage savingsDepositWithdrawalPage = savingsAccountDetailPage.navigateToDepositWithdrawalPage();
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.DEPOSIT);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
//When
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.WITHDRAWAL);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
//When
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage("000100000000002");
savingsDepositWithdrawalPage = savingsAccountDetailPage.navigateToDepositWithdrawalPage();
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.DEPOSIT);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class TestDataSetup method createClient.
public void createClient(String clientName, String officeName, String loanOfficerName) throws SQLException {
CreateClientEnterPersonalDataPage.SubmitFormParameters clientPersonalInfoParameters = defineClient(clientName);
if (applicationDatabaseOperation.doesClientExist(clientName, officeName)) {
return;
}
new NavigationHelper(selenium).navigateToHomePage().navigateToClientsAndAccountsUsingHeaderTab().navigateToCreateNewClientPage().navigateToCreateClientWithoutGroupPage().chooseOffice(officeName).create(clientPersonalInfoParameters).submitAndGotoCreateClientEnterMfiDataPage().submitAndGotoCreateClientPreviewDataPage(defineMfiData(loanOfficerName)).submit().navigateToClientViewDetailsPage().navigateToCustomerChangeStatusPage().setChangeStatusParametersAndSubmit(setApprovalStatus()).submitAndGotoClientViewDetailsPage().navigateToEditMeetingSchedule().editClientMeeting(setMeetingScheduleParameters());
}
use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.
the class AttachSurveyLinkTest method setUp.
@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod
public void setUp() throws Exception {
super.setUp();
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2009, 7, 11, 14, 01, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper = new NavigationHelper(selenium);
questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
questionGroupTestHelper.markQuestionGroupAsActive(QG_FOR_VIEW_CLIENT_CENTRE_GROUP_LOAN);
}
Aggregations