Search in sources :

Example 61 with NavigationHelper

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

the class EditLoanAccountTest method editLoanAccount.

private LoanAccountPage editLoanAccount(String accountID, EditLoanAccountInformationParameters params) {
    NavigationHelper helper = new NavigationHelper(selenium);
    LoanAccountPage loanAccountPage = helper.navigateToLoanAccountPage(accountID);
    EditLoanAccountInformationPage editAccountInformationPage = loanAccountPage.navigateToEditAccountInformation();
    editAccountInformationPage.editExternalID(params);
    EditPreviewLoanAccountPage editPreviewLoanAccountPage = editAccountInformationPage.submitAndNavigateToAccountInformationPreviewPage();
    loanAccountPage = editPreviewLoanAccountPage.submitAndNavigateToLoanAccountPage();
    return loanAccountPage;
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) EditLoanAccountInformationPage(org.mifos.test.acceptance.framework.loan.EditLoanAccountInformationPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) EditPreviewLoanAccountPage(org.mifos.test.acceptance.framework.loan.EditPreviewLoanAccountPage)

Example 62 with NavigationHelper

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

the class FeeTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 7, 11, 12, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
    dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    loanTestHelper = new LoanTestHelper(selenium);
    feeTestHelper = new FeeTestHelper(dataSetup, new NavigationHelper(selenium));
    navigationHelper = new NavigationHelper(selenium);
    loanProductTestHelper = new LoanProductTestHelper(selenium);
}
Also used : TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 63 with NavigationHelper

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

the class LoanAccountAddNoteTest method addNoteToAccount.

private LoanAccountPage addNoteToAccount() {
    NavigationHelper helper = new NavigationHelper(selenium);
    LoanAccountPage loanAccountPage = helper.navigateToLoanAccountPage(TEST_ACCOUNT);
    AccountAddNotesPage addNotesPage = loanAccountPage.navigateToAddNotesPage();
    addNotesPage.verifyPage();
    AccountPreviewNotesPage previewPage = addNotesPage.submitAndNavigateToAccountAddNotesPreviewPage(TEST_ACCOUNT_NOTE);
    previewPage.verifyPage();
    loanAccountPage = previewPage.submitAndNavigateToLoanAccountPage();
    return loanAccountPage;
}
Also used : AccountPreviewNotesPage(org.mifos.test.acceptance.framework.loan.AccountPreviewNotesPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) AccountAddNotesPage(org.mifos.test.acceptance.framework.loan.AccountAddNotesPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage)

Example 64 with NavigationHelper

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

the class ClientLoanDisbursalTest method verifyAcceptedPaymentTypesForDisbursementsOfLoan.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public // http://mifosforge.jira.com/browse/MIFOSTEST-249
void verifyAcceptedPaymentTypesForDisbursementsOfLoan() throws Exception, InterruptedException {
    // When
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineAcceptedPaymentTypesPage defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
    defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.CHEQUE);
    adminPage = navigationHelper.navigateToAdminPage();
    defineAcceptedPaymentTypesPage = adminPage.navigateToDefineAcceptedPaymentType();
    defineAcceptedPaymentTypesPage.addLoanDisbursementsPaymentType(defineAcceptedPaymentTypesPage.VOUCHER);
    LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
    CreateLoanAccountSearchParameters searchParams = new CreateLoanAccountSearchParameters();
    searchParams.setLoanProduct("WeeklyFlatLoanWithOneTimeFees");
    searchParams.setSearchString("Stu1233266063395 Client1233266063395");
    //Extension https://mifosforge.jira.com/browse/MIFOSTEST-1194
    LoanAccountPage loanAccountPage = loanTestHelper.createAndActivateDefaultLoanAccount(searchParams);
    DisburseLoanPage disburseLoanPage = loanAccountPage.navigateToDisburseLoan();
    DisburseLoanParameters params = new DisburseLoanParameters();
    params.setDisbursalDateDD("20");
    params.setDisbursalDateMM("03");
    params.setDisbursalDateYYYY("2011");
    params.setPaymentType(params.CASH);
    disburseLoanPage.verifyDisbursalDateIsFutureDate(params);
    //disburseLoanPage.submitWithWrongParams(params, "Date of transaction can not be a future date");
    params.setDisbursalDateDD("01");
    params.setDisbursalDateMM("03");
    params.setDisbursalDateYYYY("2011");
    disburseLoanPage.verifyDisbursalDateIsPriorToClientMeetingSchedule(params);
    params.setDisbursalDateDD("04");
    params.setDisbursalDateMM("03");
    params.setDisbursalDateYYYY("2011");
    //Then
    disburseLoanPage.verifyModeOfPayments();
    disburseLoanPage.submitAndNavigateToDisburseLoanConfirmationPage(params).submitAndNavigateToLoanAccountPage();
    String[] locators = { "Payment rcvd.", "accountActivityTable.2.1" };
    loanAccountPage.navigateToViewLoanAccountActivityPage().verifyAllElementsArePresent(locators);
    //When
    disburseLoanPage = navigationHelper.navigateToLoanAccountPage("000100000000020").navigateToDisburseLoan();
    //Then
    disburseLoanPage.verifyModeOfPayments();
    disburseLoanPage.verifyPaymentModesOfPaymentAreEmpty();
    disburseLoanPage.verifyPaymentModeOfPaymentIsEditable("payment mode of payment must be editable when a disbursal fee exists.");
}
Also used : DisburseLoanParameters(org.mifos.test.acceptance.framework.loan.DisburseLoanParameters) CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DisburseLoanPage(org.mifos.test.acceptance.framework.loan.DisburseLoanPage) DefineAcceptedPaymentTypesPage(org.mifos.test.acceptance.framework.admin.DefineAcceptedPaymentTypesPage) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)

Example 65 with NavigationHelper

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

the class PenaltyTest method applyAndWaivePenaltyOnDisbursedLoan.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void applyAndWaivePenaltyOnDisbursedLoan() throws Exception {
    String accountId = "000100000000039";
    ChargeParameters feeParameters = new ChargeParameters();
    feeParameters.setAmount("15");
    feeParameters.setType(ChargeParameters.MISC_PENALTY);
    LoanAccountPage loanAccountPage = loanTestHelper.applyCharge(accountId, feeParameters);
    verifySummaryAndActivity(loanAccountPage, "15", "15", "Misc penalty applied", 2);
    loanTestHelper.waivePenalty(accountId);
    loanAccountPage = new NavigationHelper(selenium).navigateToLoanAccountPage(accountId);
    verifySummaryAndActivity(loanAccountPage, "15", "0", "Penalty waived", 2);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanAccountPage(org.mifos.test.acceptance.framework.loan.LoanAccountPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters)

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