Search in sources :

Example 56 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class ViewOriginalLoanScheduleTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    if (isSetUpDone) {
        systemDateTime = new DateTime(2011, 10, 10, 10, 0, 0, 0);
        loanTestHelper.setApplicationTime(systemDateTime);
        return;
    }
    loanProductTestHelper = new LoanProductTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    systemDateTime = new DateTime(2010, 10, 11, 10, 0, 0, 0);
    loanTestHelper = new LoanTestHelper(selenium);
    loanTestHelper.setApplicationTime(systemDateTime);
    TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    dataSetup.createBranch(OfficeParameters.BRANCH_OFFICE, officeName, "Off");
    dataSetup.createUser(userLoginName, userName, officeName);
    dataSetup.createClient(clientName, officeName, userName);
    systemDateTime = new DateTime(2011, 10, 10, 10, 0, 0, 0);
    loanTestHelper.setApplicationTime(systemDateTime);
    createHolidays(dataSetup);
    new FeeTestHelper(dataSetup, new NavigationHelper(selenium)).createPeriodicFee(feeName, FeesCreatePage.SubmitFormParameters.LOAN, FeesCreatePage.SubmitFormParameters.WEEKLY_FEE_RECURRENCE, 1, 100);
    isSetUpDone = true;
}
Also used : TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 57 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class MainPenaltyTest method setUp.

@Override
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    errors = new HashMap<String, String>();
    errors.put("applies", "Please select Loans/Savings to which penalties apply.");
    errors.put("name", "Please specify Penalty Name.");
    errors.put("duration", "Please specify Grace Period Duration.");
    errors.put("glcode", "Please specify GL Code.");
    errors.put("min", "Please specify Cumulative Penalty Limit (Minimum).");
    errors.put("max", "Please specify Cumulative Penalty Limit (Maximum).");
    errors.put("amount", "Please specify Amount.");
    errors.put("frequency", "Please specify Penalty Application Frequency.");
    errors.put("rateOrAmount", "Please specify either rate or amount.");
    errors.put("formula", "Please specify rate along with formula.");
    errors.put("invalidDuration", "The Grace Period Duration is invalid because only positive numbers are allowed.");
    errors.put("invalidMin", "The Cumulative Penalty Limit (Minimum) is invalid because only positive numbers and decimal separator are allowed.");
    errors.put("invalidMax", "The Cumulative Penalty Limit (Maximum) is invalid because only positive numbers and decimal separator are allowed.");
    errors.put("invalidAmount", "The Amount is invalid because only positive numbers and decimal separator are allowed.");
    errors.put("invalidRate", "The Rate is invalid because only positive numbers and decimal separator are allowed.");
    errors.put("minGreaterMax", "Cumulative Penalty Limit (Minimum) can't be greater than Cumulative Penalty Limit (Maximum).");
    errors.put("beforeDecimalDuration", "The Grace Period Duration is invalid because the number of digits before the decimal separator exceeds the allowed number 14.");
    errors.put("beforeDecimalMin", "The Cumulative Penalty Limit (Minimum) is invalid because the number of digits before the decimal separator exceeds the allowed number 14.");
    errors.put("beforeDecimalMax", "The Cumulative Penalty Limit (Maximum) is invalid because the number of digits before the decimal separator exceeds the allowed number 14.");
    errors.put("beforeDecimalAmount", "The Amount is invalid because the number of digits before the decimal separator exceeds the allowed number 14.");
    errors.put("beforeDecimalRate", "The Rate is invalid because the number of digits before the decimal separator exceeds the allowed number 14.");
    errors.put("afterDecimalMin", "The Cumulative Penalty Limit (Minimum) is invalid because Only 1 digit(s) after decimal separator is allowed.");
    errors.put("afterDecimalMax", "The Cumulative Penalty Limit (Maximum) is invalid because Only 1 digit(s) after decimal separator is allowed.");
    errors.put("afterDecimalAmount", "The Amount is invalid because Only 1 digit(s) after decimal separator is allowed.");
    errors.put("afterDecimalRate", "The Rate is invalid because Only 1 digit(s) after decimal separator is allowed.");
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 58 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class PersonnelTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    userHelper = new UserHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) UserHelper(org.mifos.test.acceptance.framework.testhelpers.UserHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 59 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class CollectionSheetEntryAttendanceTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 7, 23, 1, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    collectionSheetEntryTestHelper = new CollectionSheetEntryTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
}
Also used : CollectionSheetEntryTestHelper(org.mifos.test.acceptance.framework.testhelpers.CollectionSheetEntryTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 60 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class CreateGLIMLoanAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    applicationDatabaseOperation.updateGLIM(1);
    loanTestHelper = new LoanTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 03, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)70 BeforeMethod (org.testng.annotations.BeforeMethod)42 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)23 DateTime (org.joda.time.DateTime)22 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)20 LoanProductTestHelper (org.mifos.test.acceptance.loanproduct.LoanProductTestHelper)13 TestDataSetup (org.mifos.test.acceptance.util.TestDataSetup)10 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)9 Test (org.testng.annotations.Test)9 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)6 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)6 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)6 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 Random (java.util.Random)4 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)4 GroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper)4 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)4 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)3