Search in sources :

Example 1 with ApplyPaymentPage

use of org.mifos.test.acceptance.framework.loan.ApplyPaymentPage in project head by mifos.

the class SavingsPaymentTest method makePaymentFromSavings.

private LoanAccountPage makePaymentFromSavings(String loanGlobalNum, String savingsGlobalNum, int amount) {
    CreateLoanAccountSearchParameters loanSearchParams = new CreateLoanAccountSearchParameters();
    loanSearchParams.setSearchString(loanGlobalNum);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanGlobalNum);
    ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
    PaymentParameters paymentParams = new PaymentParameters();
    paymentParams.setAmount(String.valueOf(amount));
    paymentParams.setPaymentType(PaymentParameters.TRANSFER);
    paymentParams.setSavingsAccountGlobalNum(savingsGlobalNum);
    paymentParams.setTransactionDateDD("13");
    paymentParams.setTransactionDateMM("03");
    paymentParams.setTransactionDateYYYY("2011");
    paymentParams.setSavingsAccountBalance(String.valueOf(SAVINGS_START_BALANCE));
    paymentParams.setSavingsAccountMaxWithdrawalAmount(String.valueOf(0));
    paymentParams.setSavingsAccountType("Voluntary");
    paymentParams.setSavingsAccountName("MonthlyClientSavingsAccount");
    ApplyPaymentConfirmationPage paymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
    return paymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters)

Example 2 with ApplyPaymentPage

use of org.mifos.test.acceptance.framework.loan.ApplyPaymentPage 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();
}
Also used : ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) Test(org.testng.annotations.Test)

Example 3 with ApplyPaymentPage

use of org.mifos.test.acceptance.framework.loan.ApplyPaymentPage 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)

Example 4 with ApplyPaymentPage

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();
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) Test(org.testng.annotations.Test)

Example 5 with ApplyPaymentPage

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();
}
Also used : GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) Test(org.testng.annotations.Test)

Aggregations

ApplyPaymentPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentPage)8 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)4 Test (org.testng.annotations.Test)4 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)3 ApplyPaymentConfirmationPage (org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage)3 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)3 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)2 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)2 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)2 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)2 DateTime (org.joda.time.DateTime)1 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)1 ViewCenterChargesDetailPage (org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage)1 ApplyChargesPage (org.mifos.test.acceptance.framework.client.ApplyChargesPage)1 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)1 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)1 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)1 AccountActivityPage (org.mifos.test.acceptance.framework.loan.AccountActivityPage)1