2 Feature: Preview a quiz as a teacher
3 In order to verify my quizzes are ready for my students
5 I need to be able to preview them
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher | Teacher | One | teacher@example.com |
11 And the following "courses" exist:
12 | fullname | shortname | category |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher | C1 | teacher |
17 And the following "question categories" exist:
18 | contextlevel | reference | name |
19 | Course | C1 | Test questions |
20 And the following "activities" exist:
21 | activity | name | intro | course | idnumber |
22 | quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
23 And the following "questions" exist:
24 | questioncategory | qtype | name | questiontext |
25 | Test questions | truefalse | TF1 | First question |
26 | Test questions | truefalse | TF2 | Second question |
27 And quiz "Quiz 1" contains the following questions:
28 | question | page | maxmark |
31 And user "teacher" has attempted "Quiz 1" with responses:
37 Scenario: Preview a quiz
38 When I log in as "teacher"
39 And I am on "Course 1" course homepage
40 When I follow "Quiz 1"
42 Then I should see "25.00 out of 100.00"
43 And I follow "Finish review"
44 And "Review" "link" in the "Preview" "table_row" should be visible