Search in sources :

Example 66 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class CreateMultipleLoanAccountTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    officeHelper = new OfficeHelper(selenium);
    userHelper = new UserHelper(selenium);
    centerTestHelper = new CenterTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    loanProductTestHelper = new LoanProductTestHelper(selenium);
}
Also used : OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) UserHelper(org.mifos.test.acceptance.framework.testhelpers.UserHelper) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) CenterTestHelper(org.mifos.test.acceptance.framework.testhelpers.CenterTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 67 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class PenaltyTest method canRemoveAutomaticPenaltyAfterPaymentHasBeenMade.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void canRemoveAutomaticPenaltyAfterPaymentHasBeenMade() throws Exception {
    LoanAccountPage loanAccountPage = prepareLoanForPenaltyTest();
    String accountId = loanAccountPage.getAccountId();
    PenaltyHelper penaltyHelper = new PenaltyHelper(selenium);
    String penaltyName = "Penalty_" + StringUtil.getRandomString(6);
    penaltyHelper.createRatePenalty(penaltyName, PenaltyFormParameters.PERIOD_NONE, "", PenaltyFormParameters.FREQUENCY_MONTHLY, "33.3", PenaltyFormParameters.FORMULA_OVERDUE_AMOUNT, "0", "9999999");
    ChargeParameters chargeParams = new ChargeParameters();
    chargeParams.setType(penaltyName);
    chargeParams.setAmount("");
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
    loanTestHelper.applyChargeUsingFeeLabel(accountId, chargeParams);
    new DateTimeUpdaterRemoteTestingService(selenium).setDateTime(new DateTime().plusYears(1));
    loanAccountPage = navigationHelper.navigateToLoanAccountPage(accountId);
    loanAccountPage = loanAccountPage.removePenalty(1);
    loanAccountPage.verifyNoPenaltyRemovalLinkExists(1);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) PenaltyHelper(org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime)

Example 68 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper 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();
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) CreateSavingsAccountSearchParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSearchParameters) SavingsAccountDetailPage(org.mifos.test.acceptance.framework.savings.SavingsAccountDetailPage) SavingsDepositWithdrawalPage(org.mifos.test.acceptance.framework.savings.SavingsDepositWithdrawalPage) CreateSavingsAccountSubmitParameters(org.mifos.test.acceptance.framework.savings.CreateSavingsAccountSubmitParameters) EditAccountStatusParameters(org.mifos.test.acceptance.framework.account.EditAccountStatusParameters) Test(org.testng.annotations.Test)

Example 69 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class TestDataSetup method createClient.

public void createClient(String clientName, String officeName, String loanOfficerName) throws SQLException {
    CreateClientEnterPersonalDataPage.SubmitFormParameters clientPersonalInfoParameters = defineClient(clientName);
    if (applicationDatabaseOperation.doesClientExist(clientName, officeName)) {
        return;
    }
    new NavigationHelper(selenium).navigateToHomePage().navigateToClientsAndAccountsUsingHeaderTab().navigateToCreateNewClientPage().navigateToCreateClientWithoutGroupPage().chooseOffice(officeName).create(clientPersonalInfoParameters).submitAndGotoCreateClientEnterMfiDataPage().submitAndGotoCreateClientPreviewDataPage(defineMfiData(loanOfficerName)).submit().navigateToClientViewDetailsPage().navigateToCustomerChangeStatusPage().setChangeStatusParametersAndSubmit(setApprovalStatus()).submitAndGotoClientViewDetailsPage().navigateToEditMeetingSchedule().editClientMeeting(setMeetingScheduleParameters());
}
Also used : CreateClientEnterPersonalDataPage(org.mifos.test.acceptance.framework.client.CreateClientEnterPersonalDataPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)

Example 70 with NavigationHelper

use of org.mifos.test.acceptance.framework.testhelpers.NavigationHelper in project head by mifos.

the class AttachSurveyLinkTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 7, 11, 14, 01, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    navigationHelper = new NavigationHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsActive(QG_FOR_VIEW_CLIENT_CENTRE_GROUP_LOAN);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)70 BeforeMethod (org.testng.annotations.BeforeMethod)42 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)23 DateTime (org.joda.time.DateTime)22 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)20 LoanProductTestHelper (org.mifos.test.acceptance.loanproduct.LoanProductTestHelper)13 TestDataSetup (org.mifos.test.acceptance.util.TestDataSetup)10 CustomPropertiesHelper (org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper)9 Test (org.testng.annotations.Test)9 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)6 AdminPage (org.mifos.test.acceptance.framework.admin.AdminPage)6 LoanAccountPage (org.mifos.test.acceptance.framework.loan.LoanAccountPage)6 SubmitFormParameters (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)6 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)6 DefineNewLoanProductPage (org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage)5 Random (java.util.Random)4 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)4 GroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper)4 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)4 DefineAcceptedPaymentTypesPage (org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage)3