[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/question/type/truefalse/tests/behat/ -> preview.feature (source)

   1  @qtype @qtype_truefalse
   2  Feature: Preview a Trtue/False question
   3    As a teacher
   4    In order to check my True/False questions will work for students
   5    I need to preview them
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email               |
  10        | teacher1 | T1        | Teacher1 | teacher1@moodle.com |
  11      And the following "courses" exist:
  12        | fullname | shortname | category |
  13        | Course 1 | C1        | 0        |
  14      And the following "course enrolments" exist:
  15        | user     | course | role           |
  16        | teacher1 | C1     | editingteacher |
  17      And the following "question categories" exist:
  18        | contextlevel | reference | name           |
  19        | Course       | C1        | Test questions |
  20      And the following "questions" exist:
  21        | questioncategory | qtype     | name           | template |
  22        | Test questions   | truefalse | true-false-001 | true     |
  23      Given I log in as "teacher1"
  24      And I follow "Course 1"
  25      And I navigate to "Question bank" node in "Course administration"
  26  
  27    @javascript @_switch_window
  28    Scenario: Preview a True/False question and submit a correct response.
  29      When I click on "Preview" "link" in the "true-false-001" "table_row"
  30      And I switch to "questionpreview" window
  31      And I set the field "How questions behave" to "Immediate feedback"
  32      And I press "Start again with these options"
  33      And I click on "True" "radio"
  34      And I press "Check"
  35      And I should see "This is the right answer."
  36      And I should see "The correct answer is 'True'."
  37      And I switch to the main window
  38  
  39    @javascript @_switch_window
  40    Scenario: Preview a True/False question and submit an incorrect response.
  41      When I click on "Preview" "link" in the "true-false-001" "table_row"
  42      And I switch to "questionpreview" window
  43      And I set the field "How questions behave" to "Immediate feedback"
  44      And I press "Start again with these options"
  45      And I click on "False" "radio"
  46      And I press "Check"
  47      And I should see "This is the wrong answer."
  48      And I should see "You should have selected true."
  49      And I should see "The correct answer is 'True'."
  50      And I switch to the main window


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1