[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/question/tests/behat/ -> preview_question.feature (source)

   1  @core @core_question @_switch_window
   2  Feature: A teacher can preview questions in the question bank
   3    In order to ensure the questions are properly created
   4    As a teacher
   5    I need to preview the questions
   6  
   7    @javascript
   8    Scenario: Preview a previously created question
   9      Given the following "users" exist:
  10        | username | firstname | lastname | email            |
  11        | teacher1 | Teacher   | 1        | [email protected] |
  12      And the following "courses" exist:
  13        | fullname | shortname | format |
  14        | Course 1 | C1        | weeks  |
  15      And the following "course enrolments" exist:
  16        | user     | course | role           |
  17        | teacher1 | C1     | editingteacher |
  18      And I log in as "teacher1"
  19      And I follow "Course 1"
  20      And I add a "Numerical" question filling the form with:
  21        | Question name | Test question to be previewed |
  22        | Question text | How much is 1 + 1             |
  23        | answer[0]     | 2                             |
  24        | fraction[0]   | 100%                          |
  25        | answer[1]     | *                             |
  26        | fraction[1]   | None                          |
  27  
  28      When I click on "Preview" "link" in the "Test question to be previewed" "table_row"
  29      And I switch to "questionpreview" window
  30      And I set the following fields to these values:
  31        | Whether correct      | Shown             |
  32        | How questions behave | Deferred feedback |
  33      And I press "Start again with these options"
  34  
  35      Then I should see "How much is 1 + 1"
  36      And I should see "Technical information"
  37      And I should see "Attempt options"
  38      And I should see "Display options"
  39  
  40      And I set the field "Answer:" to "1"
  41      And I press "Save"
  42      And the state of "How much is 1 + 1" question is shown as "Answer saved"
  43  
  44      And I press "Submit and finish"
  45      And the state of "How much is 1 + 1" question is shown as "Incorrect"
  46  
  47      And I press "Start again"
  48      And the state of "How much is 1 + 1" question is shown as "Not yet answered"
  49  
  50      And I press "Fill in correct responses"
  51      And the field "Answer:" matches value "2"
  52      And the state of "How much is 1 + 1" question is shown as "Answer saved"
  53  
  54      And I set the field "Whether correct" to "Not shown"
  55      And I press "Update display options"
  56      And the state of "How much is 1 + 1" question is shown as "Answer saved"
  57  
  58      And I press "Submit and finish"
  59      And the state of "How much is 1 + 1" question is shown as "Complete"
  60  
  61      And I switch to the main window


Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1