Search in sources :

Example 1 with QuestionGroupTestHelper

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

the class QuestionGroupSavingsAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with QuestionGroupTestHelper

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

the class PPITest method setUp.

@Override
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    DateTimeUpdaterRemoteTestingService dateTimeUpdaterRemoteTestingService = new DateTimeUpdaterRemoteTestingService(selenium);
    DateTime targetTime = new DateTime(2009, 11, 7, 10, 0, 0, 0);
    dateTimeUpdaterRemoteTestingService.setDateTime(targetTime);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) DateTimeUpdaterRemoteTestingService(org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService) DateTime(org.joda.time.DateTime) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with QuestionGroupTestHelper

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

the class CreateGroupLoanAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    loanTestHelper = new LoanTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsInactive("QGForCreateLoan1");
    questionGroupTestHelper.markQuestionGroupAsInactive("QGForCreateLoan2");
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with QuestionGroupTestHelper

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

the class GroupTest method createGroupInPendingApprovalStateTestWithSurveys.

@Test(singleThreaded = true, groups = { "smoke", "group", "acceptance", "ui", "no_db_unit" })
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void createGroupInPendingApprovalStateTestWithSurveys() throws Exception {
    QuestionGroupTestHelper questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    String questionGroupTitle = "QG1" + random.nextInt(100);
    String question1 = "Nu_" + random.nextInt(100);
    String question2 = "SS_" + random.nextInt(100);
    List<Choice> choices = asList(new Choice("Choice1", asList("Tag1", "Tag2")), new Choice("Choice2", asList("Tag3", "Tag4")));
    createQuestionGroupForCreateGroup(questionGroupTitle, question1, question2, choices);
    CreateGroupEntryPage groupEntryPage = loginAndNavigateToNewGroupPage();
    CreateGroupSubmitParameters formParameters = getGenericGroupFormParameters();
    QuestionResponsePage questionResponsePage = groupEntryPage.submitNewGroupAndNavigateToQuestionResponsePage(formParameters);
    questionResponsePage.verifyPage();
    questionResponsePage.verifyNumericBoundsValidation("name=questionGroups[0].sectionDetails[0].questions[0].value", "1000", 10, 100, question1);
    questionResponsePage.populateTextAnswer("name=questionGroups[0].sectionDetails[0].questions[0].value", "30");
    questionResponsePage.populateSmartSelect("txtListSearch", getChoiceTags());
    GroupViewDetailsPage groupViewDetailsPage = questionResponsePage.navigateToCreateGroupDetailsPage("Application Pending*");
    ViewQuestionResponseDetailPage responsePage = groupViewDetailsPage.navigateToViewAdditionalInformationPage();
    responsePage.verifyPage();
    responsePage.verifyQuestionPresent(question1, "30");
    responsePage.verifyQuestionPresent(question2, "Choice", "Choice2");
    responsePage.navigateToDetailsPage();
    questionGroupTestHelper.markQuestionGroupAsInactive(questionGroupTitle);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) ViewQuestionResponseDetailPage(org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage) Choice(org.mifos.test.acceptance.framework.questionnaire.Choice) CreateGroupSubmitParameters(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters) QuestionResponsePage(org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage) GroupViewDetailsPage(org.mifos.test.acceptance.framework.group.GroupViewDetailsPage) CreateGroupEntryPage(org.mifos.test.acceptance.framework.group.CreateGroupEntryPage) Test(org.testng.annotations.Test)

Example 5 with QuestionGroupTestHelper

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

the class GroupTest method setUp.

@Override
// one of the dependent methods throws Exception
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    appLauncher = new AppLauncher(selenium);
    navigationHelper = new NavigationHelper(selenium);
    random = new Random();
    groupTestHelper = new GroupTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) GroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) Random(java.util.Random) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)17 BeforeMethod (org.testng.annotations.BeforeMethod)13 NavigationHelper (org.mifos.test.acceptance.framework.testhelpers.NavigationHelper)6 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)5 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)5 DateTime (org.joda.time.DateTime)4 DateTimeUpdaterRemoteTestingService (org.mifos.test.acceptance.remote.DateTimeUpdaterRemoteTestingService)4 QuestionResponseParameters (org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)3 QuestionResponsePage (org.mifos.test.acceptance.framework.questionnaire.QuestionResponsePage)3 GroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.GroupTestHelper)3 SavingsAccountHelper (org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper)3 Test (org.testng.annotations.Test)3 ArrayList (java.util.ArrayList)2 Random (java.util.Random)2 FeeTestHelper (org.mifos.test.acceptance.admin.FeeTestHelper)2 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)2 CreateGroupSubmitParameters (org.mifos.test.acceptance.framework.group.CreateGroupEntryPage.CreateGroupSubmitParameters)2 GroupViewDetailsPage (org.mifos.test.acceptance.framework.group.GroupViewDetailsPage)2 CreateQuestionParameters (org.mifos.test.acceptance.framework.questionnaire.CreateQuestionParameters)2 ViewQuestionResponseDetailPage (org.mifos.test.acceptance.framework.questionnaire.ViewQuestionResponseDetailPage)2