use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method createClientWithSaveForLaterAndChangeStatusTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-305
@Test(enabled = true)
public void createClientWithSaveForLaterAndChangeStatusTest() throws Exception {
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
// When
String groupName = "group1";
CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
clientParams = clientParams();
ClientViewDetailsPage clientViewDetailsPage = navigationHelper.navigateToClientsAndAccountsPage().navigateToCreateNewClientPage().selectGroup(groupName).create(clientParams).submitAndGotoCreateClientEnterMfiDataPage().navigateToPreview().saveForLater().navigateToClientViewDetailsPage();
clientViewDetailsPage.verifyStatus(ClientTestHelper.PARTIAL_APPLICATION);
// Then
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.PENDING_APPROVAL);
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method changeBackToPartialApplication.
private ClientViewDetailsPage changeBackToPartialApplication(int numberOfBlackFlags, ClientViewDetailsPage clientDetailsPage) {
ClientViewDetailsPage newClientDetailsPage = changeClientStatusToPartialAndVerify(clientDetailsPage);
newClientDetailsPage.verifyNumberOfBlackflags(numberOfBlackFlags);
return clientDetailsPage;
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method verifyAcceptedPaymentTypes.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// http://mifosforge.jira.com/browse/MIFOSTEST-248
@Test(enabled = true)
public void verifyAcceptedPaymentTypes() throws Exception {
// When
String groupName = "group1";
CreateClientEnterPersonalDataPage.SubmitFormParameters clientParams = new CreateClientEnterPersonalDataPage.SubmitFormParameters();
clientParams = clientParams();
clientParams.setFirstName("John");
clientParams.setLastName("Doe123");
ClientViewDetailsPage clientViewDetailsPage = clientTestHelper.createNewClient(groupName, clientParams);
clientViewDetailsPage.verifyHeading("John Doe123");
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addLoanFeesPaymentType(DefineAcceptedPaymentTypesPage.VOUCHER);
ApplyPaymentPage applyPaymentPage = navigationHelper.navigateToClientViewDetailsPage("John Doe123").navigateToViewClientChargesDetail().navigateToApplyPayments();
// Then
applyPaymentPage.verifyModeOfPayments();
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method addingMemeberToGroupWithDiffrentStatuses.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//TODO http://mifosforge.jira.com/browse/MIFOS-5081
@Test(enabled = false)
public void addingMemeberToGroupWithDiffrentStatuses() throws Exception {
String clientName;
CreateGroupSubmitParameters groupParams = new CreateGroupSubmitParameters();
groupParams.setGroupName("testGroup" + StringUtil.getRandomString(5));
EditCustomerStatusParameters editCustomerStatusParameters = new EditCustomerStatusParameters();
editCustomerStatusParameters.setNote("change status");
// When
ClientViewDetailsPage clientDetailsPage = clientTestHelper.createClientAndVerify("loan officer", "MyOfficeDHMFT");
clientName = clientDetailsPage.getHeading();
clientTestHelper.changeCustomerStatus(clientDetailsPage, ClientStatus.ACTIVE);
groupTestHelper.createNewGroupPartialApplication("Default Center", groupParams);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.PENDING_APPROVAL);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroupWithErrorGroupLowerStatus(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.ACTIVE);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.addClientToGroup(clientName, groupParams.getGroupName());
// When
clientTestHelper.deleteClientGroupMembership(clientName, "remove group membership");
editCustomerStatusParameters.setGroupStatus(GroupStatus.ON_HOLD);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
// When
editCustomerStatusParameters.setGroupStatus(GroupStatus.CLOSED);
editCustomerStatusParameters.setCloseReason(GroupCloseReason.DUPLICATE);
groupTestHelper.changeGroupStatus(groupParams.getGroupName(), editCustomerStatusParameters);
// Then
clientTestHelper.tryAddClientToClosedOrOnHoldGroup(clientName, groupParams.getGroupName());
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class QuestionGroupTest method editResponses.
private void editResponses(ClientViewDetailsPage clientViewDetailsPage, int id, Map<String, String> answers) {
QuestionGroupResponsePage questionGroupResponsePage = clientViewDetailsPage.navigateToQuestionGroupResponsePage(id);
QuestionnairePage questionnairePage = questionGroupResponsePage.navigateToEditResponses();
for (String question : answers.keySet()) {
questionnairePage.setResponse(question, answers.get(question));
}
ClientViewDetailsPage clientViewDetailsPage2 = (ClientViewDetailsPage) questionnairePage.submit();
Assert.assertEquals(clientViewDetailsPage2.getQuestionGroupInstances().get(id).getName(), "TestQuestionGroup");
}
Aggregations