use of org.mifos.test.acceptance.framework.savings.SavingsDepositWithdrawalPage in project head by mifos.
the class SavingsAccountHelper method makeDepositOrWithdrawalOnSavingsAccount.
public SavingsAccountDetailPage makeDepositOrWithdrawalOnSavingsAccount(String savingsAccountID, DepositWithdrawalSavingsParameters params) {
NavigationHelper helper = new NavigationHelper(selenium);
SavingsAccountDetailPage savingsAccountDetailPage = helper.navigateToSavingsAccountDetailPage(savingsAccountID);
savingsAccountDetailPage.verifyPage();
SavingsDepositWithdrawalPage savingsDepositWithdrawalPage = savingsAccountDetailPage.navigateToDepositWithdrawalPage();
savingsDepositWithdrawalPage.verifyPage();
SavingsDepositWithdrawalConfirmationPage savingsDepositWithdrawalConfirmationPage = savingsDepositWithdrawalPage.submitAndNavigateToDepositWithdrawalConfirmationPage(params);
savingsDepositWithdrawalConfirmationPage.verifyPage();
savingsAccountDetailPage = savingsDepositWithdrawalConfirmationPage.submitAndNavigateToSavingsAccountDetailPage();
return savingsAccountDetailPage;
}
use of org.mifos.test.acceptance.framework.savings.SavingsDepositWithdrawalPage 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();
}
Aggregations