Search in sources :

Example 56 with AdminPage

use of org.mifos.test.acceptance.framework.admin.AdminPage 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();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateGroupSearchPage(org.mifos.test.acceptance.framework.group.CreateGroupSearchPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Example 57 with AdminPage

use of org.mifos.test.acceptance.framework.admin.AdminPage 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();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateLoanAccountSearchPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) CreateGroupSearchPage(org.mifos.test.acceptance.framework.group.CreateGroupSearchPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Example 58 with AdminPage

use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.

the class ViewOrganizationSettingsTest method verifyViewOrganizationSettingsPage.

@Test
public //http://mifosforge.jira.com/browse/MIFOSTEST-259
void verifyViewOrganizationSettingsPage() {
    //When
    AdminPage adminPage = loginAndGoToAdminPage();
    ViewOrganizationSettingsPage viewOrganizationSettingsPage = adminPage.navigateToViewOrganizationSettingsPage();
    viewOrganizationSettingsPage.verifyPage();
    //Then
    viewOrganizationSettingsPage.verifyDefaultConfiguration();
    //When
    CustomPropertiesHelper customPropertiesHelper = new CustomPropertiesHelper(selenium);
    customPropertiesHelper.setDigitsAfterDecimal(3);
    customPropertiesHelper.setGroupCanApplyLoans("false");
    adminPage = loginAndGoToAdminPage();
    viewOrganizationSettingsPage = adminPage.navigateToViewOrganizationSettingsPage();
    //Then
    viewOrganizationSettingsPage.verifyClientRules(new String[] { "Groups allowed to apply for loans: No" });
    viewOrganizationSettingsPage.verifyCurrencies(new String[] { "Number of digits after decimal: 3" });
    customPropertiesHelper.setDigitsAfterDecimal(1);
    customPropertiesHelper.setGroupCanApplyLoans("true");
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ViewOrganizationSettingsPage(org.mifos.test.acceptance.framework.admin.ViewOrganizationSettingsPage) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) Test(org.testng.annotations.Test)

Example 59 with AdminPage

use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.

the class LoanTestHelper method enableInterestWaiver.

public void enableInterestWaiver(String loanProduct, boolean interestWaiver) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    ViewLoanProductsPage viewLoanProducts = adminPage.navigateToViewLoanProducts();
    LoanProductDetailsPage loanProductDetailsPage = viewLoanProducts.viewLoanProductDetails(loanProduct);
    EditLoanProductPage editLoanProductPage = loanProductDetailsPage.editLoanProduct();
    DefineNewLoanProductPage.SubmitFormParameters formParameters = new DefineNewLoanProductPage.SubmitFormParameters();
    formParameters.setInterestWaiver(interestWaiver);
    EditLoanProductPreviewPage editLoanProductPreviewPage = editLoanProductPage.submitInterestWaiverChanges(formParameters);
    editLoanProductPreviewPage.submit();
}
Also used : EditLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage) ViewLoanProductsPage(org.mifos.test.acceptance.framework.loanproduct.ViewLoanProductsPage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) LoanProductDetailsPage(org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage) EditLoanProductPreviewPage(org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)

Example 60 with AdminPage

use of org.mifos.test.acceptance.framework.admin.AdminPage in project head by mifos.

the class HolidayTest method viewHolidays.

@Test(enabled = true)
public void viewHolidays() {
    AdminPage adminPage = loginAndNavigateToAdminPage();
    adminPage.verifyPage();
    adminPage.navigateToViewHolidays();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) Test(org.testng.annotations.Test)

Aggregations

AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)87 Test (org.testng.annotations.Test)33 HomePage (org.mifos.test.acceptance.framework.HomePage)9 CreateQuestionGroupPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)8 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)7 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)7 DateTime (org.joda.time.DateTime)6 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 CreateQuestionPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage)6 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)6 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)5 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)5 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)4 EditLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage)4 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)4 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)4 ViewLoanProductsPage (org.mifos.test.acceptance.framework.loanproduct.ViewLoanProductsPage)4