use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method approveLoanAmountByDifferentLoanAmountRangesTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//https://mifosforge.jira.com/browse/MIFOSTEST-1185
@Test(enabled = true)
public void approveLoanAmountByDifferentLoanAmountRangesTest() throws Exception {
// When
ManageRolePage manageRolePage = new ManageRolePage(selenium);
//.
manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
manageRolePage.enablePermission("activityRestrictionCheckbox1");
manageRolePage.typeText("restrictionValue(1)", "asdf");
manageRolePage.verifyAmountTextField();
manageRolePage.typeText("restrictionValue(1)", "5,000");
manageRolePage.enablePermission("activityRestrictionCheckbox1");
manageRolePage.submitAndGotoViewRolesPage();
//Then
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setLoanProduct("Flat Interest Loan Product With Fee");
searchParameters.setSearchString("ClientWithLoan 20110221");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("6000");
LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
String loanAccountId = loanAccountPage.getAccountId();
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.LOAN_APPROVED);
editAccountStatusParameters.setNote("Approve test");
loanAccountPage.navigateToEditAccountStatus().setChangeStatusParametersAndSubmit(editAccountStatusParameters);
loanAccountPage.verifyLoanAmountPermissionError();
editAccountStatusParameters.setAccountStatus(AccountStatus.LOAN_PARTIAL);
searchParameters.setSearchString(loanAccountId);
loanAccountPage = loanTestHelper.navigateToLoanAccountPage(searchParameters);
loanAccountPage.navigateToEditAccountStatus().setChangeStatusParametersAndSubmit(editAccountStatusParameters).submitAndNavigateToLoanAccountPage();
//When
manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
manageRolePage.disablePermission("activityRestrictionCheckbox1");
manageRolePage.typeText("restrictionValue(1)", "");
manageRolePage.submitAndGotoViewRolesPage();
//Then
loanAccountPage = loanTestHelper.navigateToLoanAccountPage(searchParameters);
editAccountStatusParameters.setAccountStatus(AccountStatus.LOAN_PENDING_APPROVAL);
loanAccountPage.navigateToEditAccountStatus().setChangeStatusParametersAndSubmit(editAccountStatusParameters).submitAndNavigateToLoanAccountPage();
editAccountStatusParameters.setAccountStatus(AccountStatus.LOAN_APPROVED);
loanAccountPage.navigateToEditAccountStatus().setChangeStatusParametersAndSubmit(editAccountStatusParameters).submitAndNavigateToLoanAccountPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters 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.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method newWeeklyClientLoanAccountWithModifyErrors.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// add grace period of 10 to "Flat Interest Loan Product With Fee"
@Test(enabled = true)
public void newWeeklyClientLoanAccountWithModifyErrors() throws Exception {
setAppDate(new DateTime(2011, 3, 7, 15, 0, 0, 0));
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("client1 lastname");
searchParameters.setLoanProduct("Flat Interest Loan Product With Fee");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012.0");
String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
submitAccountParameters.setAmount("10666.0");
EditLoanAccountInformationParameters editAccountParameters = new EditLoanAccountInformationParameters();
editAccountParameters.setGracePeriod("15");
EditLoanAccountInformationPage editPreviewLoanAccountPage = loanTestHelper.changeLoanAccountInformationWithErrors(loanId, submitAccountParameters, editAccountParameters);
editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Amount. Amount should be a value between 1 and 10,000, inclusive");
editPreviewLoanAccountPage.verifyErrorInForm("Please specify valid Grace period for repayments. Grace period for repayments should be a value less than 12");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-308
@Test(enabled = true)
public void newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1234.0");
submitAccountParameters.setGracePeriodTypeNone(true);
//Then
String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
getLoanStatusActive(loanId);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class CreateClientLoanAccountTest method newLoanAccountWithThousandSeparator.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newLoanAccountWithThousandSeparator() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1,234.0");
submitAccountParameters.setGracePeriodTypeNone(true);
//Then
createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
}
Aggregations