MDL-40619 mod_quiz: Remove commented non-js behat scenario
[moodle.git] / mod / quiz / tests / behat / add_quiz.feature
CommitLineData
7f051de2
MG
1@mod @mod_quiz
2Feature: 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" exists:
9 | username | firstname | lastname | email |
10 | teacher1 | Terry1 | Teacher1 | teacher1@moodle.com |
11 | student1 | Sam1 | Student1 | student1@moodle.com |
12 And the following "courses" exists:
13 | fullname | shortname | category |
14 | Course 1 | C1 | 0 |
15 And the following "course enrolments" exists:
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 select "True" radio button
40 And I press "Next"
41 And I should see "Answer saved"
42 And I press "Submit all and finish"
43 And I press "Yes"
44 And I should see "So you think it is true"
45 And I should see "Thank you, this is the general feedback"
46 And I should see "The correct answer is 'False'."
47 And I follow "Finish review"
48 And I should see "Highest grade: 0.00 / 10.00."
49 And I log out
50
51 @javascript
52 Scenario: Add and configure small quiz and perform an attempt as a student with Javascript enabled