use of org.mifos.test.acceptance.framework.center.CenterViewDetailsPage in project head by mifos.
the class AttachSurveyLinkTest method attachSurveyToCenter.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void attachSurveyToCenter() throws Exception {
CenterViewDetailsPage centerViewDetailsPage = navigationHelper.navigateToCenterViewDetailsPage("Default Center");
AttachSurveyPage attachSurveyPage = centerViewDetailsPage.navigateToAttachSurveyPage();
attachSurveyPage.verifyPage("selectQuestionnaire");
}
use of org.mifos.test.acceptance.framework.center.CenterViewDetailsPage in project head by mifos.
the class NavigationHelper method navigateToCenterViewDetailsPage.
public CenterViewDetailsPage navigateToCenterViewDetailsPage(String centerName) {
HomePage homePage = navigateToHomePage();
SearchResultsPage searchResultsPage = homePage.search(centerName);
searchResultsPage.verifyPage();
CenterViewDetailsPage centerDetailsPage = searchResultsPage.navigateToCenterViewDetailsPage("link=" + centerName + "*");
centerDetailsPage.verifyPage();
return centerDetailsPage;
}
use of org.mifos.test.acceptance.framework.center.CenterViewDetailsPage in project head by mifos.
the class ViewClosedAccountsTest method navigateToCenterDetailsFromClosedAccounts.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void navigateToCenterDetailsFromClosedAccounts() throws Exception {
LoginPage loginPage = appLauncher.launchMifos();
HomePage homePage = loginPage.loginSuccessfullyUsingDefaultCredentials();
homePage.verifyPage();
SearchResultsPage searchResultsPage = homePage.search("WeeklyMeetingCenter");
searchResultsPage.verifyPage();
CenterViewDetailsPage centerViewDetailsPage = searchResultsPage.navigateToCenterViewDetailsPage("link=WeeklyMeetingCenter*");
centerViewDetailsPage.verifyPage();
ClosedAccountsPage closedAccountsPage = centerViewDetailsPage.navigateToClosedAccountsPage();
closedAccountsPage.verifyPage();
CenterViewDetailsPage returnedCenterViewDetailsPage = closedAccountsPage.returnToCenterViewDetailsPage();
returnedCenterViewDetailsPage.verifyPage();
}
use of org.mifos.test.acceptance.framework.center.CenterViewDetailsPage in project head by mifos.
the class CenterTest method createCenterTest.
/**
* Capturing responses during the Center creation http://mifosforge.jira.com/browse/MIFOSTEST-665
*
* @throws Exception
*/
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createCenterTest() throws Exception {
String officeName = "MyOfficeDHMFT";
String qG1Name = "CreateCenterQG";
String qG2Name = "CreateCenterQG2";
createQuestions();
CreateQuestionGroupParameters qG1 = questionTestHelper.getCreateQuestionGroupParameters(qG1Name, asList("center question 1", "center question 2", "center question 3"), "Create Center", "Sec 1");
questionTestHelper.createQuestionGroup(qG1);
CreateQuestionGroupParameters qG2 = questionTestHelper.getCreateQuestionGroupParameters(qG2Name, asList("center question 4", "center question 5", "center question 6"), "Create Center", "Sec 2");
questionTestHelper.createQuestionGroup(qG2);
String testCenterName = "Center" + StringUtil.getRandomString(6);
CreateCenterEnterDataPage.SubmitFormParameters centerParams = getCenterParameters(testCenterName, "loan officer");
QuestionResponseParameters responseParams = getQuestionResponseParameters("answer1");
QuestionResponseParameters responseParams2 = getQuestionResponseParameters("answer2");
List<CreateQuestionParameters> questionsList = new ArrayList<CreateQuestionParameters>();
questionsList.add(newFreeTextQuestionParameters("new center question 1"));
questionsList.add(newFreeTextQuestionParameters("new center question 2"));
String[] newActiveQuestions = { "new center question 1", "center question 2" };
String[] deactivateArray = { "center question 3", "center question 4" };
List<String> deactivateList = Arrays.asList(deactivateArray);
CenterViewDetailsPage centerViewDetailsPage = centerTestHelper.createCenterWithQuestionGroupsEdited(centerParams, officeName, responseParams, responseParams2);
centerViewDetailsPage.navigateToViewAdditionalInformation().navigateBack();
questionTestHelper.addNewQuestionsToQuestionGroup(qG1Name, questionsList);
questionTestHelper.markQuestionsAsInactive(deactivateList);
questionTestHelper.markQuestionGroupAsInactive(qG2Name);
QuestionResponsePage responsePage = centerTestHelper.navigateToQuestionResponsePageWhenCreatingCenter(centerParams, officeName);
responsePage.verifyQuestionsDoesnotappear(deactivateArray);
responsePage.verifyQuestionsExists(newActiveQuestions);
centerViewDetailsPage = centerTestHelper.navigateToCenterViewDetailsPage(testCenterName);
centerViewDetailsPage.verifyActiveCenter(centerParams);
ViewQuestionResponseDetailPage responseDetailsPage = centerViewDetailsPage.navigateToViewAdditionalInformation();
responseDetailsPage.verifyQuestionsDoesnotappear(deactivateArray);
responseDetailsPage.verifyEditButtonDisabled("1");
QuestionnairePage questionnairePage = responseDetailsPage.navigateToEditSection("0");
questionnairePage.verifyField("details[0].sectionDetails[0].questions[0].value", "");
questionnairePage.verifyField("details[0].sectionDetails[0].questions[1].value", "");
questionTestHelper.markQuestionGroupAsInactive(qG1Name);
}
use of org.mifos.test.acceptance.framework.center.CenterViewDetailsPage in project head by mifos.
the class QuestionGroupTestHelper method editQuestionGroupResponsesInCenter.
public CenterViewDetailsPage editQuestionGroupResponsesInCenter(AttachQuestionGroupParameters attachParams) {
CenterViewDetailsPage centerViewDetailsPage = (CenterViewDetailsPage) navigationHelper.navigateToCenterViewDetailsPage(attachParams.getTarget()).navigateToLatestViewQuestionResponseDetailPage(attachParams.getQuestionGroupName()).navigateToEditSection("0").setResponses(attachParams.getTextResponses()).checkResponses(attachParams.getCheckResponses()).submitAndNavigateToCenterViewDetailsPage();
ViewQuestionResponseDetailPage viewQuestionResponseDetailPage = centerViewDetailsPage.navigateToLatestViewQuestionResponseDetailPage(attachParams.getQuestionGroupName());
viewQuestionResponseDetailPage.verifyQuestionsAndAnswers(attachParams);
viewQuestionResponseDetailPage.navigateBack();
return new CenterViewDetailsPage(selenium);
}
Aggregations