Search in sources :

Example 16 with HomePage

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

the class CreateGroupLoanAccountTest method loginSuccessfully.

private HomePage loginSuccessfully() {
    (new MifosPage(selenium)).logout();
    LoginPage loginPage = new AppLauncher(selenium).launchMifos();
    loginPage.verifyPage();
    HomePage homePage = loginPage.loginSuccessfullyUsingDefaultCredentials();
    homePage.verifyPage();
    return homePage;
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) MifosPage(org.mifos.test.acceptance.framework.MifosPage) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage)

Example 17 with HomePage

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

the class ClientTest method checkPermissionToEditClientInPendingApprovalState.

@Test(enabled = true)
public void checkPermissionToEditClientInPendingApprovalState() {
    String firstName = "Edit";
    String lastName = "Permission";
    DefineHiddenMandatoryFieldsPage mandatoryFieldsPage = navigationHelper.navigateToAdminPage().navigateToDefineHiddenMandatoryFields();
    mandatoryFieldsPage.uncheckMandatoryCitizenShip();
    mandatoryFieldsPage.uncheckMandatoryEthnicity();
    mandatoryFieldsPage.uncheckMandatoryMaritalStatus();
    mandatoryFieldsPage.submit();
    CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = clientParams();
    clientParams.setFirstName(firstName);
    clientParams.setLastName(lastName);
    ClientViewDetailsPage clientPage = clientTestHelper.createNewClient("group1", clientParams);
    clientPage.editPersonalInformation().submitAndNavigateToViewDetailsPage(clientParams);
    CustomerChangeStatusPage changeStatusPage = clientPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters parameters = new EditCustomerStatusParameters();
    parameters.setClientStatus(ClientStatus.PARTIAL);
    parameters.setNote("test");
    changeStatusPage.setChangeStatusParametersAndSubmit(parameters);
    ManageRolePage manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
    manageRolePage.disablePermission("3");
    manageRolePage.enablePermission("3_0_0");
    manageRolePage.enablePermission("3_0_2");
    manageRolePage.enablePermission("3_0_3");
    manageRolePage.submitAndGotoViewRolesPage();
    HomePage homePage = navigationHelper.navigateToHomePage();
    SearchResultsPage searchResultsPage = homePage.search(firstName + " " + lastName);
    ClientViewDetailsPage viewDetailsPage = searchResultsPage.navigateToClientViewDetailsPage("link=" + firstName + " " + lastName + "*");
    Assert.assertTrue(viewDetailsPage.editPersonalInformation().isAccessDeniedDisplayed());
    manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
    manageRolePage.enablePermission("3");
    manageRolePage.submitAndGotoViewRolesPage();
}
Also used : ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage) SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) ManageRolePage(org.mifos.test.acceptance.framework.admin.ManageRolePage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) HomePage(org.mifos.test.acceptance.framework.HomePage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Example 18 with HomePage

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

the class CollectionSheetEntryCustomerAccountTest method unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@Test(enabled = true)
public void unpaidFeeDisplayedOnSecondCollectionSheetEntryAndSaved() throws Exception {
    SubmitFormParameters formParameters = getFormParametersForTestOffice();
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_003_dbunit.xml", dataSource, selenium);
    CollectionSheetEntryConfirmationPage confirmationPage = enterAndSubmitCustomerAccountDataOnSecondEditing(formParameters, TEST_ACCT_VALUES, FIRST_PARTIAL_CUSTOMER_ACCT_VALUES);
    // navigate back to collection sheet entry
    HomePage homePage = confirmationPage.navigateToHomePage();
    ClientsAndAccountsHomepage clientsAndAccountsPage = homePage.navigateToClientsAndAccountsUsingHeaderTab();
    CollectionSheetEntrySelectPage selectPage = clientsAndAccountsPage.navigateToEnterCollectionSheetDataUsingLeftMenu();
    selectPage.verifyPage();
    // enter same search data and inspect displayed client account (A/C
    // Collection) values
    CollectionSheetEntryEnterDataPage enterDataPage = selectCenterAndContinue(formParameters, selectPage);
    enterDataPage.verifyCustomerAccountValue(0, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(1, 6, 77.0);
    enterDataPage.verifyCustomerAccountValue(2, 6, 0.0);
    enterDataPage.verifyCustomerAccountValue(3, 6, 251.0);
    enterDataPage.verifyCustomerAccountValue(4, 6, 0.0);
    enterDataPage.cancel();
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) CollectionSheetEntrySelectPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage) CollectionSheetEntryConfirmationPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) SubmitFormParameters(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters) CollectionSheetEntryEnterDataPage(org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage) Test(org.testng.annotations.Test)

Example 19 with HomePage

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

the class ClientTest method searchForClient.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private HomePage searchForClient(String clientName, HomePage homePage, int expectedNumberOfClients) throws Exception {
    SearchResultsPage searchResultsPage = homePage.search(clientName);
    searchResultsPage.verifyPage();
    int numResults = searchResultsPage.countSearchResults();
    Assert.assertEquals(expectedNumberOfClients, numResults);
    selenium.click("header.link.home");
    selenium.waitForPageToLoad("30000");
    return new HomePage(selenium);
}
Also used : ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage) SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage)

Example 20 with HomePage

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

the class ClientTest method searchClientAndEditExistingClientDetails.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-310
@Test(enabled = true)
public void searchClientAndEditExistingClientDetails() throws Exception {
    HomePage homePage = navigationHelper.navigateToHomePage();
    homePage = searchForClient("client1 lastname", homePage, 1);
    homePage = searchForClient("zzz", homePage, 0);
    SearchResultsPage searchResultsPage = homePage.search("client1 lastname");
    searchResultsPage.verifyPage();
    int numResults = searchResultsPage.countSearchResults();
    Assert.assertEquals(numResults, 1);
    ClientViewDetailsPage viewDetailsPage = searchResultsPage.navigateToClientViewDetailsPage("link=client1 lastname*");
    ClientNotesPage notesPage = viewDetailsPage.navigateToNotesPage();
    notesPage.addNotePreviewAndSubmit("test note");
    viewDetailsPage.verifyNotes("test note");
    CustomerChangeStatusPage changeStatusPage = viewDetailsPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters parameters = new EditCustomerStatusParameters();
    parameters.setClientStatus(ClientStatus.ON_HOLD);
    parameters.setNote("test");
    CustomerChangeStatusPreviewPage changeStatusPreviewPage = changeStatusPage.setChangeStatusParametersAndSubmit(parameters);
    viewDetailsPage = changeStatusPreviewPage.submitAndGotoClientViewDetailsPage();
    viewDetailsPage.verifyStatus("On Hold");
    ClientEditPersonalInfoPage editPersonalInfoPage = viewDetailsPage.editPersonalInformation();
    CreateClientEnterPersonalDataPage.SubmitFormParameters parameters2 = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
    parameters2.setSpouseFirstName("FatherFirstnameTest");
    parameters2.setSpouseLastName("FatherLastNameTest");
    parameters2.setSpouseNameType(CreateClientEnterPersonalDataPage.SubmitFormParameters.FATHER);
    parameters2.setDateOfBirthYYYY("1960");
    parameters2.setDateOfBirthMM("08");
    parameters2.setDateOfBirthDD("01");
    viewDetailsPage = editPersonalInfoPage.submitAndNavigateToViewDetailsPage(parameters2);
    viewDetailsPage.verifySpouseFather("FatherFirstnameTest FatherLastNameTest");
    ClientNotesPage seeAllNotes = viewDetailsPage.navigateToAllNotesPage();
    seeAllNotes.verifySeeAllNotesTitle("client1 lastname");
    // extension to verify MIFOS-5685
    applicationDatabaseOperation.updateGLIM(1);
    applicationDatabaseOperation.updateLSIM(1);
    seeAllNotes.navigateBack();
    editPersonalInfoPage = viewDetailsPage.editPersonalInformation();
    parameters2.setDateOfBirthYYYY("1961");
    parameters2.setDateOfBirthMM("07");
    parameters2.setDateOfBirthDD("02");
    viewDetailsPage = editPersonalInfoPage.submitAndNavigateToViewDetailsPage(parameters2);
    viewDetailsPage.verifyDateOfBirth("02", "07", "1961");
    seeAllNotes = viewDetailsPage.navigateToAllNotesPage();
    seeAllNotes.verifySeeAllNotesTitle("client1 lastname");
    applicationDatabaseOperation.updateGLIM(0);
    applicationDatabaseOperation.updateLSIM(0);
}
Also used : ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage) SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) ClientNotesPage(org.mifos.test.acceptance.framework.client.ClientNotesPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) SubmitFormParameters(org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters) ClientEditPersonalInfoPage(org.mifos.test.acceptance.framework.client.ClientEditPersonalInfoPage) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage) Test(org.testng.annotations.Test)

Aggregations

HomePage (org.mifos.test.acceptance.framework.HomePage)42 LoginPage (org.mifos.test.acceptance.framework.login.LoginPage)20 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)14 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)10 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)10 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)6 Test (org.testng.annotations.Test)6 MifosPage (org.mifos.test.acceptance.framework.MifosPage)4 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)4 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)3 SubmitFormParameters (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage.SubmitFormParameters)3 ClosedAccountsPage (org.mifos.test.acceptance.framework.loan.ClosedAccountsPage)3 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)3 DateTime (org.joda.time.DateTime)2 CenterViewDetailsPage (org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)2 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)2 CollectionSheetEntryConfirmationPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryConfirmationPage)2 CollectionSheetEntryEnterDataPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntryEnterDataPage)2 CollectionSheetEntrySelectPage (org.mifos.test.acceptance.framework.collectionsheet.CollectionSheetEntrySelectPage)2 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)2