Search in sources :

Example 1 with ApplyChargesPage

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"));
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ApplyChargesPage(org.mifos.test.acceptance.framework.client.ApplyChargesPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime) ViewCenterChargesDetailPage(org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage) MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters) Test(org.testng.annotations.Test)

Aggregations

DateTime (org.joda.time.DateTime)1 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)1 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)1 ViewCenterChargesDetailPage (org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage)1 ApplyChargesPage (org.mifos.test.acceptance.framework.client.ApplyChargesPage)1 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)1 ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)1 ChargeParameters (org.mifos.test.acceptance.framework.loan.ChargeParameters)1 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)1 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)1 Test (org.testng.annotations.Test)1