Autoría | Ultima modificación | Ver Log |
@core @core_filepicker @_file_uploadFeature: Delete files and folders from the file managerIn order to clean the file manager contentsAs a userI need to delete files from file areasBackground:Given the following "blocks" exist:| blockname | contextlevel | reference | pagetypepattern | defaultregion || private_files | System | 1 | my-index | side-post |@javascript @_bug_phantomjsScenario: Delete a file and a folderGiven I log in as "admin"And I follow "Manage private files..."And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanagerAnd I create "Delete me" folder in "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."When I delete "empty.txt" from "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."Then I should not see "empty.txt" in the "Manage private files" "dialogue"And I delete "Delete me" from "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."And I should not see "Delete me" in the "Manage private files" "dialogue"@javascriptScenario: Delete a file and a folder using bulk functionality (individually)Given I log in as "admin"And I follow "Manage private files..."And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanagerAnd I create "Delete me later" folder in "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."And I click on "Display folder with file details" "link"And I set the field "Select file 'empty.txt'" to "1"When I click on "Delete" "link"Then I should see "Are you sure you want to delete the selected 1 file(s)?"When I click on "Yes" "button" in the "Confirm" "dialogue"Then I should not see "empty.txt" in the "Manage private files" "dialogue"But I should see "Delete me later" in the "Manage private files" "dialogue"When I press "Save changes"And I follow "Manage private files..."Then I should not see "empty.txt" in the "Manage private files" "dialogue"But I should see "Delete me later" in the "Manage private files" "dialogue"And I set the field "Select file 'Delete me later'" to "1"And I click on "Delete" "link"And I click on "Yes" "button" in the "Confirm" "dialogue"Then I should not see "Delete me later" in the "Manage private files" "dialogue"When I press "Save changes"And I follow "Manage private files..."Then I should not see "Delete me later" in the "Manage private files" "dialogue"@javascriptScenario: Delete a file and a folder using bulk functionality (multiple)Given I log in as "admin"And I follow "Manage private files..."And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanagerAnd I create "Delete me" folder in "Files" filemanagerAnd I create "Do not delete me" folder in "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."And I click on "Display folder with file details" "link"And I set the field "Select file 'empty.txt'" to "1"And I set the field "Select file 'Delete me'" to "1"When I click on "Delete" "link"Then I should see "Are you sure you want to delete the selected 2 file(s)?"When I click on "Yes" "button" in the "Confirm" "dialogue"Then I should not see "Delete me" in the "Manage private files" "dialogue"And I should not see "empty.txt" in the "Manage private files" "dialogue"But I should see "Do not delete me" in the "Manage private files" "dialogue"When I press "Save changes"And I follow "Manage private files..."Then I should not see "Delete me" in the "Manage private files" "dialogue"And I should not see "empty.txt" in the "Manage private files" "dialogue"And I am on homepageThen I should not see "Delete me" in the "Private files" "block"And I should not see "empty.txt" in the "Private files" "block"But I should see "Do not delete me" in the "Private files" "block"@javascriptScenario: Delete files using the select all checkboxGiven I log in as "admin"And I follow "Manage private files..."And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanagerAnd I create "Delete me" folder in "Files" filemanagerAnd I create "Delete me too" folder in "Files" filemanagerAnd I press "Save changes"And I follow "Manage private files..."And I click on "Display folder with file details" "link"When I click on "Select all/none" "checkbox"Then the following fields match these values:| Select file 'empty.txt' | 1 || Select file 'Delete me' | 1 || Select file 'Delete me too' | 1 |When I click on "Delete" "link"Then I should see "Are you sure you want to delete the selected 3 file(s)?"When I click on "Yes" "button" in the "Confirm" "dialogue"Then I should not see "Delete me" in the "Manage private files" "dialogue"And I should not see "empty.txt" in the "Manage private files" "dialogue"And I should not see "Delete me too" in the "Manage private files" "dialogue"When I press "Save changes"And I follow "Manage private files..."Then I should not see "Delete me" in the "Manage private files" "dialogue"And I should not see "empty.txt" in the "Manage private files" "dialogue"And I am on homepageThen I should not see "Delete me" in the "Private files" "block"And I should not see "empty.txt" in the "Private files" "block"And I should not see "Delete me too" in the "Private files" "block"@javascriptScenario: Verify system logs for deleted draft filesGiven I log in as "admin"And I follow "Manage private files..."And I upload "lib/tests/fixtures/update_validator/zips/multidir.zip" file to "Files" filemanagerAnd I follow "multidir.zip"And I click on "Unzip" "button"And I click on "Display folder with file details" "link"And I set the field "Select file 'one'" to "1"And I click on "Delete" "link"And I should see "Are you sure you want to delete the selected 1 file(s)?"And I click on "Yes" "button" in the "Confirm" "dialogue"And I click on "Save changes" "button"And I am on the "System logs report" pageAnd I click on "Get these logs" "button"And I should see "The user with id '2' has deleted folder '/one/.' from the draft file area with item id" in the "has deleted folder '/one/.'" "table_row"And I should see "Size: 0 bytes. Content hash:" in the "has deleted folder '/one/.'" "table_row"Then I should see "The user with id '2' has deleted file '/one/version.php' from the draft file area with item id" in the "has deleted file '/one/version.php'" "table_row"And I should see "Size: 40 bytes. Content hash:" in the "has deleted file '/one/version.php'" "table_row"