copy feature files from core

This commit is contained in:
Saw-jan
2023-01-05 09:22:52 +05:45
committed by Phil Davis
parent 35d4cb53ae
commit c59392bc1e
336 changed files with 52903 additions and 0 deletions
@@ -0,0 +1,138 @@
@api
Feature: delete file
As a user
I want to be able to delete files
So that I can remove unwanted data
Background:
Given user "Alice" has been created with default attributes and without skeleton files
@smokeTest
Scenario Outline: delete a file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "to delete" to "/textfile0.txt"
When user "Alice" deletes file "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/textfile0.txt" should not exist
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: delete a file when 2 files exist with different case
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "to delete" to "/textfile1.txt"
And user "Alice" has uploaded file with content "uploaded content" to "/TextFile1.txt"
When user "Alice" deletes file "/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/textfile1.txt" should not exist
And as "Alice" file "/TextFile1.txt" should exist
And the content of file "/TextFile1.txt" for user "Alice" should be "uploaded content"
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario Outline: delete file from folder with dots in the path
Given using <dav_version> DAV path
And user "Alice" has created folder "<folder_name>"
And user "Alice" has uploaded file with content "uploaded content for file name with dots" to "<folder_name>/<file_name>"
When user "Alice" deletes file "<folder_name>/<file_name>" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "<folder_name>/<file_name>" should not exist
Examples:
| dav_version | folder_name | file_name |
| old | /upload. | abc. |
| old | /upload. | abc . |
| old | /upload.1 | abc.txt |
| old | /upload...1.. | abc...txt.. |
| old | /... | ... |
| old | /..upload | abc |
| old | /..upload | ..abc |
| new | /upload. | abc. |
| new | /upload. | abc . |
| new | /upload.1 | abc.txt |
| new | /upload...1.. | abc...txt.. |
| new | /... | ... |
| new | /..upload | abc |
| new | /..upload | ..abc |
@skipOnOcV10 @personalSpace
Examples:
| dav_version | folder_name | file_name |
| spaces | /upload. | abc. |
| spaces | /upload...1.. | abc...txt.. |
| spaces | /upload.1 | abc.txt |
| spaces | /upload. | abc . |
| spaces | /... | ... |
| spaces | /..upload | abc |
| spaces | /..upload | ...abc |
Scenario Outline: delete a file with comma in the filename
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "file with comma in filename" to <filename>
When user "Alice" deletes file <filename> using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file <filename> should not exist
Examples:
| dav_version | filename |
| old | "sample,1.txt" |
| old | ",,,.txt" |
| old | ",,,.," |
| new | "sample,1.txt" |
| new | ",,,.txt" |
| new | ",,,.," |
@skipOnOcV10 @personalSpace
Examples:
| dav_version | filename |
| spaces | "sample,1.txt" |
| spaces | ",,,.txt" |
| spaces | ",,,.," |
Scenario Outline: delete a hidden file
Given using <dav_version> DAV path
And user "Alice" has created folder "/FOLDER"
And user "Alice" has uploaded the following files with content "hidden file"
| path |
| .hidden_file |
| /FOLDER/.hidden_file |
When user "Alice" deletes the following files
| path |
| .hidden_file |
| /FOLDER/.hidden_file |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the following files should not exist
| path |
| .hidden_file |
| /FOLDER/.hidden_file |
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
Scenario: delete a file of size zero byte
Given user "Alice" has uploaded file "filesForUpload/zerobyte.txt" to "/zerobyte.txt"
When user "Alice" deletes file "/zerobyte.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/zerobyte.txt" should not exist
@@ -0,0 +1,142 @@
@api
Feature: delete folder
As a user
I want to be able to delete folders
So that I can quickly remove unwanted data
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And user "Alice" creates folder "/PARENT" using the WebDAV API
@smokeTest
Scenario Outline: delete a folder
Given using <dav_version> DAV path
When user "Alice" deletes folder "/PARENT" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/PARENT" should not exist
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
@issue-ocis-reva-269
Scenario Outline: delete a folder when 2 folder exist with different case
Given using <dav_version> DAV path
And user "Alice" has created folder "/parent"
When user "Alice" deletes folder "/PARENT" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/PARENT" should not exist
But as "Alice" folder "/parent" should exist
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
@issue-ocis-reva-269
Scenario Outline: delete a sub-folder
Given using <dav_version> DAV path
And user "Alice" has created folder "/PARENT/CHILD"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/PARENT/parent.txt"
When user "Alice" deletes folder "/PARENT/CHILD" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/PARENT/CHILD" should not exist
But as "Alice" folder "/PARENT" should exist
And as "Alice" file "/PARENT/parent.txt" should exist
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |
@files_sharing-app-required @notToImplementOnOCIS
Scenario Outline: delete a folder when there is a default folder for received shares
Given using <dav_version> DAV path
And the administrator has set the default folder for received shares to "<share_folder>"
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/Received"
And user "Brian" has created folder "/Top"
And user "Brian" has created folder "/Top/ReceivedShares"
And user "Alice" has shared folder "/PARENT" with user "Brian"
When user "Brian" deletes folder "<share_folder>" using the WebDAV API
Then the HTTP status code should be "403"
And as "Brian" folder "<share_folder>/PARENT" should exist
And user "Brian" should be able to delete folder "/Received"
And user "Brian" should be able to delete folder "/Top/ReceivedShares"
And user "Brian" should be able to delete folder "/Top"
Examples:
| dav_version | share_folder |
| old | ReceivedShares |
| old | /ReceivedShares |
| new | ReceivedShares |
| new | /ReceivedShares |
@files_sharing-app-required @notToImplementOnOCIS
Scenario Outline: delete a folder when there is a default folder for received shares that is a multi-level path
Given using <dav_version> DAV path
And the administrator has set the default folder for received shares to "/My/Received/Shares"
And user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created folder "/M"
And user "Brian" has created folder "/Received"
And user "Brian" has created folder "/Received/Shares"
And user "Alice" has shared folder "/PARENT" with user "Brian"
When user "Brian" deletes folder "/My/Received/Shares" using the WebDAV API
Then the HTTP status code should be "403"
And user "Brian" should not be able to delete folder "/My/Received"
And user "Brian" should not be able to delete folder "/My"
And as "Brian" folder "/My/Received/Shares/PARENT" should exist
But user "Brian" should be able to delete folder "/M"
And user "Brian" should be able to delete folder "/Received/Shares"
And user "Brian" should be able to delete folder "/Received"
Examples:
| dav_version |
| old |
| new |
Scenario Outline: deleting folder with dot in the name
Given using <dav_version> DAV path
And user "Alice" has created folder "<folder_name>"
When user "Alice" deletes folder "<folder_name>" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "<folder_name>" should not exist
Examples:
| dav_version | folder_name |
| old | /fo. |
| old | /fo.1 |
| old | /fo...1.. |
| old | /... |
| old | /..fo |
| old | /fo.xyz |
| old | /fo.exe |
| new | /fo. |
| new | /fo.1 |
| new | /fo...1.. |
| new | /... |
| new | /..fo |
| new | /fo.xyz |
| new | /fo.exe |
@skipOnOcV10 @personalSpace
Examples:
| dav_version | folder_name |
| spaces | /fo. |
| spaces | /fo.1 |
| spaces | /fo...1.. |
| spaces | /... |
| spaces | /..fo |
| spaces | /fo.xyz |
| spaces | /fo.exe |
@@ -0,0 +1,39 @@
@api
Feature: delete folder contents
As a user
I want to be able to delete all files and folders in a folder
So that I can quickly remove unwanted data
Background:
Given user "Alice" has been created with default attributes and without skeleton files
Scenario Outline: Removing everything of a folder
Given using <dav_version> DAV path
And user "Alice" has created folder "/PARENT/"
And user "Alice" has created folder "/FOLDER/"
And user "Alice" has created folder "/FOLDER/SUBFOLDER"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/textfile0.txt"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/textfile1.txt"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/FOLDER/fileToDelete.txt"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/FOLDER/SUBFOLDER/textfile0.txt"
When user "Alice" deletes everything from folder "/FOLDER/" using the WebDAV API
Then the HTTP status code should be "204"
And user "Alice" should see the following elements
| /FOLDER/ |
| /PARENT/ |
| /textfile0.txt |
| /textfile1.txt |
And user "Alice" should not see the following elements
| /FOLDER/SUBFOLDER/ |
| /FOLDER/fileToDelete.txt |
| /FOLDER/SUBFOLDER/testfile0.txt |
Examples:
| dav_version |
| old |
| new |
@skipOnOcV10 @personalSpace
Examples:
| dav_version |
| spaces |