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;
}
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);
}
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);
}
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);
}
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);
}
}
Aggregations