Search in sources :

Example 41 with ClientViewDetailsPage

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

the class ClientTestHelper method changeCustomerStatus.

public ClientViewDetailsPage changeCustomerStatus(ClientViewDetailsPage clientDetailsPage, ClientStatus targetStatus) {
    CustomerChangeStatusPage statusChangePage = clientDetailsPage.navigateToCustomerChangeStatusPage();
    EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
    editCustomerStatusParameters.setClientStatus(targetStatus);
    editCustomerStatusParameters.setNote("Status change");
    CustomerChangeStatusPreviewPage statusPreviewPage = statusChangePage.setChangeStatusParametersAndSubmit(editCustomerStatusParameters);
    ClientViewDetailsPage newClientDetailsPage = statusPreviewPage.submitAndGotoClientViewDetailsPage();
    newClientDetailsPage.verifyStatus(targetStatus.getStatusText());
    newClientDetailsPage.verifyNotes(editCustomerStatusParameters.getNote());
    return newClientDetailsPage;
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) EditCustomerStatusParameters(org.mifos.test.acceptance.framework.group.EditCustomerStatusParameters) CustomerChangeStatusPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPage) CustomerChangeStatusPreviewPage(org.mifos.test.acceptance.framework.customer.CustomerChangeStatusPreviewPage)

Example 42 with ClientViewDetailsPage

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

the class ClientTestHelper method deleteClientGroupMembership.

public void deleteClientGroupMembership(String clientName, String note) {
    ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    String oldMeetingshedule = clientViewDetailsPage.getMeetingSchedule();
    String groupName = clientViewDetailsPage.getGroupMembership();
    GroupViewDetailsPage groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage(groupName);
    Integer activeClients = Integer.parseInt(groupViewDetailsPage.getNumberOfClientsInGroup());
    String avgIndyvidualLoanSize = groupViewDetailsPage.getAvgIndyvidualLoanSize();
    String totalLoanPortfolio = groupViewDetailsPage.getTotalLoanPortfolio();
    clientViewDetailsPage = navigationHelper.navigateToClientViewDetailsPage(clientName);
    clientViewDetailsPage = clientViewDetailsPage.navigateToEditRemoveGroupMembership().deleteGroupMembership().confirmDeleteGroupMembership(note);
    clientViewDetailsPage.verifyMeetingSchedule(oldMeetingshedule);
    clientViewDetailsPage.verifyNotes(note);
    ClientViewChangeLogPage changeLogPage = clientViewDetailsPage.navigateToClientViewChangeLog();
    if ("groupFlag".equals(changeLogPage.getLastEntryFieldName())) {
        changeLogPage.verifyLastEntryOnChangeLog("groupFlag", "1", "0", "mifos");
        changeLogPage.verifyEntryOnChangeLog(2, "Group Name", groupName, "-", "mifos");
    } else {
        changeLogPage.verifyLastEntryOnChangeLog("Group Name", groupName, "-", "mifos");
        changeLogPage.verifyEntryOnChangeLog(2, "groupFlag", "1", "0", "mifos");
    }
    groupViewDetailsPage = navigationHelper.navigateToGroupViewDetailsPage(groupName);
    groupViewDetailsPage.verifyNumberOfClientsInGroup(Integer.toString(activeClients - 1));
    groupViewDetailsPage.verifyAvgIndyvidualLoanSize(avgIndyvidualLoanSize);
    groupViewDetailsPage.verifyTotalLoanPortfolio(totalLoanPortfolio);
}
Also used : GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClientViewChangeLogPage(org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage)

Example 43 with ClientViewDetailsPage

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

the class UndoLoanDisbursalTest method undoClientLoanActiveInGoodStanding.

/**
     * Verifies that the loan is successfully reversed if the Account ID
     * is of a loan which is "active in good standing".
     * Client loan.
     * http://mifosforge.jira.com/browse/MIFOSTEST-20
     *
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void undoClientLoanActiveInGoodStanding() throws Exception {
    setTime(2011, 3, 28);
    String clientID = "0002-000000024";
    String clientLoanID = "000100000000041";
    String resultClickLink = "WeeklyClient Monday: ID 0002-000000024";
    ClientViewDetailsPage clientViewDetailsPage = (ClientViewDetailsPage) loanTestHelper.reverseLoanDisbursal(clientLoanID, clientID, false, resultClickLink);
    clientViewDetailsPage.verifyLoanDoesntExist("Acct #" + clientLoanID);
    loanTestHelper.verifyHistoryAndSummaryReversedLoan(clientViewDetailsPage.navigateToClosedAccountsPage(), clientLoanID, "104613.0", "0", "104,613", 1);
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 44 with ClientViewDetailsPage

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

the class UndoLoanDisbursalTest method undoClientLoanActiveInBadStanding.

/**
     * Verifies that the loan is successfully reversed if the Account ID
     * is of a loan which is "active in bad standing".
     * Client loan.
     * http://mifosforge.jira.com/browse/MIFOSTEST-22
     *
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void undoClientLoanActiveInBadStanding() throws Exception {
    setTime(2011, 2, 28);
    String clientID = "0002-000000024";
    String clientLoanID = "000100000000040";
    String resultClickLink = "WeeklyClient Monday: ID 0002-000000024";
    ClientViewDetailsPage clientViewDetailsPage = (ClientViewDetailsPage) loanTestHelper.reverseLoanDisbursal(clientLoanID, clientID, false, resultClickLink);
    clientViewDetailsPage.verifyLoanDoesntExist("Acct #" + clientLoanID);
    loanTestHelper.verifyHistoryAndSummaryReversedLoan(clientViewDetailsPage.navigateToClosedAccountsPage(), clientLoanID);
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage)

Example 45 with ClientViewDetailsPage

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

the class QuestionGroupTest method testChangeLog.

/**
     * Verifying that Change Log for Question Groups has an appropriate format
     * http://mifosforge.jira.com/browse/MIFOSTEST-667
     *
     * @throws Exception
     */
@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void testChangeLog() throws Exception {
    String questionGroup = "CreateClientQG-1";
    try {
        questionGroupTestHelper.markQuestionAsActive("FreeText");
        questionGroupTestHelper.markQuestionGroupAsActive(questionGroup);
        //Given
        ClientViewDetailsPage clientViewDetailsPage = clientTestHelper.navigateToClientViewDetailsPage(CLIENT);
        //When
        clientViewDetailsPage = clientTestHelper.editQuestionGroupResponses(clientViewDetailsPage, "0", "details[0].sectionDetails[0].questions[0].value", "qwert");
        //Then
        ClientViewChangeLogPage clientViewChangeLogPage = clientViewDetailsPage.navigateToClientViewChangeLog();
        clientViewChangeLogPage.verifyChangeLog(asList("CreateClientQG-1/Misc/FreeText"), asList("-"), asList("qwert"), asList("mifos"), 2);
    } finally {
        questionGroupTestHelper.markQuestionGroupAsInactive(questionGroup);
    }
}
Also used : ClientViewDetailsPage(org.mifos.test.acceptance.framework.client.ClientViewDetailsPage) ClientViewChangeLogPage(org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage) Test(org.testng.annotations.Test)

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