1 |
efrain |
1 |
@repository @repository_upload @_file_upload
|
|
|
2 |
Feature: Upload files
|
|
|
3 |
In order to add contents
|
|
|
4 |
As a user
|
|
|
5 |
I need to upload files
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: Upload a file in a multiple file filemanager
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category |
|
|
|
11 |
| Course 1 | C1 | 0 |
|
|
|
12 |
And I log in as "admin"
|
|
|
13 |
And I turn editing mode on
|
|
|
14 |
And I add the "Private files" block if not present
|
|
|
15 |
When I follow "Manage private files..."
|
|
|
16 |
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
|
|
|
17 |
Then I should see "1" elements in "Files" filemanager
|
|
|
18 |
And I should see "empty.txt" in the "div.fp-content" "css_element"
|
|
|
19 |
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as:
|
|
|
20 |
| Save as | empty_copy.txt |
|
|
|
21 |
Then I should see "2" elements in "Files" filemanager
|
|
|
22 |
And I should see "empty.txt"
|
|
|
23 |
And I should see "empty_copy.txt"
|
|
|
24 |
|
|
|
25 |
@javascript
|
|
|
26 |
Scenario: Verify logs for file upload
|
|
|
27 |
Given I am on the "My private files" page logged in as "admin"
|
|
|
28 |
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
|
|
|
29 |
And I click on "Save changes" "button"
|
|
|
30 |
And I am on the "System logs report" page
|
|
|
31 |
And I click on "Get these logs" "button"
|
|
|
32 |
Then I should see "The user with id '2' has uploaded file '/empty.txt' to the draft file area with item id" in the "File added to draft area" "table_row"
|
|
|
33 |
And I should see "Size: 32 bytes. Content hash: " in the "File added to draft area" "table_row"
|