use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class CreateSavingsAccountTest method verifySavingsAccountCreationWithQG.
private void verifySavingsAccountCreationWithQG(CreateSavingsAccountSearchParameters searchParameters, CreateSavingsAccountSubmitParameters submitAccountParameters) {
SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccountWithQG(searchParameters, submitAccountParameters);
savingsAccountPage.verifyPage();
savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class SavingsDepositTest method makeDepositToClientSavingsAccount.
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void makeDepositToClientSavingsAccount() throws Exception {
initData();
DepositWithdrawalSavingsParameters params = new DepositWithdrawalSavingsParameters();
params.setTrxnDateMM("09");
params.setTrxnDateDD("09");
params.setTrxnDateYYYY("2009");
params.setAmount("543.2");
params.setPaymentType(DepositWithdrawalSavingsParameters.CASH);
params.setTrxnType(DepositWithdrawalSavingsParameters.DEPOSIT);
params.setReceiptDateDD("09");
params.setReceiptDateMM("09");
params.setReceiptDateYYYY("2009");
SavingsAccountDetailPage accountDetailPage = savingsAccountHelper.makeDepositOrWithdrawalOnSavingsAccount("000100000000036", params);
String[] tablesToRetrieve = { "SAVINGS_ACTIVITY_DETAILS", "SAVINGS_ACCOUNT", "SAVINGS_PERFORMANCE", "SAVINGS_TRXN_DETAIL" };
String[] tablesToValidate = { "SAVINGS_ACTIVITY_DETAILS", "SAVINGS_ACCOUNT", "SAVINGS_PERFORMANCE" };
IDataSet expectedDataSet = dbUnitUtilities.getDataSetFromDataSetDirectoryFile("SavingsDeposit_001_result_dbunit.xml");
IDataSet databaseDataSet = dbUnitUtilities.getDataSetForTables(dataSource, tablesToRetrieve);
dbUnitUtilities.verifyTables(tablesToValidate, databaseDataSet, expectedDataSet);
// verify savings transaction table with sorting
String[] orderSavingsTrxnByColumns = new String[] { "deposit_amount" };
dbUnitUtilities.verifyTableWithSort(orderSavingsTrxnByColumns, SavingsDepositTest.SAVINGS_TRXN_DETAIL, expectedDataSet, databaseDataSet);
// verify transaction history table
TransactionHistoryPage historyPage = accountDetailPage.navigateToTransactionHistoryPage();
historyPage.verifyTableTypeAfterDeposit(2);
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class AdditionalSavingsAccountTest method createSavingAccountWithCreatedProduct.
private SavingsAccountDetailPage createSavingAccountWithCreatedProduct(String client, String productName, String amount) {
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString(client);
searchParameters.setSavingsProduct(productName);
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount(amount);
SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccount(searchParameters, submitAccountParameters);
savingsAccountPage.verifyPage();
savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
return savingsAccountPage;
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class AdditionalSavingsAccountTest method createSavingsAccount.
private String createSavingsAccount(SavingsProductParameters params) {
DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
confirmationPage.navigateToSavingsProductDetails();
SavingsAccountDetailPage savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233266299995 Client1233266299995", params.getProductInstanceName(), "100000.0");
String savingsId = savingsAccountDetailPage.getAccountId();
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("change status to active");
savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
return savingsId;
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class AdditionalSavingsAccountTest method savingsAccountWith3monthInterestVoluntaryDeposits.
//http://mifosforge.jira.com/browse/MIFOSTEST-141
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void savingsAccountWith3monthInterestVoluntaryDeposits() throws Exception {
//Given
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 2, 15, 13, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_008_dbunit.xml", dataSource, selenium);
//When
SavingsProductParameters params = savingsProductHelper.getVoluntaryClients3MonthCalculactionPostingProductParameters(targetTime);
DefineNewSavingsProductConfirmationPage confirmationPage = savingsProductHelper.createSavingsProduct(params);
confirmationPage.navigateToSavingsProductDetails();
SavingsAccountDetailPage savingsAccountDetailPage = createSavingAccountWithCreatedProduct("Stu1233266079799 Client1233266079799", params.getProductInstanceName(), "100000.0");
String savingsId = savingsAccountDetailPage.getAccountId();
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("change status to active");
savingsAccountHelper.changeStatus(savingsId, editAccountStatusParameters);
DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
depositParams = makeDefaultDepositWithdrawal(targetTime, depositParams, savingsId, DepositWithdrawalSavingsParameters.DEPOSIT, "100000.0");
//Then
targetTime = new DateTime(2011, 5, 15, 22, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "602.7");
targetTime = new DateTime(2011, 9, 1, 22, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
navigationHelper.navigateToAdminPage();
runBatchJobsForSavingsIntPosting();
navigationHelper.navigateToSavingsAccountDetailPage(savingsId);
Assert.assertEquals(selenium.getTable("recentActivityForDetailPage.1.2"), "1,254.1");
}
Aggregations