use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.
the class CreateClientLoanAccountTest method verifyCancelButtons.
/**
* Verify functionality of 'Cancel' buttons during the Loan creation flow
* http://mifosforge.jira.com/browse/MIFOSTEST-1178
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyCancelButtons() throws Exception {
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("%");
createLoanAccountSearchPage.navigateToCreateLoanAccountEntryPage(formParameters);
createLoanAccountSearchPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters2 = new CreateLoanAccountSearchParameters();
formParameters2.setSearchString("Client1233266063395");
CreateLoanAccountSelectLoanProductPage createLoanAccountSelectLoanProductPage = createLoanAccountSearchPage.navigateToCreateLoanAccountSelectLoanProductPage(formParameters2);
createLoanAccountSelectLoanProductPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
formParameters2.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
createLoanAccountEntryPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
createLoanAccountReviewInstallmentPage.cancel();
clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters2);
createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
createLoanAccountPreviewPage.cancel();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.
the class CreateClientLoanAccountTest method createLoanInPartialApplicationStatus.
/**
* Create a new Client Loan in 'Partial Application' status
* http://mifosforge.jira.com/browse/MIFOSTEST-1177
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createLoanInPartialApplicationStatus() throws Exception {
setAppDate(new DateTime(2011, 4, 27, 15, 0, 0, 0));
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters formParameters = new CreateLoanAccountSearchParameters();
formParameters.setSearchString("Client1233266063395");
formParameters.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(formParameters);
CreateLoanAccountReviewInstallmentPage createLoanAccountReviewInstallmentPage = createLoanAccountEntryPage.navigateToReviewInstallmentsPage();
verifyFirstInstallmentAndDisbursalDateOnReviewPage();
CreateLoanAccountPreviewPage createLoanAccountPreviewPage = createLoanAccountReviewInstallmentPage.clickPreviewAndGoToReviewLoanAccountPage();
verifyFirstInstallmentAndDisbursalDateOnPreviewPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountPreviewPage.submitForLaterAndNavigateToConfirmationPage();
LoanAccountPage loanAccountPage = createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
loanAccountPage.verifyLoanIsInPartialApplication();
loanAccountPage.verifyNumberOfInstallments("10");
loanAccountPage.verifyDisbursalDate("02/05/2011");
loanAccountPage.verifyPrincipalOriginal("1,000");
loanAccountPage.verifyLoanTotalBalance("1,000");
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToViewRepaymentSchedule();
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(3, "09-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(4, "16-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(5, "23-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(6, "30-May-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(7, "06-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(8, "13-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(9, "20-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(10, "27-Jun-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(11, "04-Jul-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTableDueDate(12, "11-Jul-2011");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(3, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(4, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(5, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(6, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(7, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(8, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(9, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(10, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(11, "100");
viewRepaymentSchedulePage.verifyRepaymentScheduleTablePrincipal(12, "100");
viewRepaymentSchedulePage.navigateToLoanAccountPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage in project head by mifos.
the class CreateGLIMLoanAccountTest method checkGLIMAccountTotalCalculationWholeNumber.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void checkGLIMAccountTotalCalculationWholeNumber() 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");
loanAccountEntryPage.selectGLIMClients(1, "Stu1233266309851 Client1233266309851 Client Id: 0002-000000013", "99999");
loanAccountEntryPage.selectGLIMClients(2, "Stu1233266319760 Client1233266319760 Client Id: 0002-000000014", "99999");
loanAccountEntryPage.checkTotalAmount("209997.0");
}
Aggregations