| Línea 26... |
Línea 26... |
| 26 |
| activity | name | intro | course | idnumber | grade |
|
26 |
| activity | name | intro | course | idnumber | grade |
|
| 27 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 20 |
|
27 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 20 |
|
| 28 |
And quiz "Quiz 1" contains the following questions:
|
28 |
And quiz "Quiz 1" contains the following questions:
|
| 29 |
| question | page |
|
29 |
| question | page |
|
| 30 |
| TF1 | 1 |
|
30 |
| TF1 | 1 |
|
| 31 |
And the following "blocks" exist:
|
- |
|
| 32 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
- |
|
| 33 |
| private_files | System | 1 | my-index | side-post |
|
- |
|
| 34 |
Given I am on the "Quiz 1" "mod_quiz > edit" page logged in as teacher
|
31 |
And I am on the "Quiz 1" "mod_quiz > edit" page logged in as teacher
|
| 35 |
And I click on "Edit question TF1" "link"
|
32 |
And I click on "Edit question TF1" "link"
|
| 36 |
And I set the field "Allow attachments" to "1"
|
33 |
And I set the field "Allow attachments" to "1"
|
| 37 |
And I set the field "Response format" to "No online text"
|
34 |
And I set the field "Response format" to "No online text"
|
| 38 |
And I set the field "Require attachments" to "1"
|
35 |
And I set the field "Require attachments" to "1"
|
| 39 |
And I set the field "filetypeslist[filetypes]" to ".txt"
|
36 |
And I set the field "filetypeslist[filetypes]" to ".txt"
|
| 40 |
And I press "Save changes"
|
37 |
And I press "Save changes"
|
| 41 |
And I am on the "Quiz 1" "mod_quiz > edit" page
|
38 |
And I am on the "Quiz 1" "mod_quiz > edit" page
|
| 42 |
And I set the field "version" to "Always latest"
|
39 |
And I set the field "version" to "Always latest"
|
| 43 |
Then I log out
|
40 |
Then I log out
|
| Línea 44... |
Línea 41... |
| 44 |
|
41 |
|
| 45 |
@javascript @_file_upload
|
42 |
@javascript
|
| 46 |
Scenario: Preview an Essay question and submit a response with a correct filetype.
|
43 |
Scenario: Preview an Essay question and submit a response with a correct filetype.
|
| 47 |
When I log in as "student"
|
44 |
Given the following "user private file" exists:
|
| 48 |
And I follow "Manage private files"
|
45 |
| user | student |
|
| 49 |
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
|
- |
|
| 50 |
And I press "Save changes"
|
46 |
| filepath | lib/tests/fixtures/empty.txt |
|
| 51 |
And I am on the "Quiz 1" "quiz activity" page
|
47 |
When I am on the "Quiz 1" "quiz activity" page logged in as "student"
|
| 52 |
And I press "Attempt quiz"
|
48 |
And I press "Attempt quiz"
|
| 53 |
And I should see "First question"
|
49 |
And I should see "First question"
|
| 54 |
And I should see "You can drag and drop files here to add them."
|
50 |
And I should see "You can drag and drop files here to add them."
|
| 55 |
And I click on "Add..." "button"
|
51 |
And I click on "Add..." "button"
|
| Línea 58... |
Línea 54... |
| 58 |
And I click on "Select this file" "button"
|
54 |
And I click on "Select this file" "button"
|
| 59 |
# Wait for the page to "settle".
|
55 |
# Wait for the page to "settle".
|
| 60 |
And I wait until the page is ready
|
56 |
And I wait until the page is ready
|
| 61 |
Then I should not see "These file types are not allowed here:"
|
57 |
Then I should not see "These file types are not allowed here:"
|
| Línea 62... |
Línea 58... |
| 62 |
|
58 |
|
| 63 |
@javascript @_file_upload
|
59 |
@javascript
|
| 64 |
Scenario: Preview an Essay question and try to submit a response with an incorrect filetype.
|
60 |
Scenario: Preview an Essay question and try to submit a response with an incorrect filetype.
|
| 65 |
When I log in as "student"
|
61 |
Given the following "user private file" exists:
|
| 66 |
And I follow "Manage private files"
|
62 |
| user | student |
|
| 67 |
And I upload "lib/tests/fixtures/upload_users.csv" file to "Files" filemanager
|
- |
|
| 68 |
And I press "Save changes"
|
63 |
| filepath | lib/tests/fixtures/upload_users.csv |
|
| 69 |
And I am on the "Quiz 1" "quiz activity" page
|
64 |
When I am on the "Quiz 1" "quiz activity" page logged in as "student"
|
| 70 |
And I press "Attempt quiz"
|
65 |
And I press "Attempt quiz"
|
| 71 |
And I should see "First question"
|
66 |
And I should see "First question"
|
| 72 |
And I should see "You can drag and drop files here to add them."
|
67 |
And I should see "You can drag and drop files here to add them."
|
| 73 |
And I click on "Add..." "button"
|
68 |
And I click on "Add..." "button"
|