Search in sources :

Example 76 with DateTimeUpdaterRemoteTestingService

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

the class CollectionSheetEntryTest 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 77 with DateTimeUpdaterRemoteTestingService

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

the class ClientLoanTransactionHistoryTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    systemDateTime = new DateTime(2011, 3, 4, 12, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(systemDateTime);
    loanTestHelper = new LoanTestHelper(selenium);
}
Also used : 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)

Example 78 with DateTimeUpdaterRemoteTestingService

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

the class CreateClientLoanAccountTest method createLoanAccountsWithRestrictedProductsMix.

/**
     * Verify a user is prevented to create loan accounts of loan products restricted by the mix.
     * http://mifosforge.jira.com/browse/MIFOSTEST-94
     *
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void createLoanAccountsWithRestrictedProductsMix() throws Exception {
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 1, 24, 15, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    DefineNewLoanProductPage.SubmitFormParameters productParams = FormParametersHelper.getWeeklyLoanProductParameters();
    productParams.setOfferingName("product94");
    productParams.setOfferingShortName("p94");
    productParams.setDefaultInterestRate("15.3");
    productParams.setMaxInterestRate("50");
    productParams.setInterestTypes(SubmitFormParameters.DECLINING_BALANCE);
    productParams.setDefaultLoanAmount("13333");
    productParams.setDefInstallments("13");
    productParams.setApplicableFor(DefineNewLoanProductPage.SubmitFormParameters.GROUPS);
    loanProductTestHelper.defineNewLoanProduct(productParams);
    productParams.setOfferingName("product94B");
    productParams.setOfferingShortName("p94b");
    loanProductTestHelper.defineNewLoanProduct(productParams);
    CreateLoanAccountSearchParameters searchParams1 = new CreateLoanAccountSearchParameters();
    searchParams1.setSearchString("GroupWeekly");
    searchParams1.setLoanProduct("product94");
    CreateLoanAccountSearchParameters searchParams2 = new CreateLoanAccountSearchParameters();
    searchParams2.setSearchString("GroupWeekly");
    searchParams2.setLoanProduct("product94B");
    DisburseLoanParameters disburseParams = new DisburseLoanParameters();
    disburseParams.setPaymentType(DisburseLoanParameters.CASH);
    disburseParams.setDisbursalDateDD("24");
    disburseParams.setDisbursalDateMM("01");
    disburseParams.setDisbursalDateYYYY("2011");
    String error = "The loan could not be disbursed as " + searchParams1.getLoanProduct() + " and " + searchParams2.getLoanProduct() + " are not allowed to co-exist";
    LoanAccountPage loanAccountPage = loanTestHelper.createTwoLoanAccountsWithMixedRestricedPoducts(searchParams1, searchParams2, disburseParams, new DateTime(2011, 02, 28, 10, 0, 0, 0));
    loanAccountPage.verifyError(error);
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 79 with DateTimeUpdaterRemoteTestingService

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

the class CreateClientLoanAccountTest method newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-308
@Test(enabled = true)
public void newMonthlyClientLoanAccountWithMeetingOnSpecificDayOfMonth() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Client - Mary Monthly");
    searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1234.0");
    submitAccountParameters.setGracePeriodTypeNone(true);
    //Then
    String loanId = createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
    getLoanStatusActive(loanId);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Example 80 with DateTimeUpdaterRemoteTestingService

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

the class CreateClientLoanAccountTest method newLoanAccountWithThousandSeparator.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void newLoanAccountWithThousandSeparator() throws Exception {
    //Given
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 2, 1, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("Client - Mary Monthly");
    searchParameters.setLoanProduct("MonthlyClientFlatLoan1stOfMonth");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1,234.0");
    submitAccountParameters.setGracePeriodTypeNone(true);
    //Then
    createLoanAndCheckAmount(searchParameters, submitAccountParameters, null);
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

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