use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class CreateSavingsAccountTest method verifyPaymentTypesForWithdrawalsAndDeposits.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@Test(singleThreaded = true, groups = { "savings", "acceptance", "ui", "no_db_unit" })
public void verifyPaymentTypesForWithdrawalsAndDeposits() throws Exception {
//When
NavigationHelper navigationHelper = new NavigationHelper(selenium);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsWithdrawalsType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsWithdrawalsType(defineAcceptedPaymentTypesPage.VOUCHER);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsDepositsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
adminPage = navigationHelper.navigateToAdminPage();
defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
defineAcceptedPaymentTypesPage.addSavingsDepositsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString("Client - Mary Monthly");
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("248.0");
SavingsAccountDetailPage savingsAccountDetailPage = savingsAccountHelper.createSavingsAccountWithQG(searchParameters, submitAccountParameters);
EditAccountStatusParameters editAccountStatusParameters = new EditAccountStatusParameters();
editAccountStatusParameters.setAccountStatus(AccountStatus.SAVINGS_ACTIVE);
editAccountStatusParameters.setNote("test");
savingsAccountDetailPage = savingsAccountHelper.changeStatus(savingsAccountDetailPage.getAccountId(), editAccountStatusParameters);
SavingsDepositWithdrawalPage savingsDepositWithdrawalPage = savingsAccountDetailPage.navigateToDepositWithdrawalPage();
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.DEPOSIT);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
//When
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.WITHDRAWAL);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
//When
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage("000100000000002");
savingsDepositWithdrawalPage = savingsAccountDetailPage.navigateToDepositWithdrawalPage();
savingsDepositWithdrawalPage.selectPaymentType(DepositWithdrawalSavingsParameters.DEPOSIT);
//Then
savingsDepositWithdrawalPage.verifyModeOfPayments();
}
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;
}
Aggregations