[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/quiz/tests/behat/ -> add_quiz.feature (source)

   1  @mod @mod_quiz
   2  Feature: Add a quiz
   3    In order to evaluate students
   4    As a teacher
   5    I need to create a quiz
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email                |
  10        | teacher1 | Terry1    | Teacher1 | teacher1@example.com |
  11        | student1 | Sam1      | Student1 | student1@example.com |
  12      And the following "courses" exist:
  13        | fullname | shortname | category |
  14        | Course 1 | C1 | 0 |
  15      And the following "course enrolments" exist:
  16        | user | course | role |
  17        | teacher1 | C1 | editingteacher |
  18        | student1 | C1 | student |
  19      When I log in as "teacher1"
  20      And I follow "Course 1"
  21      And I turn editing mode on
  22      And I add a "Quiz" to section "1" and I fill the form with:
  23        | Name        | Test quiz name        |
  24        | Description | Test quiz description |
  25      And I add a "True/False" question to the "Test quiz name" quiz with:
  26        | Question name                      | First question                          |
  27        | Question text                      | Answer the first question               |
  28        | General feedback                   | Thank you, this is the general feedback |
  29        | Correct answer                     | False                                   |
  30        | Feedback for the response 'True'.  | So you think it is true                 |
  31        | Feedback for the response 'False'. | So you think it is false                |
  32      And I log out
  33      And I log in as "student1"
  34      And I follow "Course 1"
  35      And I follow "Test quiz name"
  36      And I press "Attempt quiz now"
  37      Then I should see "Question 1"
  38      And I should see "Answer the first question"
  39      And I set the field "True" to "1"
  40      And I press "Finish attempt ..."
  41      And I should see "Answer saved"
  42      And I press "Submit all and finish"
  43  
  44    @javascript
  45    Scenario: Add and configure small quiz and perform an attempt as a student with Javascript enabled
  46      Then I click on "Submit all and finish" "button" in the "Confirmation" "dialogue"
  47      And I should see "So you think it is true"
  48      And I should see "Thank you, this is the general feedback"
  49      And I should see "The correct answer is 'False'."
  50      And I follow "Finish review"
  51      And I should see "Highest grade: 0.00 / 10.00."
  52      And I log out
  53  
  54    Scenario: Add and configure small quiz and perform an attempt as a student with Javascript disabled
  55      Then I should see "So you think it is true"
  56      And I should see "Thank you, this is the general feedback"
  57      And I should see "The correct answer is 'False'."
  58      And I follow "Finish review"
  59      And I should see "Highest grade: 0.00 / 10.00."
  60      And I log out


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