use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class AddFamilyDetailsTest method canEditAfterSubmit.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canEditAfterSubmit() throws Exception {
propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
CreateClientEnterPersonalDataPage clientPersonalDataPage1 = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage1.submitAndGotoCreateClientEnterFamilyDetailsPage();
clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
CreateClientPreviewDataPage clientPreviewDataPage1 = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
clientPreviewDataPage1.submit();
selenium.click("client_creationConfirmation.link.viewClientDetailsLink");
selenium.waitForPageToLoad("30000");
ClientViewDetailsPage clientDetailsPage = new ClientViewDetailsPage(selenium);
ClientEditFamilyPage editFamilyPage = clientDetailsPage.editFamilyInformation();
ClientEditFamilyParameters editParameters = new ClientEditFamilyParameters();
editParameters.setFirstName("newName");
editParameters.setRelationship(1);
editParameters.setLastName("newLastName");
editParameters.setDateOfBirthDD("11");
editParameters.setDateOfBirthMM("12");
editParameters.setDateOfBirthYY("2008");
editParameters.setGender(49);
editParameters.setLivingStatus(620);
ClientFamilyEditPreviewPage previewEdit = editFamilyPage.submitAndNavigateToClientEditFamilyPreviewPage(editParameters);
previewEdit.verifyPage();
clientDetailsPage = previewEdit.submit();
//Assert.assertTrue(selenium.isTextPresent("newName newLastName"));
Assert.assertEquals(selenium.getText("displayName"), "newName newLastName");
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class AddFamilyDetailsTest method canGoTosubmitAfterPreviewPageTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canGoTosubmitAfterPreviewPageTest() throws Exception {
propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
clientFamilyDataPage = clientTestHelper.createFamily("fname", "lname", "11", "01", "1987", clientFamilyDataPage);
CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
CreateClientPreviewDataPage clientPreviewDataPage = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
clientPreviewDataPage.submit();
selenium.click("client_creationConfirmation.link.viewClientDetailsLink");
selenium.waitForPageToLoad("30000");
new ClientViewDetailsPage(selenium);
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method searchForClientAndEditDetailsTest.
// implementation of test described in issue 2454
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void searchForClientAndEditDetailsTest() throws Exception {
ClientsAndAccountsHomepage clientsPage = navigationHelper.navigateToClientsAndAccountsPage();
ClientSearchResultsPage searchResultsPage = clientsPage.searchForClient("client1");
searchResultsPage.verifyPage();
ClientViewDetailsPage clientDetailsPage = searchResultsPage.navigateToSearchResult("client1 lastname: ID 0002-000000005");
ClientEditMFIPage editMFIPage = clientDetailsPage.navigateToEditMFIPage();
editMFIPage.verifyPage();
ClientEditMFIParameters params = new ClientEditMFIParameters();
params.setExternalId("extID123");
params.setTrainedDateDD("15");
params.setTrainedDateMM("12");
params.setTrainedDateYYYY("2008");
ClientEditMFIPreviewPage mfiPreviewPage = editMFIPage.submitAndNavigateToClientEditMFIPreviewPage(params);
mfiPreviewPage.verifyPage();
clientDetailsPage = mfiPreviewPage.submit();
assertTextFoundOnPage("extID123");
assertTextFoundOnPage("15/12/2008");
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method prepareClientsForAddClientsWithAccountsToGroups.
private void prepareClientsForAddClientsWithAccountsToGroups(String[] clientKeys, Map<String, String> clients) throws UnsupportedEncodingException {
DateTime today = new DateTime();
if (today.getDayOfWeek() == 7) {
//skip Sunday
today = today.plusDays(1);
}
String frequency = "1";
String meetingPlace = "Gniezno";
//+1 because ISO week begins with Monday=1 and Mifos week begin with Sunday=1
MeetingParameters.WeekDay weekDay = MeetingParameters.WeekDay.findByInt(today.getDayOfWeek() + 1);
String savingsProduct = "MonthlyClientSavingsAccount";
String office = "MyOfficeDHMFT";
String loanOfficer = "loan officer";
String loanProduct = "Flat Interest Loan Product With Fee";
for (int i = 0; i < clientKeys.length; i++) {
ClientViewDetailsPage cvdp = clientTestHelper.createClientWithCustomMFIInformation(loanOfficer, office, frequency, weekDay, meetingPlace);
cvdp = clientTestHelper.changeCustomerStatus(cvdp, ClientStatus.ACTIVE);
clients.put(clientKeys[i], cvdp.getHeading());
}
addLoanToCustomer(clients.get("ILoan"), false, loanProduct, today);
addLoanToCustomer(clients.get("ALoan"), true, loanProduct, today);
addSavingsToCustomer(clients.get("ISaving"), false, savingsProduct);
addSavingsToCustomer(clients.get("ASaving"), true, savingsProduct);
addLoanToCustomer(clients.get("IMultiple"), false, loanProduct, today);
addSavingsToCustomer(clients.get("IMultiple"), false, savingsProduct);
addLoanToCustomer(clients.get("AMultiple"), false, loanProduct, today);
addSavingsToCustomer(clients.get("AMultiple"), true, savingsProduct);
}
use of org.mifos.test.acceptance.framework.client.ClientViewDetailsPage in project head by mifos.
the class ClientTest method addClientToGroupAndVerify.
private void addClientToGroupAndVerify(String groupName, String clientName) {
clientTestHelper.addClientToGroup(clientName, groupName);
ClientViewDetailsPage cvdp = clientTestHelper.navigateToClientViewDetailsPage(clientName);
cvdp.verifyGroupMembership(groupName);
}
Aggregations