Search in sources :

Example 81 with CreateLoanAccountSearchParameters

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

the class CreateGLIMLoanAccountTest method checkGLIMAccountEmptyPurpose.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void checkGLIMAccountEmptyPurpose() throws Exception {
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Default Group");
    searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
    CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
    loanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "9999", "0012-Sheep Purchase");
    loanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "99999");
    loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "99999");
    CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = loanAccountEntryPage.navigateToReviewInstallmentsPage();
    CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
    LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
    String[] purposes = { "0012-Sheep Purchase", "-", "-" };
    loanAccountPage.verifyGLIMPurpose(purposes);
    loanAccountPage.verifyGLIMIndividualScheduleLinks(3, true);
    EditPreviewLoanAccountPage previewLoanAccountPage = loanAccountPage.navigateToEditAccountInformation().submitAndNavigateToAccountInformationPreviewPage();
    previewLoanAccountPage.verifyGLIMPurpose(purposes);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountPreviewPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) CreateLoanAccountReviewInstallmentPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) Test(org.testng.annotations.Test)

Example 82 with CreateLoanAccountSearchParameters

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

the class CreateGLIMLoanAccountTest method verifyLoanAccountCreationPipelineWhenGlimIsEnabled.

// http://mifosforge.jira.com/browse/MIFOSTEST-134
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyLoanAccountCreationPipelineWhenGlimIsEnabled() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 7, 11, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Stu1233266063395 Client1233266063395");
    searchParameters.setLoanProduct("ClientEmergencyLoan");
    String[] locators = { "name=prdOfferingId", "loancreationdetails.input.sumLoanAmount", "loancreationdetails.input.interestRate", "loancreationdetails.input.numberOfInstallments", "disbursementDateDD", "disbursementDateMM", "disbursementDateYY", "name=loanOfferingFund", "name=businessActivityId", "name=collateralTypeId", "name=collateralNote", "name=externalId", "name=selectedFee[0].feeId", "name=selectedFee[0].amount", "name=selectedFee[1].feeId", "name=selectedFee[1].amount", "name=selectedFee[2].feeId", "name=selectedFee[2].amount", "loancreationdetails.button.continue", "loancreationdetails.button.cancel" };
    //When / Then
    loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters).verifyAllElementsArePresent(locators);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Example 83 with CreateLoanAccountSearchParameters

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

the class CreateGroupLoanAccountTest method newMonthlyGroupLoanAccountWithMeetingOnSameWeekAndWeekdayOfMonth.

@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newMonthlyGroupLoanAccountWithMeetingOnSameWeekAndWeekdayOfMonth() throws Exception {
    homePage = loginSuccessfully();
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("GroupMeetsOn3rdFriday");
    searchParameters.setLoanProduct("MonthlyGroupFlatLoan1stOfMonth");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1000.0");
    ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
    CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
    CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
    createLoanAccountEntryPage.verifyPage();
    CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountEntryPage.submitAndNavigateToLoanAccountConfirmationPage(submitAccountParameters);
    createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateLoanAccountConfirmationPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Example 84 with CreateLoanAccountSearchParameters

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

the class FeeTest method applyAndWaiveFee.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyAndWaiveFee() throws Exception {
    // approved loan
    String accountId = "000100000000047";
    CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
    searchParams.setSearchString(accountId);
    ChargeParameters feeParameters = new ChargeParameters();
    feeParameters.setAmount("15");
    feeParameters.setType(ChargeParameters.MISC_FEES);
    loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
    loanTestHelper.applyCharge(accountId, feeParameters);
    loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "15", "0", "10476.0");
    loanTestHelper.waiveFee(accountId);
    loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Example 85 with CreateLoanAccountSearchParameters

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

the class FeeTest method applyFee.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyFee() throws Exception {
    // approved loan
    String accountId = "000100000000046";
    CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
    searchParams.setSearchString(accountId);
    ChargeParameters params = new ChargeParameters();
    params.setType(ChargeParameters.MISC_FEES);
    params.setAmount("10");
    loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "0", "0", "10461.0");
    loanTestHelper.applyCharge(accountId, params);
    loanTestHelper.verifyOriginalValues(searchParams, "10,000", "461", "10", "0", "10471.0");
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

Aggregations

CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)95 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)50 Test (org.testng.annotations.Test)46 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)36 DateTime (org.joda.time.DateTime)35 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)26 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)22 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)22 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)19 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)19 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)13 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)12 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)12 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)11 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)11 ArrayList (java.util.ArrayList)9 EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)8 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)8 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)8 EditLoanAccountInformationPage (org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage)7