1 |
efrain |
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 |
|
|
|
10 |
| teacher |
|
|
|
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 |
| teacher | 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 |
|
|
|
24 |
@javascript @_switch_window
|
|
|
25 |
Scenario: Preview a True/False question and submit a correct response.
|
|
|
26 |
When I am on the "true-false-001" "core_question > preview" page logged in as teacher
|
|
|
27 |
And I expand all fieldsets
|
|
|
28 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
29 |
And I press "Save preview options and start again"
|
|
|
30 |
And I click on "True" "radio"
|
|
|
31 |
And I press "Check"
|
|
|
32 |
And I should see "This is the right answer."
|
|
|
33 |
And I should see "The correct answer is 'True'."
|
|
|
34 |
|
|
|
35 |
@javascript @_switch_window
|
|
|
36 |
Scenario: Preview a True/False question and submit an incorrect response.
|
|
|
37 |
When I am on the "true-false-001" "core_question > preview" page logged in as teacher
|
|
|
38 |
And I expand all fieldsets
|
|
|
39 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
40 |
And I press "Save preview options and start again"
|
|
|
41 |
And I click on "False" "radio"
|
|
|
42 |
And I press "Check"
|
|
|
43 |
And I should see "This is the wrong answer."
|
|
|
44 |
And I should see "You should have selected true."
|
|
|
45 |
And I should see "The correct answer is 'True'."
|