use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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.CreateLoanAccountEntryPage in project head by mifos.
the class LoanTestHelper method navigateToCreateLoanAccountEntryPageWithoutLogout.
public CreateLoanAccountEntryPage navigateToCreateLoanAccountEntryPageWithoutLogout(CreateLoanAccountSearchParameters searchParameters) {
ClientsAndAccountsHomepage clientsAndAccountsPage = new HomePage(selenium).navigateToClientsAndAccountsUsingHeaderTab();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
createLoanAccountSearchPage.verifyPage();
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
createLoanAccountEntryPage.verifyPage();
return createLoanAccountEntryPage;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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.CreateLoanAccountEntryPage in project head by mifos.
the class LoanTestHelper method navigateToLoanAccountEntryPage.
private CreateLoanAccountEntryPage navigateToLoanAccountEntryPage(CreateLoanAccountSearchParameters searchParameters) {
CreateLoanAccountSearchPage createLoanAccountSearchPage = navigateToCreateLoanAccountSearchPage();
createLoanAccountSearchPage.verifyPage();
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
createLoanAccountEntryPage.verifyPage();
return createLoanAccountEntryPage;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage 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();
}
Aggregations