use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class ClientTest method removeClientWithLoanFromGroup.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//https://mifosforge.jira.com/browse/MIFOS-5843
@Test(enabled = true)
public void removeClientWithLoanFromGroup() throws Exception {
// Given
String clientName = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT").getHeading();
clientTestHelper.activateClient(clientName);
// Then
clientTestHelper.addClientToGroup(clientName, "groupWithoutLoan");
CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
searchParams.setSearchString(clientName);
searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
CreateLoanAccountSubmitParameters submitLoanAccountParameters = new CreateLoanAccountSubmitParameters();
submitLoanAccountParameters.setDd("22");
submitLoanAccountParameters.setMm("01");
submitLoanAccountParameters.setYy("2010");
String loanAccounntID = loanTestHelper.createLoanAccount(searchParams, submitLoanAccountParameters).getAccountId();
loanTestHelper.activateLoanAccount(loanAccounntID);
String groupName = navigationHelper.navigateToClientViewDetailsPage(clientName).getGroupMembership();
SavingsProductParameters params = savingsProductHelper.getGenericSavingsProductParameters(new DateTime(2009, 7, 13, 12, 0, 0, 0), SavingsProductParameters.MANDATORY, SavingsProductParameters.GROUPS);
savingsProductHelper.createSavingsProduct(params);
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString(groupName);
searchParameters.setSavingsProduct(params.getProductInstanceName());
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("250.0");
String savingsId = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters).getAccountId();
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("change status to active");
savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
// When / Then
clientTestHelper.deleteClientGroupMembership(clientName, "remove group membership");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class UpdateCustomPropertiesTest method verifyPropertyGroupCanApplyLoansTrue.
/*
* FIXME - keithw - test passes when run individually but not as part of ci build. it appears that question groups data is not
* cleaned up right as instead of stepping to review installments, the questionnaire page is presented.
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-234
@Test(enabled = true)
public void verifyPropertyGroupCanApplyLoansTrue() throws Exception {
//Given
propertiesHelper.setGroupCanApplyLoans("true");
LoanTestHelper helper = new LoanTestHelper(selenium);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("UpdateCustomPropertiesTestGroup");
searchParameters.setLoanProduct("GroupEmergencyLoan");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("2000.0");
//When Then
helper.createLoanAccount(searchParameters, submitAccountParameters);
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters in project head by mifos.
the class QuestionGroupLoanAccountTest method verifyKeyFinderInQuestionary.
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyKeyFinderInQuestionary() {
NavigationHelper navigationHelper = new NavigationHelper(selenium);
QuestionGroupHelper questionGroupHelper = new QuestionGroupHelper(navigationHelper);
Random random = new Random();
boolean keyUnpressed = true;
boolean keyPressed = false;
String questionGroupTitle = "QG1" + random.nextInt(100);
String question1 = "DT_6245";
String choiceAnswer1 = "choiceTest13242";
String choiceAnswer2 = "choiceTest34003";
List<String> tag1 = new ArrayList<String>();
List<String> tag2 = new ArrayList<String>();
tag1.add("tag");
tag2.add("tag1");
questionGroupHelper.createQuestionGroupSmart(questionGroupTitle, "Create Loan", question1, choiceAnswer1, choiceAnswer2, tag1, tag2);
loanProductTestHelper.editLoanProductIncludeQuestionsGroups("ClientEmergencyLoan", questionGroupTitle);
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("ClientWithLoan 20110221");
searchParameters.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1012.0");
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
CreateLoanAccountEntryPage createLoanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
createLoanAccountEntryPage.submitAndNavigateToQuestionResponsePage();
searchParameters.setSearchString("ClientWithLoan 20110221");
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyUnpressed), true);
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), false);
createLoanAccountEntryPage.setInputFilterChoices("2");
Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), true);
navigationHelper.navigateToAdminPage().navigateToViewAllQuestions().navigateToQuestionDetail(question1).navigateToEditQuestionPage().deactivate();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters 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.CreateLoanAccountSubmitParameters in project head by mifos.
the class UpdateCustomPropertiesTest method verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts.
/*
* FIXME - keithw - test passes when run individually but not as part of ci build. it appears that question groups data is not
* cleaned up right as instead of stepping to review installments, the questionnaire page is presented.
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-215
@Test(enabled = true)
public void verifyPropertyPendingApprovalStateEnabledForSavingsAndLoanAccounts() throws Exception {
//Given
propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
propertiesHelper.setLoanPendingApprovalStateEnabled("true");
propertiesHelper.setGroupPendingApprovalStateEnabled("true");
//When
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString("UpdateCustomProperties TestClient");
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("248.0");
SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
savingsAccountPage.verifyPage();
//Then
savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
savingsAccountPage.verifyStatus("Application Pending Approval");
//when
CreateLoanAccountSearchParameters searchParameters2 = new CreateLoanAccountSearchParameters();
searchParameters2.setSearchString("UpdateCustomProperties TestClient");
searchParameters2.setLoanProduct("ClientEmergencyLoan");
CreateLoanAccountSubmitParameters submitAccountParameters2 = new CreateLoanAccountSubmitParameters();
submitAccountParameters2.setAmount("2765.0");
submitAccountParameters2.setGracePeriodTypeNone(true);
LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
LoanAccountPage loanAccountPage = loanTestHelper.createLoanAccount(searchParameters2, submitAccountParameters2);
loanAccountPage.verifyStatus("Application Pending Approval");
}
Aggregations