1 |
efrain |
1 |
@qtype @qtype_match
|
|
|
2 |
Feature: Preview a Matching question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to check my Matching 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 | shuffleanswers |
|
|
|
22 |
| Test questions | match | matching-001 | foursubq | 0 |
|
|
|
23 |
|
|
|
24 |
@javascript @_switch_window
|
|
|
25 |
Scenario: Preview a Matching question and submit a correct response.
|
|
|
26 |
When I am on the "matching-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 set the field "Answer 1" to "amphibian"
|
|
|
31 |
And I set the field "Answer 2" to "mammal"
|
|
|
32 |
And I set the field "Answer 3" to "amphibian"
|
|
|
33 |
And I press "Check"
|
|
|
34 |
Then I should see "Well done!"
|
|
|
35 |
And I should see "General feedback."
|
|
|
36 |
|
|
|
37 |
@javascript @_switch_window
|
|
|
38 |
Scenario: Preview a Matching question and submit a partially correct response.
|
|
|
39 |
When I am on the "matching-001" "core_question > preview" page logged in as teacher
|
|
|
40 |
And I expand all fieldsets
|
|
|
41 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
42 |
And I press "Save preview options and start again"
|
|
|
43 |
And I set the field "Answer 1" to "amphibian"
|
|
|
44 |
And I set the field "Answer 2" to "insect"
|
|
|
45 |
And I set the field "Answer 3" to "amphibian"
|
|
|
46 |
And I press "Check"
|
|
|
47 |
Then I should see "Parts, but only parts, of your response are correct."
|
|
|
48 |
And I should see "General feedback."
|
|
|
49 |
|
|
|
50 |
@javascript @_switch_window
|
|
|
51 |
Scenario: Preview a Matching question and submit an incorrect response.
|
|
|
52 |
When I am on the "matching-001" "core_question > preview" page logged in as teacher
|
|
|
53 |
And I expand all fieldsets
|
|
|
54 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
55 |
And I press "Save preview options and start again"
|
|
|
56 |
And I set the field "Answer 1" to "mammal"
|
|
|
57 |
And I set the field "Answer 2" to "insect"
|
|
|
58 |
And I set the field "Answer 3" to "insect"
|
|
|
59 |
And I press "Check"
|
|
|
60 |
Then I should see "That is not right at all."
|
|
|
61 |
And I should see "General feedback."
|