Search in sources :

Example 1 with ClientEditPersonalInfoPage

use of org.mifos.test.acceptance.framework.client.ClientEditPersonalInfoPage 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)1 SubmitFormParameters (org.mifos.test.acceptance.framework.admin.FeesCreatePage.SubmitFormParameters)1 ClientEditPersonalInfoPage (org.mifos.test.acceptance.framework.client.ClientEditPersonalInfoPage)1 ClientNotesPage (org.mifos.test.acceptance.framework.client.ClientNotesPage)1 ClientSearchResultsPage (org.mifos.test.acceptance.framework.client.ClientSearchResultsPage)1 ClientViewDetailsPage (org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)1 CreateClientEnterPersonalDataPage (org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage)1 CustomerChangeStatusPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage)1 CustomerChangeStatusPreviewPage (org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)1 EditCustomerStatusParameters (org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters)1 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)1 Test (org.testng.annotations.Test)1