use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage in project head by mifos.
the class ClientTest method verifyErrorsMessages.
@Test(singleThreaded = true, groups = { "smoke", "client", "acceptance", "ui", "no_db_unit" }, enabled = true)
public void verifyErrorsMessages() {
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineHiddenMandatoryFieldsPage mandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
mandatoryFieldsPage.checkMandatoryCitizenShip();
mandatoryFieldsPage.checkMandatoryEthnicity();
mandatoryFieldsPage.checkMandatoryMaritalStatus();
mandatoryFieldsPage.submit();
CreateClientEnterPersonalDataPage personalDataPage = navigationHelper.navigateToCreateClientEnterPersonalDataPage(officeName);
String[] errors = personalDataPage.getMandatoryBlankFieldsNames();
String[] fields = new String[] { "Salutation", "First Name", "Last Name", "Date of birth", "Gender", "Ethnicity", "Citizenship", "Poverty status", "Marital Status" };
for (int i = 0; i < fields.length; ++i) {
Assert.assertEquals(fields[i], errors[i]);
}
adminPage = navigationHelper.navigateToAdminPage();
adminPage.navigateToDefineHiddenMandatoryFields();
mandatoryFieldsPage.uncheckMandatoryCitizenShip();
mandatoryFieldsPage.uncheckMandatoryEthnicity();
mandatoryFieldsPage.uncheckMandatoryMaritalStatus();
mandatoryFieldsPage.submit();
adminPage.logout();
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage in project head by mifos.
the class ClientTestHelper method createClientWithQuestionGroups.
public ClientViewDetailsPage createClientWithQuestionGroups(String loanOfficer, String officeName, Map<String, String> choiceTags, String answer) {
CreateClientEnterPersonalDataPage clientPersonalDataPage = navigateToPersonalDataPage(officeName);
CreateClientEnterPersonalDataPage.SubmitFormParameters formParameters = FormParametersHelper.getClientEnterPersonalDataPageFormParameters();
clientPersonalDataPage = clientPersonalDataPage.create(formParameters);
QuestionResponsePage questionResponsePage = clientPersonalDataPage.submitAndGotoCaptureQuestionResponsePage();
questionResponsePage.populateTextAnswer("name=questionGroups[0].sectionDetails[0].questions[0].value", answer);
questionResponsePage.populateSmartSelect("txtListSearch", choiceTags);
questionResponsePage.navigateToNextPage();
navigateToConfirmationPage(loanOfficer);
return navigateToClientViewDetails(formParameters);
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage 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.CreateClientEnterPersonalDataPage in project head by mifos.
the class AddFamilyDetailsTest method addFamilyWithAllNamesTest.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void addFamilyWithAllNamesTest() throws Exception {
propertiesHelper.setMaximumNumberOfFamilyMemebers(10);
CreateClientEnterPersonalDataPage clientPersonalDataPage = clientTestHelper.createClientForFamilyInfo("MyOfficeDHMFT", "11", "12", "1988");
CreateClientEnterFamilyDetailsPage clientFamilyDataPage = clientPersonalDataPage.submitAndGotoCreateClientEnterFamilyDetailsPage();
clientFamilyDataPage = clientTestHelper.createFamilyWithAllName("fname", "lname", "mname", "slname", "11", "01", "1987", clientFamilyDataPage);
CreateClientEnterMfiDataPage nextPage = clientFamilyDataPage.submitAndGotoCreateClientEnterMfiDataPage();
CreateClientPreviewDataPage clientPreviewDataPage = clientTestHelper.createClientMFIInformationAndGoToPreviewPage("loan officer", nextPage);
CreateClientEnterFamilyDetailsPage editPage = clientPreviewDataPage.edit();
editPage.verifyPage("CreateClientFamilyInfo");
}
use of org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage 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);
}
Aggregations