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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations