use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class SavingsAccountHelper method addNoteToSavingsAccount.
public SavingsAccountDetailPage addNoteToSavingsAccount(String testAccount, String testAccountNote) {
NavigationHelper helper = new NavigationHelper(selenium);
SavingsAccountDetailPage savingsAccountDetailPage = helper.navigateToSavingsAccountDetailPage(testAccount);
savingsAccountDetailPage.verifyPage();
AccountAddNotesPage addNotesPage = savingsAccountDetailPage.navigateToAddNotesPage();
addNotesPage.verifyPage();
AccountPreviewNotesPage previewPage = addNotesPage.submitAndNavigateToAccountAddNotesPreviewPage(testAccountNote);
previewPage.verifyPage();
savingsAccountDetailPage = previewPage.submitAndNavigateToSavingsAccountDetailPage();
return savingsAccountDetailPage;
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class NavigationHelper method navigateToSavingsAccountDetailPage.
public SavingsAccountDetailPage navigateToSavingsAccountDetailPage(String savingsAccountID) {
HomePage homePage = navigateToHomePage();
SearchResultsPage searchResultsPage = homePage.search(savingsAccountID);
searchResultsPage.verifyPage();
SavingsAccountDetailPage savingsAccountDetailPage = searchResultsPage.navigateToSavingsAccountDetailPage(savingsAccountID);
savingsAccountDetailPage.verifyPage();
return savingsAccountDetailPage;
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class SavingsPaymentTest method verifySavingsAccount.
private void verifySavingsAccount(String savingsGlobalNum, String expectedBalance) {
SavingsAccountDetailPage savingsPage = navigationHelper.navigateToSavingsAccountDetailPage(savingsGlobalNum);
savingsPage.verifySavingsAmount(expectedBalance);
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class SavingsPaymentTest method verifyAbilityToTransferFundsFromOneSavingAccountToAnotherSavingAccount.
@Test(enabled = true)
public //https://mifosforge.jira.com/browse/MIFOSTEST-1189
void verifyAbilityToTransferFundsFromOneSavingAccountToAnotherSavingAccount() {
// Given
String TRANSFER_AMOUNT = "50";
String senderSavingsAccountId = savingsTestHelper.createAndActivateSavingAccountWithDefaultAmountOfDeposit("Stu12332659912419 Client12332659912419").getAccountId();
String receiverSavingsAccountId = savingsTestHelper.createAndActivateSavingAccountWithDefaultAmountOfDeposit("Stu1233266299995 Client1233266299995").getAccountId();
ManageRolePage manageRolePage = new ManageRolePage(selenium);
manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
// When
if (manageRolePage.isPermissionEnable("6_15")) {
manageRolePage.disablePermission("6_15").submitAndGotoViewRolesPage();
}
//Then
SavingsAccountDetailPage savingAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(senderSavingsAccountId);
savingAccountDetailPage.navigateToApplyTransferPage().verifyIsAccessDeniedMessageDisplayed();
//When
manageRolePage = navigationHelper.navigateToAdminPage().navigateToViewRolesPage().navigateToManageRolePage("Admin");
if (!manageRolePage.isPermissionEnable("6_15")) {
manageRolePage.enablePermission("6_15").submitAndGotoViewRolesPage();
}
//Then
savingAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(senderSavingsAccountId);
SavingFundTransferEnterDetailsPage savingFundTransferEnterDetailPage = savingAccountDetailPage.navigateToApplyTransferPaymentPage("Stu1233266299995 Client1233266299995", receiverSavingsAccountId);
FundsParameters params = new FundsParameters();
params.setTransactionDateDD("1c");
params.setTransactionDateMM("03");
params.setTransactionDateYYYY("2011");
savingFundTransferEnterDetailPage.submitWithWrongParams(params, "Date of transaction was invalid. Please enter a valid date.");
params.setTransactionDateDD("13");
savingFundTransferEnterDetailPage.submitWithWrongParams(params, "Please specify Amount.");
params.setAmount(TRANSFER_AMOUNT);
savingFundTransferEnterDetailPage.submitAndNavigateToSavingFundPreviewPage(params).submitAndNavigateToSavingDetailPage();
//Then
Assert.assertEquals("50", savingAccountDetailPage.getAccountBallance());
savingAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage(receiverSavingsAccountId);
Assert.assertEquals("150", savingAccountDetailPage.getAccountBallance());
}
use of org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage in project head by mifos.
the class MpesaImportTest method importTransactionsFromFileWithNoErrors.
/**
* MPESA - Import transactions from file with no errors
* http://mifosforge.jira.com/browse/MIFOSTEST-688
* @throws Exception
*/
@SuppressWarnings({ "PMD.SignatureDeclareThrowsException", "PMD.SystemPrintln" })
@Test(enabled = true)
public void importTransactionsFromFileWithNoErrors() throws Exception {
DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
DateTime targetTime = new DateTime(2011, 01, 28, 12, 0, 0, 0);
dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
AdminPage adminPage = navigationHelper.navigateToAdminPage();
ViewRolesPage viewRolesPage = adminPage.navigateToViewRolesPage();
ManageRolePage manageRolePage = viewRolesPage.navigateToManageRolePage("Admin");
manageRolePage.disablePermission("8_3");
viewRolesPage = manageRolePage.submitAndGotoViewRolesPage();
adminPage = viewRolesPage.navigateToAdminPage();
adminPage = adminPage.failNavigationToImportTransactionsPage();
adminPage.verifyError("You do not have permissions to perform " + "this activity. Contact your system administrator " + "to grant you the required permissions and try again.");
viewRolesPage = adminPage.navigateToViewRolesPage();
manageRolePage = viewRolesPage.navigateToManageRolePage("Admin");
manageRolePage.enablePermission("8_3");
viewRolesPage = manageRolePage.submitAndGotoViewRolesPage();
propertiesHelper.setImportTransactionOrder("AL3,AL5");
String dataset = "mpesa_export_dbunit.xml";
initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, dataset, dataSource, selenium);
String path = this.getClass().getResource("/mpesa/" + FILE_WITH_NO_ERRORS).toString();
ImportTransactionsPage importTransactionsPage = importTransaction(path);
checkIfOutputMatchesExpected(path);
importTransactionsPage.cancelImportTransaction();
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000013");
loanAccountPage.verifyStatus(LoanAccountPage.ACTIVE);
loanAccountPage.verifyExactLoanAmount("2,000");
SavingsAccountDetailPage savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage("000100000000015");
savingsAccountDetailPage.verifySavingsAmount("0");
adminPage = navigationHelper.navigateToAdminPage();
importTransactionsPage = adminPage.navigateToImportTransactionsPage();
ImportTransactionsConfirmationPage importTransactionsConfirmationPage = importTransactionsPage.importTransactions(path, EXCEL_IMPORT_TYPE);
importTransactionsConfirmationPage.verifyImportSuccess("You have successfully imported transactions.");
loanAccountPage = navigationHelper.navigateToLoanAccountPage("000100000000013");
loanAccountPage.verifyStatus(LoanAccountPage.CLOSED);
ViewRepaymentSchedulePage viewRepaymentSchedulePage = loanAccountPage.navigateToRepaymentSchedulePage();
viewRepaymentSchedulePage.verifyFirstInstallmentDate(5, 3, "28-Jan-2011");
loanAccountPage = viewRepaymentSchedulePage.navigateToLoanAccountPage();
loanAccountPage.verifyPerformanceHistory("11", "11");
TransactionHistoryPage transactionHistoryPage = loanAccountPage.navigateToTransactionHistoryPage();
transactionHistoryPage.verifyTransactionHistory(2013, 2, 48);
transactionHistoryPage.verifyPostedBy("mifos", 48);
savingsAccountDetailPage = navigationHelper.navigateToSavingsAccountDetailPage("000100000000015");
savingsAccountDetailPage.verifySavingsAmount("3170.0");
savingsAccountDetailPage.verifyDate("28/01/2011");
}
Aggregations