Search in sources :

Example 21 with CreateLoanAccountEntryPage

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

the class ApplyPaymentOnGLIMLoanAccountTest method createNewLoan.

private LoanAccountPage createNewLoan() {
    ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
    formParameters.setSearchString("Default Group");
    formParameters.setLoanProduct("GroupEmergencyLoan");
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
    createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 3, 4, 15, 0, 0, 0));
    createLoanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "250", "0009-Horse");
    createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "500", "0001-Cow Purchase");
    createLoanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1000", "0003-Goat Purchase");
    createLoanAccountEntryPage.setInstallments("10");
    createLoanAccountEntryPage.setInterestRate("0");
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    return createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) DateTime(org.joda.time.DateTime) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 22 with CreateLoanAccountEntryPage

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

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithTodayMeetingStartDateAndCurrentWeekDay.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithTodayMeetingStartDateAndCurrentWeekDay(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.FRIDAY);
    meeting.setMeetingStartDate("19/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("19", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 23 with CreateLoanAccountEntryPage

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

the class CenterMeetingTest method verifyDefaultDisburstmentDateWithTodayMeetingStartDate.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void verifyDefaultDisburstmentDateWithTodayMeetingStartDate(int lsim) throws Exception {
    databaseOperation.updateLSIM(lsim);
    DateTime time = new DateTime(2012, 10, 19, 1, 0, 0, 0);
    setTime(time);
    MeetingParameters meeting = new MeetingParameters();
    meeting.setMeetingPlace("centerTestMeetingPlace" + StringUtil.getRandomString(5));
    meeting.setWeekFrequency("1");
    meeting.setWeekDay(MeetingParameters.WeekDay.MONDAY);
    meeting.setMeetingStartDate("19/10/2012");
    prepareCenterForTest(meeting);
    prepareGroupForTest();
    LoanTestHelper loanHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage loanEntryPage = loanHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(groupName, loanProductName);
    loanEntryPage.verifyDisbsursalDate("22", "10", "2012");
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 24 with CreateLoanAccountEntryPage

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

the class AdditionalHolidayTest method createLoan.

private void createLoan(final CreateLoanAccountSearchParameters searchParameters, final CreateLoanAccountSubmitParameters submitAccountParameters) {
    logOut();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = navigateToCreateLoanAccountSearchPage();
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountEntryPage.submitAndNavigateToLoanAccountConfirmationPage(submitAccountParameters);
    createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Also used : CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)

Example 25 with CreateLoanAccountEntryPage

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

the class LoanTestHelper method createAndActivateDefaultLoanAccount.

public LoanAccountPage createAndActivateDefaultLoanAccount(CreateLoanAccountSearchParameters searchParams) {
    CreateLoanAccountEntryPage createLoanAccountEntryPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateLoanAccountUsingLeftMenu().searchAndNavigateToCreateLoanAccountPage(searchParams);
    createLoanAccountEntryPage.setLonaPurpose("0013-Hybrid Cow");
    Double loanAmountDouble = Double.valueOf(createLoanAccountEntryPage.getLoanAmount());
    String loanAmount = new NumberFormatter().print(loanAmountDouble, Locale.ENGLISH);
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.clickContinue();
    createLoanAccountReviewInstallmentPage = createLoanAccountReviewInstallmentPage.verifyPage();
    createLoanAccountReviewInstallmentPage.verifyLoanAmount(loanAmount);
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    createLoanAccountPreviewPage.verifyLoanAmount(loanAmount);
    return createLoanAccountPreviewPage.submit().navigateToLoanAccountDetailsPage().changeAccountStatusToAccepted();
}
Also used : CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) NumberFormatter(org.springframework.format.number.NumberFormatter)

Aggregations

CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)33 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)22 DateTime (org.joda.time.DateTime)16 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)14 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)13 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)12 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)12 Test (org.testng.annotations.Test)12 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)10 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)10 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)7 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)6 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)6 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)5 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)5 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)5 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)5 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)5 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)4 ArrayList (java.util.ArrayList)2