use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class DefineHiddenMandatoryFieldsTest method verifyHiddenFields.
/**
* Verify Hidden Fields
* http://mifosforge.jira.com/browse/MIFOSTEST-1182
*
* @throws Exception
*/
@Test(enabled = true)
@SuppressWarnings("PMD")
public void verifyHiddenFields() {
//When
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.uncheckMandatoryPovertyStatus();
defineHiddenMandatoryFieldsPage.checkHideExternalId();
defineHiddenMandatoryFieldsPage.checkHideEthnicity();
defineHiddenMandatoryFieldsPage.checkHideCitizenShip();
defineHiddenMandatoryFieldsPage.checkHideHandicapped();
defineHiddenMandatoryFieldsPage.checkHideEducationLevel();
defineHiddenMandatoryFieldsPage.checkHidePhoto();
defineHiddenMandatoryFieldsPage.checkHideAssignClientPostions();
defineHiddenMandatoryFieldsPage.checkHideAddress2();
defineHiddenMandatoryFieldsPage.checkHideAddress3();
defineHiddenMandatoryFieldsPage.checkHideCity();
defineHiddenMandatoryFieldsPage.checkHideState();
defineHiddenMandatoryFieldsPage.checkHideCountry();
defineHiddenMandatoryFieldsPage.checkHidePostalCode();
defineHiddenMandatoryFieldsPage.checkHideReceiptIdDate();
defineHiddenMandatoryFieldsPage.checkHideCollateralTypeNotes();
defineHiddenMandatoryFieldsPage.checkHideMiddleName();
defineHiddenMandatoryFieldsPage.checkHideSecondLastName();
defineHiddenMandatoryFieldsPage.checkHideGovtId();
defineHiddenMandatoryFieldsPage.checkHideRelativeMiddleName();
defineHiddenMandatoryFieldsPage.checkHideRelativeSecondLastName();
defineHiddenMandatoryFieldsPage.checkHidePhone();
defineHiddenMandatoryFieldsPage.checkHideTrained();
defineHiddenMandatoryFieldsPage.checkHideBusinessWorkActivities();
defineHiddenMandatoryFieldsPage.checkHidePovertyStatus();
defineHiddenMandatoryFieldsPage.checkHideGroupTrained();
adminPage = defineHiddenMandatoryFieldsPage.submit();
CreateClientEnterPersonalDataPage createClientEnterPersonalDataPage = adminPage.navigateToClientsAndAccountsPageUsingHeaderTab().navigateToCreateNewClientPage().navigateToCreateClientWithoutGroupPage().chooseOffice("MyOfficeDHMFT");
//Then
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.spouseSecondLastName"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.middleName"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.secondLastName"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.governmentId"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.citizenship"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.ethnicity"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.educationLevel"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.businessActivities"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.povertyStatus"));
Assert.assertFalse(selenium.isElementPresent("clientDetailView.handicapped"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.spouseMiddleName"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.address2"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.address3"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.city"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.state"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.country"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.postalCode"));
Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.telephone"));
CreateClientEnterPersonalDataPage.SubmitFormParameters params = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
params.setSalutation(47);
params.setFirstName("Client");
params.setLastName("Test");
params.setDateOfBirthDD("11");
params.setDateOfBirthMM("02");
params.setDateOfBirthYYYY("1981");
params.setGender(49);
createClientEnterPersonalDataPage.createWithoutSpouse(params);
createClientEnterPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
Assert.assertFalse(selenium.isElementPresent("trained"));
Assert.assertFalse(selenium.isElementPresent("trainedDateDD"));
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters params2 = new CreateLoanAccountSearchParameters();
params2.setSearchString("ClientWithLoan");
params2.setLoanProduct("ClientEmergencyLoan");
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(params2);
Assert.assertFalse(selenium.isElementPresent("collateralTypeId"));
Assert.assertFalse(selenium.isElementPresent("collateralNotes"));
Assert.assertFalse(selenium.isElementPresent("externalId"));
navigationHelper.navigateToClientsAndAccountsPage();
CreateGroupSearchPage createGroupSearchPage = clientsAndAccountsHomepage.navigateToCreateNewGroupPage();
createGroupSearchPage.searchAndNavigateToCreateGroupPage("Default Center");
Assert.assertFalse(selenium.isElementPresent("trained"));
Assert.assertFalse(selenium.isElementPresent("trainedDateDD"));
// restore original configuration
defineHiddenMandatoryFieldsPage = navigationHelper.navigateToAdminPage().navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.uncheckHideExternalId();
defineHiddenMandatoryFieldsPage.uncheckHideEthnicity();
defineHiddenMandatoryFieldsPage.uncheckHideCitizenShip();
defineHiddenMandatoryFieldsPage.uncheckHideHandicapped();
defineHiddenMandatoryFieldsPage.uncheckHideEducationLevel();
defineHiddenMandatoryFieldsPage.uncheckHidePhoto();
defineHiddenMandatoryFieldsPage.uncheckHideAssignClientPostions();
defineHiddenMandatoryFieldsPage.uncheckHideAddress2();
defineHiddenMandatoryFieldsPage.uncheckHideAddress3();
defineHiddenMandatoryFieldsPage.uncheckHideCity();
defineHiddenMandatoryFieldsPage.uncheckHideState();
defineHiddenMandatoryFieldsPage.uncheckHideCountry();
defineHiddenMandatoryFieldsPage.uncheckHidePostalCode();
defineHiddenMandatoryFieldsPage.uncheckHideReceiptIdDate();
defineHiddenMandatoryFieldsPage.uncheckHideCollateralTypeNotes();
defineHiddenMandatoryFieldsPage.uncheckHideMiddleName();
defineHiddenMandatoryFieldsPage.uncheckHideSecondLastName();
defineHiddenMandatoryFieldsPage.uncheckHideGovtId();
defineHiddenMandatoryFieldsPage.uncheckHidePovertyStatus();
defineHiddenMandatoryFieldsPage.uncheckHideRelativeMiddleName();
defineHiddenMandatoryFieldsPage.uncheckHideRelativeSecondLastName();
defineHiddenMandatoryFieldsPage.uncheckHidePhone();
defineHiddenMandatoryFieldsPage.uncheckHideTrained();
defineHiddenMandatoryFieldsPage.uncheckHideBusinessWorkActivities();
defineHiddenMandatoryFieldsPage.uncheckHideGroupTrained();
defineHiddenMandatoryFieldsPage.checkMandatoryPovertyStatus();
defineHiddenMandatoryFieldsPage.submit();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class DefineHiddenMandatoryFieldsTest method verifyMandatoryFields.
/**
* Verify Mandatory Fields
* http://mifosforge.jira.com/browse/MIFOSTEST-1181
*
* @throws Exception
*/
@Test(enabled = true)
@SuppressWarnings("PMD")
public void verifyMandatoryFields() {
//When
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.checkMandatoryExternalId();
defineHiddenMandatoryFieldsPage.checkMandatoryEthnicity();
defineHiddenMandatoryFieldsPage.checkMandatoryCitizenShip();
defineHiddenMandatoryFieldsPage.checkMandatoryHandicapped();
defineHiddenMandatoryFieldsPage.checkMandatoryEducationLevel();
// TODO: we cannot make photo as a mandatory one, because we cannot upload images in selenium tests
//defineHiddenMandatoryFieldsPage.checkMandatoryPhoto();
defineHiddenMandatoryFieldsPage.checkMandatoryAddress1();
defineHiddenMandatoryFieldsPage.checkMandatoryMiddleName();
defineHiddenMandatoryFieldsPage.checkMandatorySecondLastName();
defineHiddenMandatoryFieldsPage.checkMandatoryGovtId();
defineHiddenMandatoryFieldsPage.checkMandatoryMaritalStatus();
defineHiddenMandatoryFieldsPage.checkMandatoryRelativeSecondLastName();
defineHiddenMandatoryFieldsPage.checkMandatoryPhone();
defineHiddenMandatoryFieldsPage.checkMandatoryTrained();
defineHiddenMandatoryFieldsPage.checkMandatoryTrainedOn();
defineHiddenMandatoryFieldsPage.checkMandatoryNumberOfChildren();
defineHiddenMandatoryFieldsPage.checkMandatoryLoanAccountPurpose();
defineHiddenMandatoryFieldsPage.checkMandatoryLoanSourceOfFund();
adminPage = defineHiddenMandatoryFieldsPage.submit();
CreateClientEnterPersonalDataPage createClientEnterPersonalDataPage = adminPage.navigateToClientsAndAccountsPageUsingHeaderTab().navigateToCreateNewClientPage().navigateToCreateClientWithoutGroupPage().chooseOffice("MyOfficeDHMFT");
//Then
Assert.assertTrue(selenium.isTextPresent("*Middle Name"));
Assert.assertTrue(selenium.isTextPresent("*Second Last Name"));
Assert.assertTrue(selenium.isTextPresent("*Government ID"));
Assert.assertTrue(selenium.isTextPresent("*Marital Status"));
Assert.assertTrue(selenium.isTextPresent("*Number Of Children"));
Assert.assertTrue(selenium.isTextPresent("*Citizenship"));
Assert.assertTrue(selenium.isTextPresent("*Ethnicity"));
Assert.assertTrue(selenium.isTextPresent("*Education Level"));
Assert.assertTrue(selenium.isTextPresent("*Handicapped"));
Assert.assertTrue(selenium.isTextPresent("*Address 1"));
Assert.assertTrue(selenium.isTextPresent("*Poverty Status"));
CreateClientEnterPersonalDataPage.SubmitFormParameters params3 = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
params3.setSalutation(47);
params3.setFirstName("Client");
params3.setMiddleName("Middle");
params3.setLastName("Test");
params3.setSecondLastName("Second");
params3.setGovernmentID("12345");
params3.setMaritalStatus(67);
params3.setCitizenship(131);
params3.setEthnicity(133);
params3.setHandicappedDropdown(139);
params3.setPovertyStatus(42);
params3.setEducationLevel(135);
params3.setSpouseLastName("LastName");
params3.setAddress1("address1");
params3.setNumberOfChildren("2");
params3.setDateOfBirthDD("11");
params3.setDateOfBirthMM("02");
params3.setDateOfBirthYYYY("1981");
params3.setGender(49);
params3.setPhone("123456");
params3.setSpouseNameType(2);
createClientEnterPersonalDataPage.createWithMandatoryFields(params3);
createClientEnterPersonalDataPage.submitAndGotoCreateClientEnterMfiDataPage();
Assert.assertTrue(selenium.isTextPresent("*External Id"));
Assert.assertTrue(selenium.isTextPresent("*Trained"));
Assert.assertTrue(selenium.isTextPresent("*Trained On Date"));
ClientsAndAccountsHomepage clientsAndAccountsHomepage = navigationHelper.navigateToClientsAndAccountsPage();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsHomepage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountSearchParameters params4 = new CreateLoanAccountSearchParameters();
params4.setSearchString("ClientWithLoan");
params4.setLoanProduct("ClientEmergencyLoan");
createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(params4);
Assert.assertTrue(selenium.isTextPresent("*External id"));
navigationHelper.navigateToClientsAndAccountsPage();
CreateGroupSearchPage createGroupSearchPage = clientsAndAccountsHomepage.navigateToCreateNewGroupPage();
createGroupSearchPage.searchAndNavigateToCreateGroupPage("Default Center");
Assert.assertTrue(selenium.isTextPresent("*External Id"));
// restore original configuration
defineHiddenMandatoryFieldsPage = navigationHelper.navigateToAdminPage().navigateToDefineHiddenMandatoryFields();
defineHiddenMandatoryFieldsPage.uncheckMandatoryExternalId();
defineHiddenMandatoryFieldsPage.uncheckMandatoryEthnicity();
defineHiddenMandatoryFieldsPage.uncheckMandatoryCitizenShip();
defineHiddenMandatoryFieldsPage.uncheckMandatoryHandicapped();
defineHiddenMandatoryFieldsPage.uncheckMandatoryEducationLevel();
//defineHiddenMandatoryFieldsPage.uncheckMandatoryPhoto();
defineHiddenMandatoryFieldsPage.uncheckMandatoryAddress1();
defineHiddenMandatoryFieldsPage.uncheckMandatoryMiddleName();
defineHiddenMandatoryFieldsPage.uncheckMandatorySecondLastName();
defineHiddenMandatoryFieldsPage.uncheckMandatoryGovtId();
defineHiddenMandatoryFieldsPage.uncheckMandatoryMaritalStatus();
defineHiddenMandatoryFieldsPage.uncheckMandatoryRelativeSecondLastName();
defineHiddenMandatoryFieldsPage.uncheckMandatoryPhone();
defineHiddenMandatoryFieldsPage.uncheckMandatoryTrained();
defineHiddenMandatoryFieldsPage.uncheckMandatoryTrainedOn();
defineHiddenMandatoryFieldsPage.uncheckMandatoryNumberOfChildren();
defineHiddenMandatoryFieldsPage.uncheckMandatoryLoanAccountPurpose();
defineHiddenMandatoryFieldsPage.uncheckMandatoryLoanSourceOfFund();
defineHiddenMandatoryFieldsPage.submit();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleSameDayWithBatchJobs.
//http://mifosforge.jira.com/browse/MIFOSTEST-74
@Test(enabled = true)
public void holidaysRepaymentRuleSameDayWithBatchJobs() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2035, 1, 1, 13, 0, 0, 0));
//When
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
String lid = page.getAccountId();
page.navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
CreateHolidaySubmitParameters param = getHolidayParameters("2035");
param.setRepaymentRule(CreateHolidaySubmitParameters.SAME_DAY);
createHolidayForInstallments(param);
//Then
runBatchJobsForHoliday();
navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("12-Jan-2035", "19-Jan-2035", "26-Jan-2035", "02-Feb-2035", "09-Feb-2035", "16-Feb-2035", "23-Feb-2035", "02-Mar-2035", "09-Mar-2035", "16-Mar-2035");
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class HolidayTest method setSearchParameters.
private CreateLoanAccountSearchParameters setSearchParameters() {
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("Holiday TestClient");
searchParameters.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
return searchParameters;
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters in project head by mifos.
the class HolidayTest method holidaysRepaymentRuleNextWorkingDayWithBatchJobs.
//http://mifosforge.jira.com/browse/MIFOSTEST-76
@Test(enabled = true)
public void holidaysRepaymentRuleNextWorkingDayWithBatchJobs() throws Exception {
//Given
dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2036, 1, 1, 13, 0, 0, 0));
//When
CreateLoanAccountSearchParameters searchParameters = setSearchParameters();
CreateLoanAccountSubmitParameters submitAccountParameters = setSubmitParameters();
LoanAccountPage page = loanTestHelper.createLoanAccount(searchParameters, submitAccountParameters);
String lid = page.getAccountId();
page.navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "15-Feb-2036", "22-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
CreateHolidaySubmitParameters param = getHolidayParameters("2036");
param.setRepaymentRule(CreateHolidaySubmitParameters.NEXT_WORKING_DAY);
createHolidayForInstallments(param);
//Then
runBatchJobsForHoliday();
navigationHelper.navigateToLoanAccountPage(lid).navigateToRepaymentSchedulePage();
loanTestHelper.verifyRepaymentScheduleForHolidays("11-Jan-2036", "18-Jan-2036", "25-Jan-2036", "01-Feb-2036", "08-Feb-2036", "29-Feb-2036", "29-Feb-2036", "29-Feb-2036", "07-Mar-2036", "14-Mar-2036");
}
Aggregations