Search in sources :

Example 26 with AdminPage

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

the class HolidayTest method createHoliday.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createHoliday() throws Exception {
    //Given
    dateTimeUpdaterRemoteTestingService.setDateTime(new DateTime(2010, 1, 1, 13, 0, 0, 0));
    AdminPage adminPage = loginAndNavigateToAdminPage();
    adminPage.verifyPage();
    CreateHolidayEntryPage createHolidayEntryPage = adminPage.navigateToDefineHolidayPage();
    CreateHolidaySubmitParameters params = this.getHolidayParameters();
    CreateHolidayConfirmationPage confirmationPage = createHolidayEntryPage.submitAndNavigateToHolidayConfirmationPage(params);
    confirmationPage.submitAndNavigateToViewHolidaysPage();
    // try to create second holiday with the same date
    createHolidayEntryPage = adminPage.navigateToDefineHolidayPage();
    params.setName("Test Holiday 2");
    confirmationPage = createHolidayEntryPage.submitAndNavigateToHolidayConfirmationPage(params);
    assertTextFoundOnPage("Holiday with the same date already exists:", "Text about duplicated holidays was not found.");
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateHolidayConfirmationPage(org.mifos.test.acceptance.framework.holiday.CreateHolidayConfirmationPage) CreateHolidayEntryPage(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage) CreateHolidaySubmitParameters(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage.CreateHolidaySubmitParameters) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 27 with AdminPage

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

the class HolidayTest method createHolidayForInstallments.

private void createHolidayForInstallments(CreateHolidaySubmitParameters params) {
    AdminPage adminPage = loginAndNavigateToAdminPage();
    adminPage.verifyPage();
    CreateHolidayEntryPage createHolidayEntryPage = adminPage.navigateToDefineHolidayPage();
    CreateHolidayConfirmationPage confirmationPage = createHolidayEntryPage.submitAndNavigateToHolidayConfirmationPage(params);
    confirmationPage.submitAndNavigateToViewHolidaysPage();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateHolidayConfirmationPage(org.mifos.test.acceptance.framework.holiday.CreateHolidayConfirmationPage) CreateHolidayEntryPage(org.mifos.test.acceptance.framework.holiday.CreateHolidayEntryPage)

Example 28 with AdminPage

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

the class ClientTest method createQuestionGroup2.

private void createQuestionGroup2() {
    String qG_1 = "CloseClientQG";
    String qG_2 = "CloseClientQG2";
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    CreateQuestionGroupPage createQuestionGroupPage = adminPage.navigateToCreateQuestionGroupPage();
    CreateQuestionGroupParameters parameters;
    parameters = questionGroupTestHelper.getCreateQuestionGroupParameters(qG_1, asList(question1, question2, question3, question4, question5), "Close Client", "Section1");
    parameters.addExistingQuestion("Section2", question7);
    parameters.addExistingQuestion("Section2", question6);
    parameters.addExistingQuestion("Section2", question9);
    parameters.addExistingQuestion("Section2", question8);
    for (String section : parameters.getExistingQuestions().keySet()) {
        createQuestionGroupPage.addExistingQuestion(section, parameters.getExistingQuestions().get(section));
    }
    createQuestionGroupPage.markEveryOtherQuestionsMandatory(asList(question1));
    createQuestionGroupPage.submit(parameters);
    adminPage = navigationHelper.navigateToAdminPage();
    createQuestionGroupPage = adminPage.navigateToCreateQuestionGroupPage();
    parameters = questionGroupTestHelper.getCreateQuestionGroupParameters(qG_2, asList(question1, question6, question3, question5), "Close Client", "Section1");
    parameters.addExistingQuestion("Section2", question9);
    parameters.addExistingQuestion("Section2", question10);
    parameters.addExistingQuestion("Section2", question8);
    parameters.addExistingQuestion("Section2", question11);
    for (String section : parameters.getExistingQuestions().keySet()) {
        createQuestionGroupPage.addExistingQuestion(section, parameters.getExistingQuestions().get(section));
    }
    createQuestionGroupPage.submit(parameters);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateQuestionGroupParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters) CreateQuestionGroupPage(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)

Example 29 with AdminPage

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

the class ClientTest method testDeactivateQuestion.

private void testDeactivateQuestion(String question) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    ViewAllQuestionsPage viewAllQuestionsPage = adminPage.navigateToViewAllQuestions();
    QuestionDetailPage questionDetailPage = viewAllQuestionsPage.navigateToQuestionDetail(question);
    EditQuestionPage editQuestionPage = questionDetailPage.navigateToEditQuestionPage();
    questionDetailPage = editQuestionPage.deactivate();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) QuestionDetailPage(org.mifos.test.acceptance.framework.questionnaire.QuestionDetailPage) EditQuestionPage(org.mifos.test.acceptance.framework.questionnaire.EditQuestionPage) ViewAllQuestionsPage(org.mifos.test.acceptance.framework.questionnaire.ViewAllQuestionsPage)

Example 30 with AdminPage

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

the class ClientTest method testActivateQuestion.

private void testActivateQuestion(String question) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    ViewAllQuestionsPage viewAllQuestionsPage = adminPage.navigateToViewAllQuestions();
    QuestionDetailPage questionDetailPage = viewAllQuestionsPage.navigateToQuestionDetail(question);
    EditQuestionPage editQuestionPage = questionDetailPage.navigateToEditQuestionPage();
    questionDetailPage = editQuestionPage.activate();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) QuestionDetailPage(org.mifos.test.acceptance.framework.questionnaire.QuestionDetailPage) EditQuestionPage(org.mifos.test.acceptance.framework.questionnaire.EditQuestionPage) ViewAllQuestionsPage(org.mifos.test.acceptance.framework.questionnaire.ViewAllQuestionsPage)

Aggregations

AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)87 Test (org.testng.annotations.Test)33 HomePage (org.mifos.test.acceptance.framework.HomePage)9 CreateQuestionGroupPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)8 CreateQuestionGroupParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters)7 CreateUserParameters (org.mifos.test.acceptance.framework.user.CreateUserParameters)7 DateTime (org.joda.time.DateTime)6 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 CreateQuestionPage (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage)6 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)6 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)5 DefineHiddenMandatoryFieldsPage (org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage)5 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)5 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)4 EditLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPage)4 EditLoanProductPreviewPage (org.mifos.test.acceptance.framework.loanproduct.EditLoanProductPreviewPage)4 LoanProductDetailsPage (org.mifos.test.acceptance.framework.loanproduct.LoanProductDetailsPage)4 ViewLoanProductsPage (org.mifos.test.acceptance.framework.loanproduct.ViewLoanProductsPage)4