use of org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters in project head by mifos.
the class UpdateCustomPropertiesTest method verifyPropertySavingsPendingApprovalStateEnabled.
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
//http://mifosforge.jira.com/browse/MIFOSTEST-216
@Test(enabled = true)
public void verifyPropertySavingsPendingApprovalStateEnabled() throws Exception {
//Given
propertiesHelper.setSavingsPendingApprovalStateEnabled("false");
//When
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString("UpdateCustomProperties TestClient");
searchParameters.setSavingsProduct("MandatorySavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("248.0");
SavingsAccountDetailPage savingsAccountPage = savingsAccountHelper.createSavingsAccountWithoutPendingApprovalState(searchParameters, submitAccountParameters);
savingsAccountPage.verifyPage();
//Then
savingsAccountPage.verifySavingsAmount(submitAccountParameters.getAmount());
savingsAccountPage.verifySavingsProduct(searchParameters.getSavingsProduct());
savingsAccountPage.verifyStatus("Active");
propertiesHelper.setSavingsPendingApprovalStateEnabled("true");
}
use of org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters in project head by mifos.
the class SavingsPaymentTest method setUpSavingsAccount.
private String setUpSavingsAccount() {
CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters();
searchParameters.setSearchString(CLIENT_GLOBAL_NUM);
searchParameters.setSavingsProduct("MonthlyClientSavingsAccount");
CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters();
submitAccountParameters.setAmount("100");
SavingsAccountDetailPage savingsPage = savingsTestHelper.createSavingsAccount(searchParameters, submitAccountParameters);
String savingsId = savingsPage.getAccountId();
savingsTestHelper.activateSavingsAccount(savingsId);
DepositWithdrawalSavingsParameters depositParams = new DepositWithdrawalSavingsParameters();
depositParams.setAmount(String.valueOf(SAVINGS_START_BALANCE));
depositParams.setPaymentType(DepositWithdrawalSavingsParameters.CASH);
depositParams.setTrxnType(DepositWithdrawalSavingsParameters.DEPOSIT);
savingsTestHelper.makeDepositOrWithdrawalOnSavingsAccount(savingsId, depositParams);
return savingsId;
}
use of org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters 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.CreateSavingsAccountSubmitParameters 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;
}
Aggregations