Search in sources :

Example 16 with AdminPage

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

the class RolesAndPermissionTest method editLoanStatusWithMaxRestrictionAndMultipleRolesTest.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void editLoanStatusWithMaxRestrictionAndMultipleRolesTest() throws Exception {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    // Set 'Maximum loan amount' for role Admin
    setMaximumLoanAmountRestriction(adminPage, "100", true);
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000043");
    try {
        loanAccountPage.changeAccountStatusToAccepted();
    } catch (AssertionError ae) {
        Assert.assertEquals(ae.getMessage(), "Expected page <LoanAccountDetail>, actual page <ChangeStatusPreview>!!! with error message > User does not have permission to approve loans of this value");
    }
    adminPage = navigationHelper.navigateToAdminPage();
    setMaximumLoanAmountRestriction(adminPage, "", false);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 17 with AdminPage

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

the class RolesAndPermissionTest method disableSystemInfoPermission.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void disableSystemInfoPermission() throws Exception {
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    changePermission(adminPage, "10_0", false);
    //try to reach System Info page, should fail
    adminPage = adminPage.failNavigationToSystemInfoPage();
    adminPage = navigationHelper.navigateToAdminPage();
    // reverting for other tests to pass
    changePermission(adminPage, "10_0", true);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) Test(org.testng.annotations.Test)

Example 18 with AdminPage

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

the class AccountingIntegrationTest method verifyAccountingExportsWorkFlow.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyAccountingExportsWorkFlow() throws Exception {
    AdminPage adminPage = loginAndGoToAdminPage();
    ViewAccountingExportsPage viewAccountingExportsPage = adminPage.navigateToViewAccountingExports();
    viewAccountingExportsPage.verifyPage();
    viewAccountingExportsPage.clickCancel();
    adminPage.verifyPage();
    viewAccountingExportsPage = adminPage.navigateToViewAccountingExports();
    viewAccountingExportsPage.clickClearExports();
    viewAccountingExportsPage.verifyConfirmationPage();
    viewAccountingExportsPage.clickSubmit();
    viewAccountingExportsPage.verifyPage();
    viewAccountingExportsPage.verifyNoExportPresent();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ViewAccountingExportsPage(org.mifos.test.acceptance.framework.admin.ViewAccountingExportsPage)

Example 19 with AdminPage

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

the class AccountingIntegrationTest method verifyAccountingExportsSavignsAccount.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyAccountingExportsSavignsAccount() throws Exception {
    AdminPage adminPage = loginAndGoToAdminPage();
    ViewAccountingExportsPage viewAccountingExportsPage = adminPage.navigateToViewAccountingExports();
    viewAccountingExportsPage = viewAccountingExportsPage.clickClearExports().clickSubmit();
    ViewAccountingDataDetailPage viewAccountingDataDetail = viewAccountingExportsPage.navigateToViewAccountingDataDetail("2011-09-12");
    if (!viewAccountingDataDetail.verifyIfListContains("Mandatory Savings Accounts")) {
        Assert.fail("Accounting Export Details should contain Mandatory Savings Accounts row.");
    }
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) ViewAccountingDataDetailPage(org.mifos.test.acceptance.framework.admin.ViewAccountingDataDetailPage) ViewAccountingExportsPage(org.mifos.test.acceptance.framework.admin.ViewAccountingExportsPage)

Example 20 with AdminPage

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

the class AccountingIntegrationTest method loginAndGoToAdminPage.

private AdminPage loginAndGoToAdminPage() {
    HomePage homePage = appLauncher.launchMifos().loginSuccessfullyUsingDefaultCredentials();
    homePage.verifyPage();
    AdminPage adminPage = homePage.navigateToAdminPage();
    adminPage.verifyPage();
    return adminPage;
}
Also used : HomePage(org.mifos.test.acceptance.framework.HomePage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage)

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