Search in sources :

Example 1 with DefineNewOfficePage

use of org.mifos.test.acceptance.framework.admin.DefineNewOfficePage in project head by mifos.

the class OfficeHelper method defineOffice.

public void defineOffice(String officeName, String shortName, String officeType, String parentOffice) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineNewOfficePage defineNewOfficePage = adminPage.navigateToDefineANewOfficePage();
    defineNewOfficePage.setOfficeName(officeName);
    defineNewOfficePage.setOfficeShortName(shortName);
    defineNewOfficePage.setOfficeType(officeType);
    defineNewOfficePage.setParentOffice(parentOffice);
    defineNewOfficePage.preview();
    defineNewOfficePage.submit();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineNewOfficePage(org.mifos.test.acceptance.framework.admin.DefineNewOfficePage)

Example 2 with DefineNewOfficePage

use of org.mifos.test.acceptance.framework.admin.DefineNewOfficePage 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

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