use of org.mifos.test.acceptance.framework.loan.ApplyPaymentPage 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.loan.ApplyPaymentPage 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();
}
use of org.mifos.test.acceptance.framework.loan.ApplyPaymentPage in project head by mifos.
the class LoanTestHelper method applyPayment.
/**
* Applies a payment to the loan account with id <tt>loanId</tt>.
* @param loanId The account id.
* @param paymentParams The payment parameters.
* @return The loan account page for the loan account.
*/
public LoanAccountPage applyPayment(String loanId, PaymentParameters paymentParams) {
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanId);
ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
loanAccountPage = applyPaymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
AccountActivityPage accountActivityPage = loanAccountPage.navigateToAccountActivityPage();
accountActivityPage.verifyLastTotalPaid(paymentParams.getAmount(), 2);
accountActivityPage.navigateBack();
return loanAccountPage;
}
Aggregations