use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage in project head by mifos.
the class CreateGroupLoanAccountTest method newWeeklyGroupLoanAccount.
//http://mifosforge.jira.com/browse/MIFOSTEST-303
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newWeeklyGroupLoanAccount() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 25, 1, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
//When
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("groupWithoutLoan");
formParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
createLoanAccountEntryPage.setAmount("3000.0");
createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 2, 25, 15, 0, 0, 0));
selectAdditionalFees();
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
verifyFirstInstallmentDateAndDisbursalDateOnReviewPage();
verifyAdditionalFeesOnReviewPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
verifyFirstInstallmentDateAndDisbursalDateOnPreviewPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
String loanId = loanAccountPage.getAccountId();
loanAccountPage.verifyLoanIsPendingApproval();
loanAccountPage.verifyNumberOfInstallments("4");
loanAccountPage.verifyDisbursalDate("25/02/2011");
loanAccountPage.verifyPrincipalOriginal("3,000");
loanAccountPage.verifyLoanTotalBalance("3,466");
loanAccountPage.verifyFeesOriginal("410");
loanAccountPage.verifyInterestOriginal("56");
verifyFees();
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "04-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "11-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "18-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "25-Mar-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "750.2");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "749.4");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(3, "110");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(4, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(5, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableFees(6, "100");
viewRepaymentSchedulePage.navigateToLoanAccountPage();
EditLoanAccountStatusParameters editLoanAccountStatusParameters = new EditLoanAccountStatusParameters();
editLoanAccountStatusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
editLoanAccountStatusParameters.setNote("test");
loanTestHelper.changeLoanAccountStatus(loanId, editLoanAccountStatusParameters);
DisburseLoanParameters disburseParameters = new DisburseLoanParameters();
disburseParameters.setPaymentType(DisburseLoanParameters.CASH);
disburseParameters.setDisbursalDateDD("25");
disburseParameters.setDisbursalDateMM("02");
disburseParameters.setDisbursalDateYYYY("2011");
loanTestHelper.disburseLoan(loanId, disburseParameters);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage in project head by mifos.
the class CreateGroupLoanAccountTest method CreateLoanWithGLIMandLSIMenabled.
/**
* Create a new Group Loan with GLIM and LSIM enabled
* http://mifosforge.jira.com/browse/MIFOSTEST-1179
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void CreateLoanWithGLIMandLSIMenabled() throws Exception {
applicationDatabaseOperation.updateGLIM(1);
applicationDatabaseOperation.updateLSIM(1);
setAppDate(new DateTime(2011, 4, 29, 15, 0, 0, 0));
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("Default Group");
formParameters.setLoanProduct("GroupEmergencyLoan");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
verifyDisbursalDateOnLoanEntryPage();
createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 30, 15, 0, 0, 0));
verifyDisbursalDateErrorMessage();
createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 21, 15, 0, 0, 0));
verifyDisbursalDateErrorMessage();
createLoanAccountEntryPage.setDisbursalDate(new DateTime(2011, 4, 29, 15, 0, 0, 0));
createLoanAccountEntryPage.selectGLIMClients(0, "Stu1233266299995 Client1233266299995 Client Id: 0002-000000012", "500", "0000-Animal Husbandry");
createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "1000", "0001-Cow Purchase");
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
verifyFirstInstallmentAndDisbursalDateOnReviewPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
verifyFirstInstallmentAndDisbursalDateOnPreviewPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
loanAccountPage.verifyLoanIsPendingApproval();
loanAccountPage.verifyNumberOfInstallments("10");
loanAccountPage.verifyDisbursalDate("29/04/2011");
loanAccountPage.verifyPrincipalOriginal("1,500");
loanAccountPage.verifyLoanTotalBalance("1,500");
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "06-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "13-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "20-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "27-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(7, "03-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(8, "10-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(9, "17-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(10, "24-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(11, "01-Jul-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(12, "08-Jul-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(7, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(8, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(9, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(10, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(11, "150");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(12, "150");
viewRepaymentSchedulePage.navigateToLoanAccountPage();
applicationDatabaseOperation.updateGLIM(0);
applicationDatabaseOperation.updateLSIM(0);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage 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();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage 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();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountReviewInstallmentPage in project head by mifos.
the class CreateGLIMLoanAccountWithOneTimeFeeTest method createLoan.
private LoanAccountPage createLoan() {
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("Default Group");
formParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
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", "200", "0009-Horse");
createLoanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "300", "0001-Cow Purchase");
createLoanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "500", "0003-Goat Purchase");
createLoanAccountEntryPage.setInstallments("10");
createLoanAccountEntryPage.setInterestRate("21");
selenium.type("defaultFeeIndividualAmounts[0][0]", "0.2");
selenium.type("defaultFeeIndividualAmounts[0][1]", "0.3");
selenium.type("defaultFeeIndividualAmounts[0][2]", "0.5");
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForApprovalAndNavigateToConfirmationPage();
return createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
Aggregations