use of org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage 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();
}
use of org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage 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", "");
}
use of org.mifos.test.acceptance.framework.office.CreateOfficePreviewDataPage in project head by mifos.
the class QuestionGroupTestHelper method createOfficeWithQuestionGroup.
public CreateOfficePreviewDataPage createOfficeWithQuestionGroup(QuestionResponsePage questionResponsePage, QuestionResponseParameters initialResponse, QuestionResponseParameters updatedResponse) {
questionResponsePage.populateAnswers(initialResponse);
CreateOfficePreviewDataPage createOfficePreviewDataPage = questionResponsePage.navigateToNextPageAndReturnPage();
QuestionResponsePage questionResponsePage2 = createOfficePreviewDataPage.editAdditionalInformation();
questionResponsePage2.populateAnswers(updatedResponse);
createOfficePreviewDataPage = questionResponsePage2.navigateToNextPageAndReturnPage();
return createOfficePreviewDataPage.submitWithError();
}
Aggregations