Search in sources :

Example 6 with EditLoanAccountStatusParameters

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

the class GuarantyCoreTest method createAndDisburseGroupLoan.

public void createAndDisburseGroupLoan() throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2013, 04, 9, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Default Group");
    searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
    List<GLIMClient> glimClients = new ArrayList<GLIMClient>();
    glimClients.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "1000", null));
    glimClients.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "100", null));
    LoanAccountPage loanAccountPage = loanTestHelper.createGroupLoanAccount(searchParameters, glimClients);
    String loanId = loanAccountPage.getAccountId();
    EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
    statusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
    statusParameters.setNote("Test apply Guaranty");
    loanTestHelper.changeLoanAccountStatus(loanId, statusParameters);
    DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setDisbursalDateDD("09");
    disburseParams.setDisbursalDateMM("04");
    disburseParams.setDisbursalDateYYYY("2013");
    disburseParams.setPaymentType(DisburseLoanParameters.CASH);
    loanAccountPage = loanAccountPage.disburseLoan(disburseParams);
    verifyGuarantyGroupIndividualLoan(loanAccountPage);
}
Also used : EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters) DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) ArrayList(java.util.ArrayList) GLIMClient(org.mifos.test.acceptance.framework.loan.GLIMClient) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime)

Example 7 with EditLoanAccountStatusParameters

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

the class ClientLoanStatusChangeTest method pendingApprovalToApplicationRejected.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void pendingApprovalToApplicationRejected() throws Exception {
    EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
    statusParameters.setStatus(EditLoanAccountStatusParameters.CANCEL);
    statusParameters.setCancelReason(EditLoanAccountStatusParameters.CANCEL_REASON_REJECTED);
    statusParameters.setNote("Test");
    String loanId = "000100000000054";
    loanTestHelper.changeLoanAccountStatus(loanId, statusParameters);
    loanTestHelper.verifyLastEntryInStatusHistory(loanId, EditLoanAccountStatusParameters.PENDING_APPROVAL, EditLoanAccountStatusParameters.CANCEL);
}
Also used : EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)

Example 8 with EditLoanAccountStatusParameters

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

the class ClientLoanStatusChangeTest method pendingApprovalToApplicationApprovedWithQuestionGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void pendingApprovalToApplicationApprovedWithQuestionGroup() throws Exception {
    String qgForLoanApproval = "QGForLoanApproval";
    QuestionGroupTestHelper questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsActive(qgForLoanApproval);
    EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
    statusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
    statusParameters.setNote("Test");
    QuestionResponseParameters responseParameters = new QuestionResponseParameters();
    responseParameters.addTextAnswer("create_ClientPersonalInfo.input.customField", "testResponse");
    loanTestHelper.changeLoanAccountStatusProvidingQuestionGroupResponses("000100000000055", statusParameters, responseParameters);
    questionGroupTestHelper.markQuestionGroupAsInactive(qgForLoanApproval);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters) QuestionResponseParameters(org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)

Example 9 with EditLoanAccountStatusParameters

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

the class ClientLoanStatusHistoryTest method newLoanToPartialApplicationToPendingApprovalToApproved.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newLoanToPartialApplicationToPendingApprovalToApproved() throws Exception {
    String loanId = "000100000000053";
    loanTestHelper.verifyLastEntryInStatusHistory(loanId, EditLoanAccountStatusParameters.NEW, EditLoanAccountStatusParameters.PENDING_APPROVAL);
    EditLoanAccountStatusParameters params = new EditLoanAccountStatusParameters();
    params.setStatus(EditLoanAccountStatusParameters.PARTIAL_APPLICATION);
    params.setNote("Partial app.");
    loanTestHelper.changeLoanAccountStatus(loanId, params);
    loanTestHelper.verifyLastEntryInStatusHistory(loanId, EditLoanAccountStatusParameters.PENDING_APPROVAL, EditLoanAccountStatusParameters.PARTIAL_APPLICATION);
    params.setStatus(EditLoanAccountStatusParameters.PENDING_APPROVAL);
    params.setNote("More data arrived.");
    loanTestHelper.changeLoanAccountStatus(loanId, params);
    loanTestHelper.verifyLastEntryInStatusHistory(loanId, EditLoanAccountStatusParameters.PARTIAL_APPLICATION, EditLoanAccountStatusParameters.PENDING_APPROVAL);
    params.setStatus(EditLoanAccountStatusParameters.APPROVED);
    params.setNote("Approved.");
    loanTestHelper.changeLoanAccountStatus(loanId, params);
    loanTestHelper.verifyLastEntryInStatusHistory(loanId, EditLoanAccountStatusParameters.PENDING_APPROVAL, EditLoanAccountStatusParameters.APPROVED);
}
Also used : EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)

Example 10 with EditLoanAccountStatusParameters

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

the class CreateGLIMLoanAccountTest method newWeeklyGLIMAccount.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newWeeklyGLIMAccount() 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", "301", "0012-Sheep Purchase");
    loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "401", "0012-Sheep Purchase");
    //MIFOS-5703
    applicationDatabaseOperation.updateLSIM(1);
    EditLoanAccountInformationPage editPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPage().navigateToLoanAccountDetailsPage().navigateToEditAccountInformation();
    editPage.verifyRepaymentDayAccessibility(true);
    editPage.setWeekFrequency("5");
    LoanAccountPage loanPage = editPage.submitAndNavigateToAccountInformationPreviewPage().submitAndNavigateToLoanAccountPage();
    loanPage.verifyFrequencyInstallments("5");
    EditLoanAccountStatusParameters statusParams = new EditLoanAccountStatusParameters();
    statusParams.setNote("GLIM test");
    statusParams.setStatus(EditLoanAccountStatusParameters.APPROVED);
    loanPage.changeAccountStatus(statusParams);
    editPage = loanPage.navigateToEditAccountInformation();
    editPage.verifyRepaymentDayAccessibility(true);
    editPage.navigateBack();
    DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setDisbursalDateDD("1");
    disburseParams.setDisbursalDateMM("03");
    disburseParams.setDisbursalDateYYYY("2011");
    disburseParams.setPaymentType(DisburseLoanParameters.CASH);
    loanPage.disburseLoan(disburseParams);
    editPage = loanPage.navigateToEditAccountInformation();
    editPage.verifyRepaymentDayAccessibility(false);
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters) DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Aggregations

EditLoanAccountStatusParameters (org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters)18 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)11 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)8 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)8 Test (org.testng.annotations.Test)7 DateTime (org.joda.time.DateTime)5 CreateLoanAccountEntryPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)4 CreateLoanAccountConfirmationPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountConfirmationPage)3 CreateLoanAccountPreviewPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountPreviewPage)3 CreateLoanAccountReviewInstallmentPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage)3 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)3 EditPreviewLoanAccountPage (org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)3 LocalDate (org.joda.time.LocalDate)2 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 AccountChangeStatusPage (org.mifos.test.acceptance.framework.loan.AccountChangeStatusPage)2 CreateLoanAccountSearchPage (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage)2 PaymentParameters (org.mifos.test.acceptance.framework.loan.PaymentParameters)2 ArrayList (java.util.ArrayList)1