Search in sources :

Example 6 with SavingsAccountHelper

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

the class MpesaImportTest method failImportTransaction.

/**
     * MPESA - Import has expected errors due to invalid data
     * and overpayment amount and user is not able to continue
     * http://mifosforge.jira.com/browse/MIFOSTEST-692
     * @throws Exception
     */
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(enabled = true)
public void failImportTransaction() throws Exception {
    //Given
    String path = this.getClass().getResource("/mpesa/" + FILE_WITH_OVERPAYMENT_AMOUNT).toString();
    String dataset = "mpesa_export_dbunit.xml";
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, dataset, dataSource, selenium);
    propertiesHelper.setImportTransactionOrder("AL3,AL5");
    SavingsAccountHelper savingsAccountHelper = new SavingsAccountHelper(selenium);
    savingsAccountHelper.closeSavingsAccount("000100000000019", "Close account");
    //When
    ImportTransactionsPage importTransactionsPage = importTransaction(path);
    importTransactionsPage.checkErrors(new String[] { "Row <24> error - THY89933" + " - Last account is a loan account but the total paid in amount" + " is greater than the total due amount" });
    //Then
    LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000013");
    loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
    loanAccountPage.verifyExactLoanAmount("2,000");
    TransactionHistoryPage transactionHistoryPage = loanAccountPage.navigateToTransactionHistoryPage();
    transactionHistoryPage.verifyTransactionHistory(183, 1, 6);
}
Also used : SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) TransactionHistoryPage(org.mifos.test.acceptance.framework.loan.TransactionHistoryPage) ImportTransactionsPage(org.mifos.test.acceptance.framework.admin.ImportTransactionsPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) Test(org.testng.annotations.Test)

Example 7 with SavingsAccountHelper

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

the class UpdateCustomPropertiesTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    navigationHelper = new NavigationHelper(selenium);
    propertiesHelper = new CustomPropertiesHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    centerTestHelper = new CenterTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    super.setUp();
}
Also used : 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) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 8 with SavingsAccountHelper

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

the class CreateSavingsAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsActive("QGForCreateSavingsAccount");
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 9 with SavingsAccountHelper

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

the class SavingsAccountAddNoteTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 9, 9, 8, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
}
Also used : SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 10 with SavingsAccountHelper

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

the class SavingsAccountPerformanceHistoryTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 9, 9, 8, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
}
Also used : SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)11 BeforeMethod (org.testng.annotations.BeforeMethod)10 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)6 DateTime (org.joda.time.DateTime)4 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)4 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)3 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)3 SavingsProductHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsProductHelper)3 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)2 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)2 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)1 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)1 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)1 TransactionHistoryPage (org.mifos.test.acceptance.framework.loan.TransactionHistoryPage)1 CenterTestHelper (org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper)1 GroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper)1 TestDataSetup (org.mifos.test.acceptance.util.TestDataSetup)1 Test (org.testng.annotations.Test)1