Merge branch 'MDL-64554-master-fix2' of git://github.com/andrewnicols/moodle

This commit is contained in:
Jake Dallimore
2021-02-19 11:53:18 +08:00
3 changed files with 37 additions and 27 deletions
+3 -4
View File
@@ -8,7 +8,6 @@ Feature: View licence links
Scenario: Uploading a file displays licence list modal
Given I log in as "admin"
And I follow "Manage private files..."
And I wait until the page is ready
And I follow "Add..."
And I follow "Upload a file"
And I click on "Help with Choose licence" "icon" in the "File picker" "dialogue"
@@ -17,11 +16,11 @@ Feature: View licence links
@javascript @_file_upload
Scenario: Altering a file should display licence list modal
Given I log in as "admin"
And I follow "Private files"
And I follow "Manage private files..."
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I press "Save changes"
And I follow "Private files"
And I click on "empty.txt" "link"
And I follow "Manage private files..."
And I click on "empty.txt" "link" in the "Manage private files" "dialogue"
And I click on "Help with Choose licence" "icon"
Then I should see "Follow these links for further information on the available licence options:"
+32 -22
View File
@@ -7,61 +7,69 @@ Feature: Delete files and folders from the file manager
@javascript @_bug_phantomjs
Scenario: Delete a file and a folder
Given I log in as "admin"
And I follow "Private files"
And I follow "Manage private files..."
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I create "Delete me" folder in "Files" filemanager
And I press "Save changes"
And I follow "Manage private files..."
When I delete "empty.txt" from "Files" filemanager
And I press "Save changes"
Then I should not see "empty.txt"
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" filemanager
And I press "Save changes"
And I should not see "Delete me"
And I follow "Manage private files..."
And I should not see "Delete me" in the "Manage private files" "dialogue"
@javascript
Scenario: Delete a file and a folder using bulk functionality (individually)
Given I log in as "admin"
And I follow "Private files"
And I follow "Manage private files..."
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I create "Delete me later" folder in "Files" filemanager
And 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 "OK" "button" in the "Confirm" "dialogue"
Then I should not see "empty.txt"
But I should see "Delete me later"
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"
Then I should not see "empty.txt"
But I should see "Delete me later"
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 "OK" "button" in the "Confirm" "dialogue"
Then I should not see "Delete me later"
Then I should not see "Delete me later" in the "Manage private files" "dialogue"
When I press "Save changes"
Then I should not see "Delete me later"
And I follow "Manage private files..."
Then I should not see "Delete me later" in the "Manage private files" "dialogue"
@javascript
Scenario: Delete a file and a folder using bulk functionality (multiple)
Given I log in as "admin"
And I follow "Private files"
And I follow "Manage private files..."
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I create "Delete me" folder in "Files" filemanager
And I create "Do not delete me" folder in "Files" filemanager
And 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 "OK" "button" in the "Confirm" "dialogue"
Then I should not see "Delete me"
And I should not see "empty.txt"
But I should see "Do not delete me"
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"
Then I should not see "Delete me"
And I should not see "empty.txt"
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 homepage
Then I should not see "Delete me" in the "Private files" "block"
And I should not see "empty.txt" in the "Private files" "block"
@@ -70,11 +78,12 @@ Feature: Delete files and folders from the file manager
@javascript
Scenario: Delete files using the select all checkbox
Given I log in as "admin"
And I follow "Private files"
And I follow "Manage private files..."
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager
And I create "Delete me" folder in "Files" filemanager
And I create "Delete me too" folder in "Files" filemanager
And 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:
@@ -84,12 +93,13 @@ Feature: Delete files and folders from the file manager
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 "OK" "button" in the "Confirm" "dialogue"
Then I should not see "Delete me"
And I should not see "empty.txt"
And I should not see "Delete me too"
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"
Then I should not see "Delete me"
And I should not see "empty.txt"
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 homepage
Then I should not see "Delete me" in the "Private files" "block"
And I should not see "empty.txt" in the "Private files" "block"
+2 -1
View File
@@ -2,6 +2,7 @@
"features": [
"lib/tests/behat/action_menu.feature",
"blocks/tests/behat/hide_blocks.feature",
"blocks/tests/behat/move_blocks.feature"
"blocks/tests/behat/move_blocks.feature",
"repository/upload/tests/behat/upload_file.feature"
]
}