1 |
efrain |
1 |
@qtype @qtype_essay
|
|
|
2 |
Feature: Preview Essay questions
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to check my Essay 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 | essay | essay-001 | editor |
|
|
|
23 |
| Test questions | essay | essay-002 | editorfilepicker |
|
|
|
24 |
| Test questions | essay | essay-003 | plain |
|
|
|
25 |
|
|
|
26 |
@javascript @_switch_window
|
|
|
27 |
Scenario: Preview an Essay question that uses the HTML editor.
|
|
|
28 |
When I am on the "essay-001" "core_question > preview" page logged in as teacher
|
|
|
29 |
And I expand all fieldsets
|
|
|
30 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
31 |
And I press "Save preview options and start again"
|
|
|
32 |
And I should see "Please write a story about a frog."
|
|
|
33 |
|
|
|
34 |
@javascript @_switch_window
|
|
|
35 |
Scenario: Preview an Essay question that uses the HTML editor with embedded files.
|
|
|
36 |
When I am on the "essay-002" "core_question > preview" page logged in as teacher
|
|
|
37 |
And I expand all fieldsets
|
|
|
38 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
39 |
And I press "Save preview options and start again"
|
|
|
40 |
And I should see "Please write a story about a frog."
|
|
|
41 |
And I should see "You can drag and drop files here to add them."
|
|
|
42 |
|
|
|
43 |
@javascript @_switch_window
|
|
|
44 |
Scenario: Preview an Essay question that uses a plain text area.
|
|
|
45 |
When I am on the "essay-003" "core_question > preview" page logged in as teacher
|
|
|
46 |
And I expand all fieldsets
|
|
|
47 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
48 |
And I press "Save preview options and start again"
|
|
|
49 |
And I should see "Please write a story about a frog."
|