[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_filepicker @_file_upload 2 Feature: Overwrite file feature 3 In order to update an existing file 4 As a user 5 I need to pick the file with the same name and select to overwrite 6 7 @javascript @_bug_phantomjs 8 Scenario: Upload a file in filemanager and overwrite it 9 Given the following "users" exist: 10 | username | firstname | lastname | email | 11 | teacher1 | Terry | Teacher | teacher1@example.com | 12 And the following "courses" exist: 13 | fullname | shortname | category | 14 | Course 1 | C1 | 0 | 15 And the following "course enrolments" exist: 16 | user | course | role | 17 | teacher1 | C1 | editingteacher | 18 When I log in as "teacher1" 19 And I follow "Manage private files" 20 And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager 21 Then I should see "1" elements in "Files" filemanager 22 And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager 23 And I should see "1" elements in "Files" filemanager 24 And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as: 25 | Save as | empty_copy.txt | 26 And I should see "2" elements in "Files" filemanager 27 And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager as: 28 | Save as | empty_copy.txt | 29 And I should see "2" elements in "Files" filemanager 30 And I press "Save changes" 31 And I am on site homepage 32 And I follow "Course 1" 33 And I turn editing mode on 34 And I add a "Folder" to section "1" 35 And I set the following fields to these values: 36 | Name | Test folder | 37 | Description | Test folder description | 38 And I add "empty.txt" file from "Private files" to "Files" filemanager 39 And I should see "1" elements in "Files" filemanager 40 And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager 41 And I should see "1" elements in "Files" filemanager 42 And I add "empty.txt" file from "Private files" to "Files" filemanager as: 43 | Save as | empty_copy.txt | 44 And I should see "2" elements in "Files" filemanager 45 And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as: 46 | Save as | empty_copy.txt | 47 And I should see "2" elements in "Files" filemanager 48 And I press "Save and display" 49 And I should see "empty.txt" 50 And I should see "empty_copy.txt"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |