Search in sources :

Example 1 with CenterViewDetailsPage

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");
}
Also used : CenterViewDetailsPage(org.mifos.test.acceptance.framework.center.CenterViewDetailsPage) AttachSurveyPage(org.mifos.test.acceptance.framework.loan.AttachSurveyPage)

Example 2 with CenterViewDetailsPage

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;
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) CenterViewDetailsPage(org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)

Example 3 with CenterViewDetailsPage

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();
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) CenterViewDetailsPage(org.mifos.test.acceptance.framework.center.CenterViewDetailsPage) ClosedAccountsPage(org.mifos.test.acceptance.framework.loan.ClosedAccountsPage) LoginPage(org.mifos.test.acceptance.framework.login.LoginPage)

Example 4 with CenterViewDetailsPage

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);
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) CreateQuestionGroupParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage) QuestionnairePage(org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage) ArrayList(java.util.ArrayList) QuestionResponseParameters(org.mifos.test.acceptance.framework.loan.QuestionResponseParameters) CreateQuestionParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionParameters) CenterViewDetailsPage(org.mifos.test.acceptance.framework.center.CenterViewDetailsPage) Test(org.testng.annotations.Test)

Example 5 with CenterViewDetailsPage

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);
}
Also used : ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) CenterViewDetailsPage(org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)

Aggregations

CenterViewDetailsPage (org.mifos.test.acceptance.framework.center.CenterViewDetailsPage)7 HomePage (org.mifos.test.acceptance.framework.HomePage)2 CreateCenterEnterDataPage (org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage)2 ViewQuestionResponseDetailPage (org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage)2 SearchResultsPage (org.mifos.test.acceptance.framework.search.SearchResultsPage)2 Test (org.testng.annotations.Test)2 ArrayList (java.util.ArrayList)1 MeetingParameters (org.mifos.test.acceptance.framework.center.MeetingParameters)1 AttachSurveyPage (org.mifos.test.acceptance.framework.loan.AttachSurveyPage)1 ClosedAccountsPage (org.mifos.test.acceptance.framework.loan.ClosedAccountsPage)1 QuestionResponseParameters (org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)1 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)1 LoginPage (org.mifos.test.acceptance.framework.login.LoginPage)1 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)1 CreateQuestionParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionParameters)1 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)1 QuestionnairePage (org.mifos.test.acceptance.framework.questionnaire.QuestionnairePage)1