Merge branch 'MDL-56486-master-workshopfiletypes' of git://github.com/mudrd8mz/moodle
This commit is contained in:
@@ -42,7 +42,13 @@ Feature: File types of the submission and feedback attachments can be limitted
|
||||
And I set the following fields to these values:
|
||||
| Title | Submission1 |
|
||||
| Submission content | See the attached file |
|
||||
And I upload "mod/workshop/tests/fixtures/testable.php" file to "Attachment" filemanager
|
||||
# We can't directly upload the invalid file here as the upload repository would throw an exception.
|
||||
# So instead we try to trick the filemanager and bypass its checks, to be finally stopped by the
|
||||
# form field validation.
|
||||
And I upload "mod/workshop/tests/fixtures/moodlelogo.png" file to "Attachment" filemanager
|
||||
And I follow "moodlelogo.png"
|
||||
And I set the field "Name" to "testable.php"
|
||||
And I press "Update"
|
||||
When I press "Save changes"
|
||||
Then I should see "Some files (testable.php) cannot be uploaded. Only file types image are allowed."
|
||||
# Remove the invalid file and attach an image instead.
|
||||
@@ -106,9 +112,9 @@ Feature: File types of the submission and feedback attachments can be limitted
|
||||
And I press "Update"
|
||||
When I press "Save and close"
|
||||
Then I should see "Some files (renamed.png) cannot be uploaded. Only file types .php are allowed."
|
||||
And I should not see "Assigned submissions to assess"
|
||||
# Finally make sure that allowed file gets uploaded.
|
||||
And I delete "renamed.png" from "Attachment" filemanager
|
||||
And I upload "mod/workshop/tests/fixtures/testable.php" file to "Attachment" filemanager
|
||||
And I press "Save and close"
|
||||
And I should see "Assigned submissions to assess"
|
||||
And I should see "Re-assess"
|
||||
|
||||
Reference in New Issue
Block a user