Search in sources :

Example 21 with ClientViewDetailsPage

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

the class AddFamilyDetailsTest method canEditAfterSubmit.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canEditAfterSubmit() throws Exception {
    propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
    CreateClientEnterPersonalDataPage clientPersonalDataPage1 = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
    CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage1.submitAndGotoCreateClientEnterFamilyDetailsPage();
    clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
    CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    CreateClientPreviewDataPage clientPreviewDataPage1 = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
    clientPreviewDataPage1.submit();
    selenium.click("client_creationConfirmation.link.viewClientDetailsLink");
    selenium.waitForPageToLoad("30000");
    ClientViewDetailsPage clientDetailsPage = new ClientViewDetailsPage(selenium);
    ClientEditFamilyPage editFamilyPage = clientDetailsPage.editFamilyInformation();
    ClientEditFamilyParameters editParameters = new ClientEditFamilyParameters();
    editParameters.setFirstName("newName");
    editParameters.setRelationship(1);
    editParameters.setLastName("newLastName");
    editParameters.setDateOfBirthDD("11");
    editParameters.setDateOfBirthMM("12");
    editParameters.setDateOfBirthYY("2008");
    editParameters.setGender(49);
    editParameters.setLivingStatus(620);
    ClientFamilyEditPreviewPage previewEdit = editFamilyPage.submitAndNavigateToClientEditFamilyPreviewPage(editParameters);
    previewEdit.verifyPage();
    clientDetailsPage = previewEdit.submit();
    //Assert.assertTrue(selenium.isTextPresent("newName newLastName"));
    Assert.assertEquals(selenium.getText("displayName"), "newName newLastName");
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) ClientEditFamilyPage(org.mifos.test.acceptance.framework.client.ClientEditFamilyPage) CreateClientEnterFamilyDetailsPage(org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClientFamilyEditPreviewPage(org.mifos.test.acceptance.framework.client.ClientFamilyEditPreviewPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage) ClientEditFamilyParameters(org.mifos.test.acceptance.framework.client.ClientEditFamilyParameters)

Example 22 with ClientViewDetailsPage

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

the class AddFamilyDetailsTest method canGoTosubmitAfterPreviewPageTest.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canGoTosubmitAfterPreviewPageTest() throws Exception {
    propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
    CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
    CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
    clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
    CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
    CreateClientPreviewDataPage clientPreviewDataPage = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
    clientPreviewDataPage.submit();
    selenium.click("client_creationConfirmation.link.viewClientDetailsLink");
    selenium.waitForPageToLoad("30000");
    new ClientViewDetailsPage(selenium);
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) CreateClientPreviewDataPage(org.mifos.test.acceptance.framework.client.CreateClientPreviewDataPage) CreateClientEnterFamilyDetailsPage(org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) CreateClientEnterMfiDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)

Example 23 with ClientViewDetailsPage

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

the class ClientTest method searchForClientAndEditDetailsTest.

// implementation of test described in issue 2454
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void searchForClientAndEditDetailsTest() throws Exception {
    ClientsAndAccountsHomepage clientsPage = navigationHelper.navigateToClientsAndAccountsPage();
    ClientSearchResultsPage searchResultsPage = clientsPage.searchForClient("client1");
    searchResultsPage.verifyPage();
    ClientViewDetailsPage clientDetailsPage = searchResultsPage.navigateToSearchResult("client1 lastname: ID 0002-000000005");
    ClientEditMFIPage editMFIPage = clientDetailsPage.navigateToEditMFIPage();
    editMFIPage.verifyPage();
    ClientEditMFIParameters params = new ClientEditMFIParameters();
    params.setExternalId("extID123");
    params.setTrainedDateDD("15");
    params.setTrainedDateMM("12");
    params.setTrainedDateYYYY("2008");
    ClientEditMFIPreviewPage mfiPreviewPage = editMFIPage.submitAndNavigateToClientEditMFIPreviewPage(params);
    mfiPreviewPage.verifyPage();
    clientDetailsPage = mfiPreviewPage.submit();
    assertTextFoundOnPage("extID123");
    assertTextFoundOnPage("15/12/2008");
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClientsAndAccountsHomepage(org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage) ClientEditMFIPreviewPage(org.mifos.test.acceptance.framework.client.ClientEditMFIPreviewPage) ClientSearchResultsPage(org.mifos.test.acceptance.framework.client.ClientSearchResultsPage) ClientEditMFIPage(org.mifos.test.acceptance.framework.client.ClientEditMFIPage) ClientEditMFIParameters(org.mifos.test.acceptance.framework.client.ClientEditMFIParameters) Test(org.testng.annotations.Test)

Example 24 with ClientViewDetailsPage

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

the class ClientTest method prepareClientsForAddClientsWithAccountsToGroups.

private void prepareClientsForAddClientsWithAccountsToGroups(String[] clientKeys, Map<String, String> clients) throws UnsupportedEncodingException {
    DateTime today = new DateTime();
    if (today.getDayOfWeek() == 7) {
        //skip Sunday
        today = today.plusDays(1);
    }
    String frequency = "1";
    String meetingPlace = "Gniezno";
    //+1 because ISO week begins with Monday=1 and Mifos week begin with Sunday=1
    MeetingParameters.WeekDay weekDay = MeetingParameters.WeekDay.findByInt(today.getDayOfWeek() + 1);
    String savingsProduct = "MonthlyClientSavingsAccount";
    String office = "MyOfficeDHMFT";
    String loanOfficer = "loan officer";
    String loanProduct = "Flat Interest Loan Product With Fee";
    for (int i = 0; i < clientKeys.length; i++) {
        ClientViewDetailsPage cvdp = clientTestHelper.createClientWithCustomMFIInformation(loanOfficer, office, frequency, weekDay, meetingPlace);
        cvdp = clientTestHelper.changeCustomerStatus(cvdp, ClientStatus.ACTIVE);
        clients.put(clientKeys[i], cvdp.getHeading());
    }
    addLoanToCustomer(clients.get("ILoan"), false, loanProduct, today);
    addLoanToCustomer(clients.get("ALoan"), true, loanProduct, today);
    addSavingsToCustomer(clients.get("ISaving"), false, savingsProduct);
    addSavingsToCustomer(clients.get("ASaving"), true, savingsProduct);
    addLoanToCustomer(clients.get("IMultiple"), false, loanProduct, today);
    addSavingsToCustomer(clients.get("IMultiple"), false, savingsProduct);
    addLoanToCustomer(clients.get("AMultiple"), false, loanProduct, today);
    addSavingsToCustomer(clients.get("AMultiple"), true, savingsProduct);
}
Also used : MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) DateTime(org.joda.time.DateTime)

Example 25 with ClientViewDetailsPage

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

the class ClientTest method addClientToGroupAndVerify.

private void addClientToGroupAndVerify(String groupName, String clientName) {
    clientTestHelper.addClientToGroup(clientName, groupName);
    ClientViewDetailsPage cvdp = clientTestHelper.navigateToClientViewDetailsPage(clientName);
    cvdp.verifyGroupMembership(groupName);
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Aggregations

ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)47 Test (org.testng.annotations.Test)17 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)11 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)10 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)8 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)6 QuestionnairePage (org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)6 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)4 HomePage (org.mifos.test.acceptance.framework.HomePage)3 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)3 QuestionGroupResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionGroupResponsePage)3 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 DateTime (org.joda.time.DateTime)2 ClientsAndAccountsHomepage (org.mifos.test.acceptance.framework.ClientsAndAccountsHomepage)2 MifosPage (org.mifos.test.acceptance.framework.MifosPage)2 ClientViewChangeLogPage (org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)2 CreateClientEnterFamilyDetailsPage (org.mifos.test.acceptance.framework.client.CreateClientEnterFamilyDetailsPage)2 CreateClientEnterMfiDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterMfiDataPage)2