Search in sources :

Example 1 with NavigationHelper

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

the class CenterTest method verifyApplyPaymentForCenterWithUnusualName.

@Test(enabled = true)
public void verifyApplyPaymentForCenterWithUnusualName() {
    String centerName = "`~!@#$%^&*()_+-=[];',./{}|:<>? Center";
    CreateCenterEnterDataPage.SubmitFormParameters formParameters = new CreateCenterEnterDataPage.SubmitFormParameters();
    formParameters.setCenterName(centerName);
    formParameters.setLoanOfficer("loan officer");
    MeetingParameters meeting = MeetingParameters.getRandomMeetingParameters();
    formParameters.setMeeting(meeting);
    centerTestHelper.createCenter(formParameters, "MyOfficeDHMFT");
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    ViewCenterChargesDetailPage viewCenterChargesDetailPage = navigationHelper.navigateToCenterViewDetailsPage(centerName).navigateToViewCenterChargesDetailPage();
    ApplyChargesPage applyChargesPage = viewCenterChargesDetailPage.navigateToApplyCharges();
    ChargeParameters chargeParameters = new ChargeParameters();
    chargeParameters.setAmount("100");
    chargeParameters.setType(ChargeParameters.MISC_FEES);
    viewCenterChargesDetailPage = applyChargesPage.applyChargeAndNaviagteToViewCenterChargesDetailPage(chargeParameters);
    ApplyPaymentPage applyPaymentPage = viewCenterChargesDetailPage.navigateToApplyPayments();
    PaymentParameters parameters = new PaymentParameters();
    DateTime dateTime = new DateTime();
    parameters.setAmount("100");
    parameters.setTransactionDateDD(Integer.toString(dateTime.getDayOfMonth()));
    parameters.setTransactionDateMM(Integer.toString(dateTime.getMonthOfYear()));
    parameters.setTransactionDateYYYY(Integer.toString(dateTime.getYear()));
    parameters.setPaymentType(PaymentParameters.CASH);
    ApplyPaymentConfirmationPage applyPaymentConfirmationPage = applyPaymentPage.submitAndNavigateToApplyPaymentConfirmationPage(parameters);
    //ElementPresent("css=form[name=applyPaymentActionForm]"));
    Assert.assertEquals(true, applyPaymentConfirmationPage.getSelenium().isTextPresent("Review transaction"));
}
Also used : CreateCenterEnterDataPage(org.mifos.test.acceptance.framework.center.CreateCenterEnterDataPage) ApplyPaymentPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentPage) ApplyChargesPage(org.mifos.test.acceptance.framework.client.ApplyChargesPage) ChargeParameters(org.mifos.test.acceptance.framework.loan.ChargeParameters) DateTime(org.joda.time.DateTime) ViewCenterChargesDetailPage(org.mifos.test.acceptance.framework.center.ViewCenterChargesDetailPage) MeetingParameters(org.mifos.test.acceptance.framework.center.MeetingParameters) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) ApplyPaymentConfirmationPage(org.mifos.test.acceptance.framework.loan.ApplyPaymentConfirmationPage) PaymentParameters(org.mifos.test.acceptance.framework.loan.PaymentParameters) Test(org.testng.annotations.Test)

Example 2 with NavigationHelper

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

the class QuestionGroupLoanAccountTest method verifyKeyFinderInQuestionary.

@Test(enabled = true)
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void verifyKeyFinderInQuestionary() {
    NavigationHelper navigationHelper = new NavigationHelper(selenium);
    QuestionGroupHelper questionGroupHelper = new QuestionGroupHelper(navigationHelper);
    Random random = new Random();
    boolean keyUnpressed = true;
    boolean keyPressed = false;
    String questionGroupTitle = "QG1" + random.nextInt(100);
    String question1 = "DT_6245";
    String choiceAnswer1 = "choiceTest13242";
    String choiceAnswer2 = "choiceTest34003";
    List<String> tag1 = new ArrayList<String>();
    List<String> tag2 = new ArrayList<String>();
    tag1.add("tag");
    tag2.add("tag1");
    questionGroupHelper.createQuestionGroupSmart(questionGroupTitle, "Create Loan", question1, choiceAnswer1, choiceAnswer2, tag1, tag2);
    loanProductTestHelper.editLoanProductIncludeQuestionsGroups("ClientEmergencyLoan", questionGroupTitle);
    CreateLoanAccountSearchParameters searchParameters = new CreateLoanAccountSearchParameters();
    searchParameters.setSearchString("ClientWithLoan 20110221");
    searchParameters.setLoanProduct("ClientEmergencyLoan");
    CreateLoanAccountSubmitParameters submitAccountParameters = new CreateLoanAccountSubmitParameters();
    submitAccountParameters.setAmount("1012.0");
    LoanTestHelper loanTestHelper = new LoanTestHelper(selenium);
    CreateLoanAccountEntryPage createLoanAccountEntryPage = loanTestHelper.navigateToCreateLoanAccountEntryPage(searchParameters);
    createLoanAccountEntryPage.submitAndNavigateToQuestionResponsePage();
    searchParameters.setSearchString("ClientWithLoan 20110221");
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyUnpressed), true);
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), false);
    createLoanAccountEntryPage.setInputFilterChoices("2");
    Assert.assertEquals((boolean) createLoanAccountEntryPage.isAnswerExist(keyPressed), true);
    navigationHelper.navigateToAdminPage().navigateToViewAllQuestions().navigateToQuestionDetail(question1).navigateToEditQuestionPage().deactivate();
}
Also used : CreateLoanAccountSearchParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSearchParameters) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) Random(java.util.Random) ArrayList(java.util.ArrayList) CreateLoanAccountSubmitParameters(org.mifos.test.acceptance.framework.loan.CreateLoanAccountSubmitParameters) QuestionGroupHelper(org.mifos.test.acceptance.loan.QuestionGroupHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) CreateLoanAccountEntryPage(org.mifos.test.acceptance.framework.loan.CreateLoanAccountEntryPage) Test(org.testng.annotations.Test)

Example 3 with NavigationHelper

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

the class RemovePenaltiesTest method setUp.

@Override
@BeforeMethod
public void setUp() throws Exception {
    super.setUp();
    this.navigationHelper = new NavigationHelper(selenium);
    this.penaltyHelper = new PenaltyHelper(selenium);
    this.dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) PenaltyHelper(org.mifos.test.acceptance.framework.testhelpers.PenaltyHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with NavigationHelper

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

the class ApplyPaymentOnGLIMLoanAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    navigationHelper = new NavigationHelper(selenium);
    customPropertiesHelper = new CustomPropertiesHelper(selenium);
    customPropertiesHelper.setNewGroupLoanWithMembers(true);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 03, 4, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 with NavigationHelper

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

the class CreateGLIMLoanAccountWithOneTimeFeeTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    loanTestHelper = new LoanTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    customPropertiesHelper = new CustomPropertiesHelper(selenium);
    customPropertiesHelper.setNewGroupLoanWithMembers(true);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2011, 03, 4, 13, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
Also used : NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) CustomPropertiesHelper(org.mifos.test.acceptance.framework.testhelpers.CustomPropertiesHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) 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