use of org.mifos.test.acceptance.framework.loan.GLIMClient in project head by mifos.
the class ModifyingGroupLoanTest method editAccountInfoTest.
public void editAccountInfoTest() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2013, 02, 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", "1500", null));
glimClients.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "37", null));
glimClients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1500", null));
LoanAccountPage loanAccountPage = loanTestHelper.createGroupLoanAccount(searchParameters, glimClients);
EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
editLoanAccountInformationPage.setInterestRate("33");
editLoanAccountInformationPage.setNumberOfInstallments("8");
EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
editAccountParameters.setCollateralNotes("Test Edit new GLIM Loan");
editAccountParameters.setExternalID("1234");
editLoanAccountInformationPage.editAccountParams(new CreateLoanAccountSubmitParameters(), editAccountParameters);
loanAccountPage = editLoanAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage().submitAndNavigateToLoanAccountPage();
verifyEditedAccountParameters(loanAccountPage);
verifyModifiedAccountParametersFromIndividualMemberAccount(loanAccountPage);
}
use of org.mifos.test.acceptance.framework.loan.GLIMClient in project head by mifos.
the class LoanTestHelper method createLoanAccountForMultipleClientsInGroup.
/**
* Creates a loan account.
* @param loanSaveType : True - submit for approval, False - save for later
* @return LoanAccountPage
*/
public LoanAccountPage createLoanAccountForMultipleClientsInGroup(boolean loanSaveType) {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Default Group");
searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage loanAccountEntryPage = this.navigateToCreateLoanAccountEntryPage(searchParameters);
List<GLIMClient> clients = new ArrayList<GLIMClient>();
clients.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 \n Client Id: 0002-000000012", "9999.9", "0009-Horse"));
clients.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 \n Client Id: 0002-000000013", "99999.9", "0001-Cow Purchase"));
clients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 \n Client Id: 0002-000000014", "99999.9", "0003-Goat Purchase"));
List<GLIMClient> clients2 = new ArrayList<GLIMClient>();
clients2.add(new GLIMClient(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "9999.9", "0009-Horse"));
clients2.add(new GLIMClient(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "99999.9", "0001-Cow Purchase"));
clients2.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "99999.9", "0003-Goat Purchase"));
for (GLIMClient glimClient : clients2) {
loanAccountEntryPage.selectGLIMClients(glimClient.getClientNumber(), glimClient.getClientName(), glimClient.getLoanAmount(), glimClient.getLoanPurpose());
}
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage;
if (loanSaveType) {
createLoanAccountConfirmationPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPage();
} else {
createLoanAccountConfirmationPage = loanAccountEntryPage.submitAndNavigateToGLIMLoanAccountConfirmationPageSaveForLaterButton();
}
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
loanAccountPage.verifyGLIMIndividualScheduleLinks(3, true);
if (loanSaveType) {
loanAccountPage.verifyLoanIsPendingApproval();
} else {
loanAccountPage.verifyLoanIsInPartialApplication();
}
EditLoanAccountInformationPage editLoanAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
for (GLIMClient glimClient : clients) {
editLoanAccountInformationPage.verifyGLIMClient(glimClient.getClientNumber(), glimClient.getClientName(), glimClient.getLoanAmount(), glimClient.getLoanPurpose());
}
editLoanAccountInformationPage.navigateBack();
loanAccountPage.verifyGLIMIndividualScheduleLinks(3, true);
return loanAccountPage;
}
use of org.mifos.test.acceptance.framework.loan.GLIMClient in project head by mifos.
the class LoanTestHelper method createGroupLoanAccount.
public LoanAccountPage createGroupLoanAccount(CreateLoanAccountSearchParameters searchParameters, List<GLIMClient> glimClients) {
CreateLoanAccountEntryPage loanAccountEntryPage = navigateToCreateLoanAccountEntryPage(searchParameters);
for (GLIMClient client : glimClients) {
loanAccountEntryPage.selectGLIMClients(client.getClientNumber(), client.getClientName(), client.getLoanAmount());
}
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = loanAccountEntryPage.navigateToReviewInstallmentsPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
return createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.GLIMClient 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.GLIMClient in project head by mifos.
the class ApplyChargeGroupLoanTest method applyMiscPenalty.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyMiscPenalty() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2013, 02, 8, 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", "1500", null));
glimClients.add(new GLIMClient(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "1500", null));
LoanAccountPage loanAccountPage = loanTestHelper.createGroupLoanAccount(searchParameters, glimClients);
String loanId = loanAccountPage.getAccountId();
String penaltyAmount = "100";
List<String> individualPenaltyAmounts = new ArrayList<String>();
individualPenaltyAmounts.add("20");
individualPenaltyAmounts.add("80");
ChargeParameters params = new ChargeParameters();
params.setType(ChargeParameters.MISC_PENALTY);
params.setAmount(penaltyAmount);
params.setGroupLoanIndividualAmounts(individualPenaltyAmounts);
loanAccountPage = loanTestHelper.applyChargeToGroupLoan(loanId, params);
verifyPenaltySummaryAndActivity(loanAccountPage, penaltyAmount, "Misc penalty applied", 2);
verifyRepaymentSchedulePage(loanAccountPage, penaltyAmount);
for (int i = 0; i < glimClients.size(); i++) {
LoanAccountPage individualLoanAccountPage = loanAccountPage.navigateToIndividualLoanAccountPageFromPendingApprovalGroupLoan(i);
verifyPenaltySummaryAndActivity(individualLoanAccountPage, individualPenaltyAmounts.get(i), "Misc penalty applied", 2);
verifyRepaymentSchedulePage(individualLoanAccountPage, individualPenaltyAmounts.get(i));
individualLoanAccountPage.navigateToGroupLoanPageFromIndividualLoanPage();
}
}
Aggregations