Search in sources :

Example 1 with OfficeViewDetailsPage

use of org.mifos.test.acceptance.framework.office.OfficeViewDetailsPage in project head by mifos.

the class OfficeHelper method createOffice.

/**
     * Creates an office.
     * @param officeParameters The office parameters.
     * @return The admin page.
     */
public AdminPage createOffice(OfficeParameters officeParameters) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    CreateOfficeEnterDataPage officeEnterDataPage = adminPage.navigateToCreateOfficeEnterDataPage();
    officeEnterDataPage.verifyPage();
    CreateOfficePreviewDataPage previewDataPage = officeEnterDataPage.submitAndGotoCreateOfficePreviewDataPage(officeParameters);
    previewDataPage.verifyPage();
    CreateOfficeConfirmationPage confirmationPage = previewDataPage.submit();
    confirmationPage.verifyPage();
    OfficeViewDetailsPage detailsPage = confirmationPage.navigateToOfficeViewDetailsPage();
    detailsPage.verifyPage();
    return detailsPage.navigateToAdminPage();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateOfficePreviewDataPage(org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage) OfficeViewDetailsPage(org.mifos.test.acceptance.framework.office.OfficeViewDetailsPage) CreateOfficeEnterDataPage(org.mifos.test.acceptance.framework.office.CreateOfficeEnterDataPage) CreateOfficeConfirmationPage(org.mifos.test.acceptance.framework.office.CreateOfficeConfirmationPage)

Example 2 with OfficeViewDetailsPage

use of org.mifos.test.acceptance.framework.office.OfficeViewDetailsPage in project head by mifos.

the class QuestionGroupTest method createOfficeWithQuestionGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void createOfficeWithQuestionGroup() throws Exception {
    //When
    QuestionResponsePage questionResponsePage = officeHelper.navigateToQuestionResponsePage(getOfficeParameters("MyOfficeDHMFT", "DHM"));
    QuestionResponseParameters initialResponse = getResponse("123");
    QuestionResponseParameters updatedResponse = getResponse("1234");
    CreateOfficePreviewDataPage createOfficePreviewDataPage = questionGroupTestHelper.createOfficeWithQuestionGroup(questionResponsePage, initialResponse, updatedResponse);
    assertTextFoundOnPage("This office name already exist");
    DefineNewOfficePage defineNewOfficePage = createOfficePreviewDataPage.editOfficeInformation();
    defineNewOfficePage.setOfficeName("TestOffice");
    defineNewOfficePage.setOfficeShortName("TO");
    defineNewOfficePage.preview();
    defineNewOfficePage.next();
    OfficeViewDetailsPage officeViewDetailsPage = createOfficePreviewDataPage.submit().navigateToOfficeViewDetailsPage();
    ViewQuestionResponseDetailPage viewQuestionResponseDetailPage = officeViewDetailsPage.navigateToViewAdditionalInformation();
    viewQuestionResponseDetailPage.verifyQuestionPresent("FreeText", "1234");
    officeViewDetailsPage = viewQuestionResponseDetailPage.navigateToDetailsPage();
    String newQuestion = "Text";
    addQuestion(newQuestion, "Default", CREATE_OFFICE_QUESTION_GROUP_ID);
    String questionToDeactivate = "FreeText";
    questionGroupTestHelper.markQuestionAsInactive(questionToDeactivate);
    questionResponsePage = officeHelper.navigateToQuestionResponsePage(getOfficeParameters("TestOffice2", "TO2"));
    //Then
    questionResponsePage.verifyQuestionsDoesnotappear(new String[] { questionToDeactivate });
    questionResponsePage.verifyQuestionsExists(new String[] { newQuestion });
    officeHelper.verifyQuestionPresent("TestOffice", "Text", "");
}
Also used : ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) DefineNewOfficePage(org.mifos.test.acceptance.framework.admin.DefineNewOfficePage) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage) CreateOfficePreviewDataPage(org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage) OfficeViewDetailsPage(org.mifos.test.acceptance.framework.office.OfficeViewDetailsPage) QuestionResponseParameters(org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)

Aggregations

CreateOfficePreviewDataPage (org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage)2 OfficeViewDetailsPage (org.mifos.test.acceptance.framework.office.OfficeViewDetailsPage)2 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)1 DefineNewOfficePage (org.mifos.test.acceptance.framework.admin.DefineNewOfficePage)1 QuestionResponseParameters (org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)1 CreateOfficeConfirmationPage (org.mifos.test.acceptance.framework.office.CreateOfficeConfirmationPage)1 CreateOfficeEnterDataPage (org.mifos.test.acceptance.framework.office.CreateOfficeEnterDataPage)1 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)1 ViewQuestionResponseDetailPage (org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage)1