Search in sources :

Example 1 with QuestionGroup

use of org.mifos.test.acceptance.framework.client.QuestionGroup in project head by mifos.

the class ClientTest method verifyQuestionGroupInstanceListing.

private void verifyQuestionGroupInstanceListing(int expectedSize) {
    questionGroupInstancesOfClient = viewClientDetailsPage.getQuestionGroupInstances();
    QuestionGroup latestInstance = getLatestQuestionGroupInstance();
    Assert.assertEquals(expectedSize, questionGroupInstancesOfClient.size());
    Calendar calendar = Calendar.getInstance();
    String expectedDate = String.format(EXPECTED_DATE_FORMAT, calendar.get(Calendar.DATE), calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.YEAR));
    Assert.assertEquals(questionGroupTitle, latestInstance.getName());
    Assert.assertEquals(expectedDate, latestInstance.getDate());
}
Also used : Calendar(java.util.Calendar) QuestionGroup(org.mifos.test.acceptance.framework.client.QuestionGroup)

Example 2 with QuestionGroup

use of org.mifos.test.acceptance.framework.client.QuestionGroup 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)

Aggregations

QuestionGroup (org.mifos.test.acceptance.framework.client.QuestionGroup)2 Calendar (java.util.Calendar)1 AppLauncher (org.mifos.test.acceptance.framework.AppLauncher)1 ClientTestHelper (org.mifos.test.acceptance.framework.testhelpers.ClientTestHelper)1 LoanTestHelper (org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper)1 OfficeHelper (org.mifos.test.acceptance.framework.testhelpers.OfficeHelper)1 QuestionGroupTestHelper (org.mifos.test.acceptance.framework.testhelpers.QuestionGroupTestHelper)1 BeforeMethod (org.testng.annotations.BeforeMethod)1