Search in sources :

Example 6 with QuestionGroupTestHelper

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

the class CreateClientLoanAccountTest 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);
    loanProductTestHelper = new LoanProductTestHelper(selenium);
    navigationHelper = new NavigationHelper(selenium);
    feeTestHelper = new FeeTestHelper(new TestDataSetup(selenium, applicationDatabaseOperation), navigationHelper);
    questionGroupHelper = new QuestionGroupHelper(navigationHelper);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    random = new Random();
}
Also used : FeeTestHelper(org.mifos.test.acceptance.admin.FeeTestHelper) TestDataSetup(org.mifos.test.acceptance.util.TestDataSetup) QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) NavigationHelper(org.mifos.test.acceptance.framework.testhelpers.NavigationHelper) Random(java.util.Random) LoanProductTestHelper(org.mifos.test.acceptance.loanproduct.LoanProductTestHelper) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 7 with QuestionGroupTestHelper

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

the class ClientLoanStatusChangeTest method pendingApprovalToApplicationApprovedWithQuestionGroup.

@SuppressWarnings("PMD.SignatureDeclareThrowsException")
public void pendingApprovalToApplicationApprovedWithQuestionGroup() throws Exception {
    String qgForLoanApproval = "QGForLoanApproval";
    QuestionGroupTestHelper questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsActive(qgForLoanApproval);
    EditLoanAccountStatusParameters statusParameters = new EditLoanAccountStatusParameters();
    statusParameters.setStatus(EditLoanAccountStatusParameters.APPROVED);
    statusParameters.setNote("Test");
    QuestionResponseParameters responseParameters = new QuestionResponseParameters();
    responseParameters.addTextAnswer("create_ClientPersonalInfo.input.customField", "testResponse");
    loanTestHelper.changeLoanAccountStatusProvidingQuestionGroupResponses("000100000000055", statusParameters, responseParameters);
    questionGroupTestHelper.markQuestionGroupAsInactive(qgForLoanApproval);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) EditLoanAccountStatusParameters(org.mifos.test.acceptance.framework.loan.EditLoanAccountStatusParameters) QuestionResponseParameters(org.mifos.test.acceptance.framework.loan.QuestionResponseParameters)

Example 8 with QuestionGroupTestHelper

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

the class QuestionGroupTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    officeHelper = new OfficeHelper(selenium);
    appLauncher = new AppLauncher(selenium);
    loanTestHelper = new LoanTestHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    clientTestHelper = new ClientTestHelper(selenium);
    questionGroupInstancesOfClient = new HashMap<Integer, QuestionGroup>();
    qgTitle1 = "QuestionGroup1";
    qgTitle2 = "QuestionGroup2";
    qgTitle3 = "QuestionGroup3";
    qgTitle4 = "QuestionGroup4";
    qTitle1 = "Question1";
    qTitle2 = "Question2";
    qTitle3 = "Question3";
    qTitle4 = "Question4";
    qTitle5 = "Question5";
    QUESTIONS.put("TextQuestionTest", CreateQuestionParameters.TYPE_FREE_TEXT);
    QUESTIONS.put("DateQuestionTest", CreateQuestionParameters.TYPE_DATE);
    QUESTIONS.put("NumberQuestionTest", CreateQuestionParameters.TYPE_NUMBER);
    QUESTIONS.put("MultiSelectQuestionTest", CreateQuestionParameters.TYPE_MULTI_SELECT);
    QUESTIONS.put("SingleSelectQuestionTest", CreateQuestionParameters.TYPE_SINGLE_SELECT);
    QUESTIONS.put("SmartSelectQuestionTest", CreateQuestionParameters.TYPE_SMART_SELECT);
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) OfficeHelper(org.mifos.test.acceptance.framework.testhelpers.OfficeHelper) ClientTestHelper(org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper) QuestionGroup(org.mifos.test.acceptance.framework.client.QuestionGroup) AppLauncher(org.mifos.test.acceptance.framework.AppLauncher) LoanTestHelper(org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 9 with QuestionGroupTestHelper

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

the class CreateSavingsAccountTest method setUp.

@Override
@SuppressWarnings("PMD.SignatureDeclareThrowsException")
// one of the dependent methods throws Exception
@BeforeMethod(alwaysRun = true)
public void setUp() throws Exception {
    super.setUp();
    savingsAccountHelper = new SavingsAccountHelper(selenium);
    questionGroupTestHelper = new QuestionGroupTestHelper(selenium);
    questionGroupTestHelper.markQuestionGroupAsActive("QGForCreateSavingsAccount");
}
Also used : QuestionGroupTestHelper(org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper) SavingsAccountHelper(org.mifos.test.acceptance.framework.testhelpers.SavingsAccountHelper) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 10 with QuestionGroupTestHelper

use of org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper 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

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