コード例 #1
0
  @Override
  public void testNewQuestionFrame() {
    ______TS("RUBRIC: new question (frame) link");

    feedbackEditPage.clickNewQuestionButton();
    feedbackEditPage.selectNewQuestionType("RUBRIC");
    assertTrue(feedbackEditPage.verifyNewRubricQuestionFormIsDisplayed());
  }
コード例 #2
0
  @Override
  public void testNewQuestionFrame() {
    ______TS("NUMSCALE: new question (frame) link");

    feedbackEditPage.clickNewQuestionButton();
    feedbackEditPage.selectNewQuestionType("NUMSCALE");

    assertTrue(feedbackEditPage.verifyNewNumScaleQuestionFormIsDisplayed());
  }
コード例 #3
0
  @Override
  public void testAddQuestionAction() throws Exception {
    ______TS("RUBRIC: add question action success");

    feedbackEditPage.clickNewQuestionButton();
    feedbackEditPage.selectNewQuestionType("RUBRIC");
    feedbackEditPage.fillNewQuestionBox("RUBRIC qn");
    feedbackEditPage.fillNewQuestionDescription("more details");
    assertNull(BackDoor.getFeedbackQuestion(courseId, feedbackSessionName, 1));
    feedbackEditPage.clickAddQuestionButton();
    feedbackEditPage.verifyStatus(Const.StatusMessages.FEEDBACK_QUESTION_ADDED);
    assertNotNull(BackDoor.getFeedbackQuestion(courseId, feedbackSessionName, 1));
    feedbackEditPage.verifyHtmlMainContent("/instructorFeedbackRubricQuestionAddSuccess.html");
  }
コード例 #4
0
  private void testInputJsValidationForRubricQuestion() {
    // this tests whether the JS validation disallows empty rubric options

    ______TS("JS validation test");

    // add a new question
    feedbackEditPage.clickNewQuestionButton();
    feedbackEditPage.selectNewQuestionType("RUBRIC");

    // start editing it
    feedbackEditPage.fillNewQuestionBox("RUBRIC qn JS validation test");
    feedbackEditPage.fillNewQuestionDescription("more details");
    feedbackEditPage.clickAddQuestionButton();

    feedbackEditPage.clickEditQuestionButton(1);

    // try to remove everything
    feedbackEditPage.clickRemoveRubricRowLinkAndConfirm(1, 1);
    feedbackEditPage.clickRemoveRubricRowLinkAndConfirm(1, 0);
    feedbackEditPage.clickRemoveRubricColLinkAndConfirm(1, 3);
    feedbackEditPage.clickRemoveRubricColLinkAndConfirm(1, 2);
    feedbackEditPage.clickRemoveRubricColLinkAndConfirm(1, 1);
    feedbackEditPage.clickRemoveRubricColLinkAndConfirm(1, 0);

    // TODO check if the rubric column and link is indeed empty

    // add something so that we know that the elements are still there
    // and so that we don't get empty sub question error
    feedbackEditPage.fillRubricSubQuestionBox("New sub-question text", 1, 0);
    feedbackEditPage.fillRubricDescriptionBox("New(0) description", 1, 0, 0);

    feedbackEditPage.clickSaveExistingQuestionButton(1);

    feedbackEditPage.verifyStatus(
        "Too little choices for Rubric question. Minimum number of options is: 2");
  }