use of org.mifos.test.acceptance.framework.client.ApplyChargesPage in project head by mifos.
the class CenterTest method verifyApplyPaymentForCenterWithUnusualName.
@Test(enabled = true)
public void verifyApplyPaymentForCenterWithUnusualName() {
String centerName = "`~!@#$%^&*()_+-=[];',./{}|:<>? Center";
CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
formParameters.setCenterName(centerName);
formParameters.setLoanOfficer("loan officer");
MeetingParameters meeting = MeetingParameters.getRandomMeetingParameters();
formParameters.setMeeting(meeting);
centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
NavigationHelper navigationHelper = new NavigationHelper(selenium);
ViewCenterChargesDetailPage viewCenterChargesDetailPage = navigationHelper.navigateToCenterViewDetailsPage(centerName).navigateToViewCenterChargesDetailPage();
ApplyChargesPage applyChargesPage = viewCenterChargesDetailPage.navigateToApplyCharges();
ChargeParameters chargeParameters = new ChargeParameters();
chargeParameters.setAmount("100");
chargeParameters.setType(ChargeParameters.MISC_FEES);
viewCenterChargesDetailPage = applyChargesPage.applyChargeAndNaviagteToViewCenterChargesDetailPage(chargeParameters);
ApplyPaymentPage applyPaymentPage = viewCenterChargesDetailPage.navigateToApplyPayments();
PaymentParameters parameters = new PaymentParameters();
DateTime dateTime = new DateTime();
parameters.setAmount("100");
parameters.setTransactionDateDD(Integer.toString(dateTime.getDayOfMonth()));
parameters.setTransactionDateMM(Integer.toString(dateTime.getMonthOfYear()));
parameters.setTransactionDateYYYY(Integer.toString(dateTime.getYear()));
parameters.setPaymentType(PaymentParameters.CASH);
ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(parameters);
//ElementPresent("css=form[name=applyPaymentActionForm]"));
Assert.assertEquals(true, applyPaymentConfirmationPage.getSelenium().isTextPresent("Review transaction"));
}
Aggregations