Search in sources :

Example 51 with NavigationHelper

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

the class DefineNewLoanProductTest method createWeeklyLoanProductWithQuestionGroups.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createWeeklyLoanProductWithQuestionGroups() throws Exception {
    String questionGroupTitle = "QG1" + random.nextInt(100);
    String question1 = "DT_" + random.nextInt(100);
    String question2 = "SS_" + random.nextInt(100);
    questionGroupHelper.createQuestionGroup(questionGroupTitle, question1, question2, "Create Loan");
    SubmitFormParameters formParameters = FormParametersHelper.getWeeklyLoanProductParametersWithQuestionGroups(questionGroupTitle);
    new NavigationHelper(selenium).navigateToAdminPage().verifyPage().defineLoanProduct(formParameters);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)

Example 52 with NavigationHelper

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

the class DefineNewLoanProductTest method createMonthlyLoanProduct.

// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createMonthlyLoanProduct() throws Exception {
    SubmitFormParameters formParameters = FormParametersHelper.getMonthlyLoanProductParameters();
    new NavigationHelper(selenium).navigateToAdminPage().verifyPage().defineLoanProduct(formParameters);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)

Example 53 with NavigationHelper

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

the class BackDateLoanProductTest method preparePageForTest.

private DefineNewLoanProductPage preparePageForTest() {
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    AdminPage adminPage = navigationHelper.navigateToAdminPage();
    DefineNewLoanProductPage newLoanProductPage = adminPage.navigateToDefineLoanProduct();
    SubmitFormParameters parameters = FormParametersHelper.getMonthlyLoanProductParameters();
    return newLoanProductPage.fillLoanParameters(parameters);
}
Also used : AdminPage(org.mifos.test.acceptance.framework.admin.AdminPage) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DefineNewLoanProductPage(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage) SubmitFormParameters(org.mifos.test.acceptance.framework.loanproduct.DefineNewLoanProductPage.SubmitFormParameters)

Example 54 with NavigationHelper

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

the class CashFlowTest method verifyCashFlowForLoanAccount.

private void verifyCashFlowForLoanAccount(DateTime disbursalDate, int installment, double cashFlowIncremental, String loanProductName, int frequency) {
    Integer loanAmount = Integer.valueOf(FormParametersHelper.getWeeklyLoanProductParameters().getDefaultLoanAmount());
    new NavigationHelper(selenium).navigateToHomePage();
    loanTestHelper.navigateToCreateLoanAccountEntryPageWithoutLogout(clientName, loanProductName).setDisbursalDate(disbursalDate).setInstallments(installment).clickContinueToNavigateToCashFlowPage().validateCashFlowMonths(disbursalDate, installment, frequency).verifyCashFlowFields().verifyInvalidIndebentRate("49.99", "7001", "1000").enterValidData("100", cashFlowIncremental, 100, "7003", "1000").clickContinue().verifyCashFlow(cashFlowIncremental, loanAmount).clickPreview();
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)

Example 55 with NavigationHelper

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

the class VariableInstalmentLoanProductTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    loanProductTestHelper = new LoanProductTestHelper(selenium);
    loanTestHelper = new LoanTestHelper(selenium);
    systemDateTime = new DateTime(2010, 10, 11, 10, 0, 0, 0);
    loanTestHelper.setApplicationTime(systemDateTime);
    TestDataSetup dataSetup = new TestDataSetup(selenium, applicationDatabaseOperation);
    dataSetup.addDecliningPrincipalBalance();
    feeTestHelper = new FeeTestHelper(dataSetup, new NavigationHelper(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) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) 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