Search in sources :

Example 51 with DateTimeUpdaterRemoteTestingService

use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.

the class RESTAPITest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeClass
public void setUp() throws Exception {
    super.setUp();
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 9, 13, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "REST_API_20110912_dbunit.xml", dataSource, selenium);
    helper = new RESTAPITestHelper(selenium);
    helper.navigateToJsonAjaxPage();
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeClass(org.testng.annotations.BeforeClass)

Example 52 with DateTimeUpdaterRemoteTestingService

use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.

the class CenterMeetingTest method setTime.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
private void setTime(DateTime time) throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    dateTimeUpdaterRemoteTestingService.setDateTime(time);
}
Also used : DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)

Example 53 with DateTimeUpdaterRemoteTestingService

use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.

the class LoanImportTest method logOut.

@AfterMethod
public void logOut() {
    (new MifosPage(selenium)).logout();
    new DateTimeUpdaterRemoteTestingService(selenium).resetDateTime();
}
Also used : MifosPage(org.mifos.test.acceptance.framework.MifosPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) AfterMethod(org.testng.annotations.AfterMethod)

Example 54 with DateTimeUpdaterRemoteTestingService

use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.

the class MonthClosingTest method testDisbursalBeforeMonthClosingDate.

@Test(enabled = true)
public void testDisbursalBeforeMonthClosingDate() throws UnsupportedEncodingException {
    // When
    new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(new DateTime(2012, 1, 10, 12, 0, 0, 0));
    navigationHelper.navigateToAdminPage().navigateToMonthClosing().fillMonthClosingDate("20/01/12").submit().verifyCurrentMonthClosingDate("20/01/12");
    // Then
    DefineNewLoanProductPage.SubmitFormParameters formParameters = FormParametersHelper.getWeeklyLoanProductParameters();
    loanProductTestHelper.navigateToDefineNewLoanPageAndFillMandatoryFields(formParameters).submitAndGotoNewLoanProductPreviewPage().submit();
    loanTestHelper.createLoanAccount("WeeklyClient Monday", formParameters.getOfferingName()).changeAccountStatusToAccepted().navigateToDisburseLoan().submitAndNavigateToDisburseLoanConfirmationPage(DisburseLoanParameters.getDisbursalParameters("10", "01", "2012")).submitButDisbursalFailed("Date of transaction is invalid. This date has already been closed for accounting.");
}
Also used : DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 55 with DateTimeUpdaterRemoteTestingService

use of org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService in project head by mifos.

the class ClientTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    propertiesHelper = new CustomPropertiesHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    groupTestHelper = new GroupTestHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    savingsProductHelper = new SavingsProductHelper(selenium);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    targetTime = new DateTime(2009, 7, 11, 12, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    feeTestHelper = new FeeTestHelper(dataSetup, navigationHelper);
    loanTestHelper = new LoanTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) SavingsProductHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)103 DateTime (org.joda.time.DateTime)81 BeforeMethod (org.testng.annotations.BeforeMethod)41 Test (org.testng.annotations.Test)22 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)21 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)20 CreateLoanAccountSearchParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters)19 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)16 DisburseLoanParameters (org.mifos.test.acceptance.framework.loan.DisburseLoanParameters)10 CreateLoanAccountSubmitParameters (org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters)9 SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)9 MifosPage (org.mifos.test.acceptance.framework.MifosPage)8 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)8 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)8 AfterMethod (org.testng.annotations.AfterMethod)8 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)7 EditAccountStatusParameters (org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)6 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)6 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)6 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)5