Search in sources :

Example 21 with AdminPage

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

the class ImportTransactionsTest method importTransaction.

private void importTransaction(String importFile, String importType) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    ImportTransactionsPage importTransactionsPage = adminPage.navigateToImportTransactionsPage();
    importTransactionsPage.verifyPage();
    ImportTransactionsConfirmationPage importTransactionsConfirmationPage = importTransactionsPage.importAudiTransactions(importFile, importType);
    importTransactionsConfirmationPage.verifyPage();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ImportTransactionsConfirmationPage(org.mifos.test.acceptance.framework.admin.ImportTransactionsConfirmationPage) ImportTransactionsPage(org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)

Example 22 with AdminPage

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

the class DefineHiddenMandatoryFieldsTest method verifyChangesMadeOnDefineMandatoryHiddenFileds.

@Test(enabled = true)
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public //http://mifosforge.jira.com/browse/MIFOSTEST-219
void verifyChangesMadeOnDefineMandatoryHiddenFileds() {
    //When
    AdminPage adminPage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin").disablePermission("9_1").verifyPermissionText("9_1", "Can define hidden/mandatory fields").submitAndGotoViewRolesPage().navigateToAdminPage();
    DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
    //Then
    defineHiddenMandatoryFieldsPage.verifyAccessDenied();
    //When
    adminPage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin").enablePermission("9_1").verifyPermissionText("9_1", "Can define hidden/mandatory fields").submitAndGotoViewRolesPage().navigateToAdminPage();
    defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
    defineHiddenMandatoryFieldsPage.checkHideRelativeSecondLastName();
    defineHiddenMandatoryFieldsPage.checkMandatoryEthnicity();
    adminPage = defineHiddenMandatoryFieldsPage.submit();
    adminPage.navigateToClientsAndAccountsPageUsingHeaderTab().navigateToCreateNewClientPage().navigateToCreateClientWithoutGroupPage().chooseOffice("MyOfficeDHMFT");
    //Then
    Assert.assertTrue(selenium.isTextPresent("*Ethnicity:"));
    Assert.assertFalse(selenium.isElementPresent("create_ClientPersonalInfo.input.spouseSecondLastName"));
    // restore original configuration
    defineHiddenMandatoryFieldsPage = navigationHelper.navigateToAdminPage().navigateToDefineHiddenMandatoryFields();
    defineHiddenMandatoryFieldsPage.uncheckHideRelativeSecondLastName();
    defineHiddenMandatoryFieldsPage.uncheckMandatoryEthnicity();
    defineHiddenMandatoryFieldsPage.submit();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) Test(org.testng.annotations.Test)

Example 23 with AdminPage

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

the class CreateGroupLoanAccountTest method tryCreateGroupLoanWithMandatoryPurposeOfLoan.

@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void tryCreateGroupLoanWithMandatoryPurposeOfLoan() throws Exception {
    applicationDatabaseOperation.updateGLIM(1);
    try {
        AdminPage adminPage = navigationHelper.navigateToAdminPage();
        DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
        defineHiddenMandatoryFieldsPage.checkMandatoryLoanAccountPurpose();
        defineHiddenMandatoryFieldsPage.submit();
        adminPage.navigateToClientsAndAccountsPageUsingHeaderTab();
        CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
        searchParameters.setSearchString("Default Group");
        searchParameters.setLoanProduct("WeeklyGroupFlatLoanWithOnetimeFee");
        CreateLoanAccountEntryPage loanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
        loanAccountEntryPage.selectTwoClientsForGlim();
        loanAccountEntryPage = loanAccountEntryPage.clickContinueButExpectValidationFailure();
        loanAccountEntryPage.verifyError("Please specify loan purpose for member 1.");
        loanAccountEntryPage.selectPurposeForGlim();
        loanAccountEntryPage.clickContinue();
    } finally {
        AdminPage adminPage = navigationHelper.navigateToAdminPage();
        DefineHiddenMandatoryFieldsPage defineHiddenMandatoryFieldsPage = adminPage.navigateToDefineHiddenMandatoryFields();
        defineHiddenMandatoryFieldsPage.uncheckMandatoryLoanAccountPurpose();
        defineHiddenMandatoryFieldsPage.submit();
        applicationDatabaseOperation.updateGLIM(0);
    }
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) DefineHiddenMandatoryFieldsPage(org.mifos.test.acceptance.framework.admin.DefineHiddenMandatoryFieldsPage) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Example 24 with AdminPage

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

the class GroupTest method createQuestionGroupForCreateGroup.

private void createQuestionGroupForCreateGroup(String questionGroupTitle, String question1, String question2, List<Choice> choices) {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    CreateQuestionPage createQuestionPage = adminPage.navigateToCreateQuestionPage();
    createQuestionPage.addQuestion(getCreateQuestionParams(question1, NUMBER, 10, 100, null));
    createQuestionPage.addQuestion(getCreateQuestionParams(question2, SMART_SELECT, null, null, choices));
    adminPage = createQuestionPage.submitQuestions();
    CreateQuestionGroupPage createQuestionGroupPage = adminPage.navigateToCreateQuestionGroupPage();
    CreateQuestionGroupParameters parameters = getCreateQuestionGroupParameters(questionGroupTitle, asList(question1, question2));
    for (String section : parameters.getExistingQuestions().keySet()) {
        createQuestionGroupPage.addExistingQuestion(section, parameters.getExistingQuestions().get(section));
    }
    createQuestionGroupPage.markEveryOtherQuestionsMandatory(asList(question1));
    createQuestionGroupPage.submit(parameters);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) CreateQuestionGroupParameters(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupParameters) CreateQuestionPage(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionPage) CreateQuestionGroupPage(org.mifos.test.acceptance.framework.questionnaire.CreateQuestionGroupPage)

Example 25 with AdminPage

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

the class NoDBUnitAdditionalHolidayTest method createHoliday.

private void createHoliday(final CreateHolidayEntryPage.CreateHolidaySubmitParameters params) {
    logOut();
    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)

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