use of org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage in project head by mifos.
the class ClientTest method verifyAcceptedPaymentTypes.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-248
@Test(enabled = true)
public void verifyAcceptedPaymentTypes() throws Exception {
// When
String groupName = "group1";
CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
clientParams = clientParams();
clientParams.setFirstName("John");
clientParams.setLastName("Doe123");
ClientViewDetailsPage clientViewDetailsPage = clientTestHelper.createNewClient(groupName, clientParams);
clientViewDetailsPage.verifyHeading("John Doe123");
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToClientViewDetailsPage("John Doe123").navigateToViewClientChargesDetail().navigateToApplyPayments();
// Then
applyPaymentPage.verifyModeOfPayments();
}
use of org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage in project head by mifos.
the class ClientLoanDisbursalTest method verifyAcceptedPaymentTypesForDisbursementsOfLoan.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-249
void verifyAcceptedPaymentTypesForDisbursementsOfLoan() throws Exception, InterruptedException {
// When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
searchParams.setSearchString("Stu1233266063395 Client1233266063395");
//Extension https://mifosforge.jira.com/browse/MIFOSTEST-1194
LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
DisburseLoanPage disburseLoanPage = loanAccountPage.navigateToDisburseLoan();
DisburseLoanParameters params = new DisburseLoanParameters();
params.setDisbursalDateDD("20");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
params.setPaymentType(params.CASH);
disburseLoanPage.verifyDisbursalDateIsFutureDate(params);
//disburseLoanPage.submitWithWrongParams(params, "Date of transaction can not be a future date");
params.setDisbursalDateDD("01");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
disburseLoanPage.verifyDisbursalDateIsPriorToClientMeetingSchedule(params);
params.setDisbursalDateDD("04");
params.setDisbursalDateMM("03");
params.setDisbursalDateYYYY("2011");
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(params).submitAndNavigateToLoanAccountPage();
String[] locators = { "Payment rcvd.", "accountActivityTable.2.1" };
loanAccountPage.navigateToViewLoanAccountActivityPage().verifyAllElementsArePresent(locators);
//When
disburseLoanPage = navigationHelper.navigateToLoanAccountPage("000100000000020").navigateToDisburseLoan();
//Then
disburseLoanPage.verifyModeOfPayments();
disburseLoanPage.verifyPaymentModesOfPaymentAreEmpty();
disburseLoanPage.verifyPaymentModeOfPaymentIsEditable("payment mode of payment must be editable when a disbursal fee exists.");
}
use of org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage 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.admin.DefineAcceptedPaymentTypesPage in project head by mifos.
the class CenterTest method verifyAcceptedPaymentTypesForCenter.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-246
@Test(enabled = true)
public void verifyAcceptedPaymentTypesForCenter() throws Exception {
// When
CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
String testCenterName = "Center" + StringUtil.getRandomString(6);
formParameters.setCenterName(testCenterName);
formParameters.setLoanOfficer("loan officer");
MeetingParameters meeting = new MeetingParameters();
meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(2));
meeting.setWeekFrequency("1");
meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
formParameters.setMeeting(meeting);
centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToCenterViewDetailsPage(testCenterName).navigateToViewCenterChargesDetailPage().navigateToApplyPayments();
// Then
applyPaymentPage.verifyModeOfPayments();
}
use of org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage in project head by mifos.
the class GroupTest method verifyAcceptedPaymentTypesForGroup.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-247
@Test(singleThreaded = true, groups = { "group", "acceptance", "ui", "no_db_unit" })
public void verifyAcceptedPaymentTypesForGroup() throws Exception {
//When
GroupTestHelper groupTestHelper = new GroupTestHelper(selenium);
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
groupParams.setGroupName("TestGroup123456");
groupTestHelper.createNewGroup("Default Center", groupParams);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToGroupViewDetailsPage("TestGroup123456").navigateToViewGroupChargesDetailPage().navigateToApplyPayments();
//Then
applyPaymentPage.verifyModeOfPayments();
}
Aggregations