use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class SavingsPaymentTest method makePaymentFromSavings.
private LoanAccountPage makePaymentFromSavings(String loanGlobalNum, String savingsGlobalNum, int amount) {
CreateLoanAccountSearchParameters loanSearchParams = new CreateLoanAccountSearchParameters();
loanSearchParams.setSearchString(loanGlobalNum);
LoanAccountPage loanAccountPage = navigationHelper.navigateToLoanAccountPage(loanGlobalNum);
ApplyPaymentPage applyPaymentPage = loanAccountPage.navigateToApplyPayment();
PaymentParameters paymentParams = new PaymentParameters();
paymentParams.setAmount(String.valueOf(amount));
paymentParams.setPaymentType(PaymentParameters.TRANSFER);
paymentParams.setSavingsAccountGlobalNum(savingsGlobalNum);
paymentParams.setTransactionDateDD("13");
paymentParams.setTransactionDateMM("03");
paymentParams.setTransactionDateYYYY("2011");
paymentParams.setSavingsAccountBalance(String.valueOf(SAVINGS_START_BALANCE));
paymentParams.setSavingsAccountMaxWithdrawalAmount(String.valueOf(0));
paymentParams.setSavingsAccountType("Voluntary");
paymentParams.setSavingsAccountName("MonthlyClientSavingsAccount");
ApplyPaymentConfirmationPage paymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(paymentParams);
return paymentConfirmationPage.submitAndNavigateToLoanAccountDetailsPage();
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanRepayTest method verifyAccountActivity.
private void verifyAccountActivity() {
LoanAccountPage accountPage = navigationHelper.navigateToLoanAccountPage(loanId);
AccountActivityPage accountActivityPage = accountPage.navigateToAccountActivityPage();
Assert.assertEquals(accountActivityPage.getLastPrinciplePaid(2), "1,000");
Assert.assertEquals(accountActivityPage.getLastInterestPaid(2), "4.6");
Assert.assertEquals(accountActivityPage.getLastFeePaid(2).trim(), "10");
Assert.assertEquals(accountActivityPage.getLastPenalty(2), "5");
Assert.assertEquals(accountActivityPage.getLastTotalPaid(2), "1,019.6");
Assert.assertEquals(accountActivityPage.getRunningPrinciple(2), "0");
Assert.assertEquals(accountActivityPage.getRunningInterest(2), "0");
Assert.assertEquals(accountActivityPage.getRunningFees(2), "0");
Assert.assertEquals(accountActivityPage.getRunningTotal(2), "0");
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanRepayTest method verifyRepaymentSchedule.
private void verifyRepaymentSchedule() {
LoanAccountPage accountPage = navigationHelper.navigateToLoanAccountPage(loanId);
accountPage.navigateToRepaymentSchedulePage();
Assert.assertEquals(selenium.getTable("repaymentScheduleTable.3.4").trim(), "4.6");
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage in project head by mifos.
the class LoanRepayTest method verifyLoanStateAndAccountSummary.
private void verifyLoanStateAndAccountSummary() {
LoanAccountPage accountPage = navigationHelper.navigateToLoanAccountPage(loanId);
Assert.assertTrue(selenium.isTextPresent("Closed- Obligation met"));
Assert.assertEquals(accountPage.getOriginalLoanAmount(), "1,000");
Assert.assertEquals(accountPage.getPrinciplePaid(), "1,000");
Assert.assertEquals(accountPage.getPrincipleBalance(), "0");
Assert.assertEquals(accountPage.getOriginalInterestAmount(), "4.6");
Assert.assertEquals(accountPage.getInterestPaid(), "4.6");
Assert.assertEquals(accountPage.getInterestBalance(), "0");
Assert.assertEquals(accountPage.getOriginalFeesAmount(), "10");
Assert.assertEquals(accountPage.getFeesPaid(), "10");
Assert.assertEquals(accountPage.getFeesBalance(), "0");
Assert.assertEquals(accountPage.getOriginalPenaltyAmount(), "5");
Assert.assertEquals(accountPage.getPenaltyPaid(), "5");
Assert.assertEquals(accountPage.getPenaltyBalance(), "0");
Assert.assertEquals(accountPage.getOriginalTotalAmount(), "1,019.6");
Assert.assertEquals(accountPage.getTotalPaid(), "1,019.6");
Assert.assertEquals(accountPage.getTotalBalance(), "0");
}
use of org.mifos.test.acceptance.framework.loan.LoanAccountPage 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