Search in sources :

Example 6 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 7 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)

Example 8 with ApplyPaymentPage

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;
}
Also used : ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) AccountActivityPage(org.mifos.test.acceptance.framework.loan.AccountActivityPage) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

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