use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage in project head by mifos.
the class CreateGroupLoanAccountTest method newMonthlyGroupLoanAccountWithMeetingOnSameWeekAndWeekdayOfMonth.
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void newMonthlyGroupLoanAccountWithMeetingOnSameWeekAndWeekdayOfMonth() throws Exception {
homePage = loginSuccessfully();
CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
searchParameters.setSearchString("GroupMeetsOn3rdFriday");
searchParameters.setLoanProduct("MonthlyGroupFlatLoan1stOfMonth");
CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
submitAccountParameters.setAmount("1000.0");
ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
CreateLoanAccountSearchPage createLoanAccountSearchPage = clientsAndAccountsPage.navigateToCreateLoanAccountUsingLeftMenu();
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
createLoanAccountEntryPage.verifyPage();
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountEntryPage.submitAndNavigateToLoanAccountConfirmationPage(submitAccountParameters);
createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage 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.CreateLoanAccountSearchPage 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.CreateLoanAccountSearchPage in project head by mifos.
the class AdditionalHolidayTest method createLoan.
private void createLoan(final CreateLoanAccountSearchParameters searchParameters, final CreateLoanAccountSubmitParameters submitAccountParameters) {
logOut();
CreateLoanAccountSearchPage createLoanAccountSearchPage = navigateToCreateLoanAccountSearchPage();
CreateLoanAccountEntryPage createLoanAccountEntryPage = createLoanAccountSearchPage.searchAndNavigateToCreateLoanAccountPage(searchParameters);
CreateLoanAccountConfirmationPage createLoanAccountConfirmationPage = createLoanAccountEntryPage.submitAndNavigateToLoanAccountConfirmationPage(submitAccountParameters);
createLoanAccountConfirmationPage.navigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage 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();
}
Aggregations