Search in sources :

Example 11 with SavingsAccountDetailPage

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;
}
Also used : AccountPreviewNotesPage(org.mifos.test.acceptance.framework.loan.AccountPreviewNotesPage) AccountAddNotesPage(org.mifos.test.acceptance.framework.loan.AccountAddNotesPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)

Example 12 with 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;
}
Also used : SearchResultsPage(org.mifos.test.acceptance.framework.search.SearchResultsPage) HomePage(org.mifos.test.acceptance.framework.HomePage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)

Example 13 with 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);
}
Also used : SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)

Example 14 with SavingsAccountDetailPage

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());
}
Also used : ManageRolePage(org.mifos.test.acceptance.framework.admin.ManageRolePage) SavingFundTransferEnterDetailsPage(org.mifos.test.acceptance.framework.savings.SavingFundTransferEnterDetailsPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) FundsParameters(org.mifos.test.acceptance.framework.savings.FundsParameters) Test(org.testng.annotations.Test)

Example 15 with SavingsAccountDetailPage

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");
}
Also used : ManageRolePage(org.mifos.test.acceptance.framework.admin.ManageRolePage) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) TransactionHistoryPage(org.mifos.test.acceptance.framework.loan.TransactionHistoryPage) ViewRolesPage(org.mifos.test.acceptance.framework.admin.ViewRolesPage) ViewRepaymentSchedulePage(org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage) ImportTransactionsConfirmationPage(org.mifos.test.acceptance.framework.admin.ImportTransactionsConfirmationPage) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) ImportTransactionsPage(org.mifos.test.acceptance.framework.admin.ImportTransactionsPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) Test(org.testng.annotations.Test)

Aggregations

SavingsAccountDetailPage (org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage)36 DepositWithdrawalSavingsParameters (org.mifos.test.acceptance.framework.savings.DepositWithdrawalSavingsParameters)10 Test (org.testng.annotations.Test)10 DateTime (org.joda.time.DateTime)9 CreateSavingsAccountSearchParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters)9 CreateSavingsAccountSubmitParameters (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters)9 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)9 EditAccountStatusParameters (org.mifos.test.acceptance.framework.account.EditAccountStatusParameters)8 DefineNewSavingsProductConfirmationPage (org.mifos.test.acceptance.framework.savingsproduct.DefineNewSavingsProductConfirmationPage)5 SavingsProductParameters (org.mifos.test.acceptance.framework.savingsproduct.SavingsProductParameters)5 CreateSavingsAccountConfirmationPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountConfirmationPage)4 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)3 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)3 CreateSavingsAccountEntryPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountEntryPage)3 CreateSavingsAccountSearchPage (org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchPage)3 ImportTransactionsConfirmationPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsConfirmationPage)2 ImportTransactionsPage (org.mifos.test.acceptance.framework.admin.ImportTransactionsPage)2 ManageRolePage (org.mifos.test.acceptance.framework.admin.ManageRolePage)2 TransactionHistoryPage (org.mifos.test.acceptance.framework.loan.TransactionHistoryPage)2 ViewRepaymentSchedulePage (org.mifos.test.acceptance.framework.loan.ViewRepaymentSchedulePage)2