use of org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage 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);
}
use of org.mifos.test.acceptance.framework.client.ClientViewChangeLogPage 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);
}
}
Aggregations