Skip to content

Commit

Permalink
Merge pull request #6162 from owncloud/enh/refactor-feature-file
Browse files Browse the repository at this point in the history
[tests-only]Refactor feature files to add correct description
  • Loading branch information
phil-davis authored May 4, 2023
2 parents 33d9be3 + 7a195ea commit 6400151
Show file tree
Hide file tree
Showing 18 changed files with 207 additions and 156 deletions.
140 changes: 70 additions & 70 deletions tests/acceptance/expected-failures-API-on-OCIS-storage.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: capabilities
As an admin
I want to list the capabilities
So that I can know what capabilities are available

Background:
Given using OCS API version "1"
Expand Down Expand Up @@ -210,7 +213,7 @@ Feature: capabilities
"""

@smokeTest
Scenario: getting default capabilities with admin user
Scenario: getting default capabilities with version string with admin user
When the administrator retrieves the capabilities using the capabilities API
Then the ocs JSON data of the response should match
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: default capabilities for normal user
As a user
I want to list capabilities
So that I can make sure what capabilities are available to me

Background:
Given using OCS API version "1"
Expand Down
19 changes: 11 additions & 8 deletions tests/acceptance/features/coreApiFavorites/favorites.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api
Feature: favorite
As a user
I want to favorite resources
So that I can access them quickly

Background:
Given using OCS API version "1"
Expand All @@ -14,7 +17,7 @@ Feature: favorite
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"

@issue-1263
Scenario Outline: Favorite a folder
Scenario Outline: favorite a folder
Given using <dav_version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
Then the HTTP status code should be "207"
Expand All @@ -35,7 +38,7 @@ Feature: favorite
| spaces |

@issue-1263
Scenario Outline: Unfavorite a folder
Scenario Outline: unfavorite a folder
Given using <dav_version> DAV path
And user "Alice" has favorited element "/FOLDER"
When user "Alice" unfavorites element "/FOLDER" using the WebDAV API
Expand All @@ -57,7 +60,7 @@ Feature: favorite
| spaces |

@smokeTest @issue-1263
Scenario Outline: Favorite a file
Scenario Outline: favorite a file
Given using <dav_version> DAV path
When user "Alice" favorites element "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "207"
Expand All @@ -78,7 +81,7 @@ Feature: favorite
| spaces |

@smokeTest @issue-1263
Scenario Outline: Unfavorite a file
Scenario Outline: unfavorite a file
Given using <dav_version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
When user "Alice" unfavorites element "/textfile0.txt" using the WebDAV API
Expand All @@ -100,7 +103,7 @@ Feature: favorite
| spaces |

@smokeTest
Scenario Outline: Get favorited elements of a folder
Scenario Outline: get favorited elements of a folder
Given using <dav_version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
And user "Alice" favorites element "/textfile0.txt" using the WebDAV API
Expand All @@ -121,7 +124,7 @@ Feature: favorite
| spaces |


Scenario Outline: Get favorited elements of a subfolder
Scenario Outline: get favorited elements of a subfolder
Given using <dav_version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile0.txt"
Expand All @@ -148,7 +151,7 @@ Feature: favorite
| spaces |


Scenario Outline: Get favorited elements and limit count of entries
Scenario Outline: get favorited elements and limit count of entries
Given using <dav_version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
And user "Alice" has favorited element "/textfile1.txt"
Expand All @@ -173,7 +176,7 @@ Feature: favorite
| spaces |


Scenario Outline: Get favorited elements paginated in subfolder
Scenario Outline: get favorited elements paginated in subfolder
Given using <dav_version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile0.txt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: favorite
As a user
I want to favorite the shared resources
So that I can access them quickly

Background:
Given auto-accept shares has been disabled
Expand Down
43 changes: 23 additions & 20 deletions tests/acceptance/features/coreApiMain/checksums.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@api
Feature: checksums
As a user
I want to upload files with checksum
So that I can make sure that the files are uploaded with correct checksums

Background:
Given user "Alice" has been created with default attributes and without skeleton files

Scenario Outline: Uploading a file with checksum should work
Scenario Outline: uploading a file with checksum should work
Given using <dav_version> DAV path
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" using the WebDAV API
Then the HTTP status code should be "201"
Expand All @@ -19,7 +22,7 @@ Feature: checksums
| spaces |

@smokeTest @issue-1291
Scenario Outline: Uploading a file with checksum should return the checksum in the propfind
Scenario Outline: uploading a file with checksum should return the checksum in the propfind
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" requests the checksum of "/myChecksumFile.txt" via propfind
Expand All @@ -35,7 +38,7 @@ Feature: checksums
| spaces |

@smokeTest @issue-1316
Scenario Outline: Uploading a file with checksum should return the checksum in the download header
Scenario Outline: uploading a file with checksum should return the checksum in the download header
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" downloads file "/myChecksumFile.txt" using the WebDAV API
Expand All @@ -52,7 +55,7 @@ Feature: checksums
| spaces |

@issue-1291
Scenario Outline: Moving a file with checksum should return the checksum in the propfind
Scenario Outline: moving a file with checksum should return the checksum in the propfind
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" moves file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" using the WebDAV API
Expand All @@ -69,7 +72,7 @@ Feature: checksums
| spaces |

@issue-1316
Scenario Outline: Downloading a file with checksum should return the checksum in the download header
Scenario Outline: downloading a file with checksum should return the checksum in the download header
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
And user "Alice" has moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt"
Expand All @@ -87,7 +90,7 @@ Feature: checksums
| spaces |

@issue-1291
Scenario Outline: Uploading a chunked file with checksum should return the checksum in the propfind
Scenario Outline: uploading a chunked file with checksum should return the checksum in the propfind
Given using <dav_version> DAV path
And user "Alice" has uploaded chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e"
And user "Alice" has uploaded chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e"
Expand All @@ -105,7 +108,7 @@ Feature: checksums
| spaces |

@issue-1343
Scenario Outline: Uploading a chunked file with checksum should return the checksum in the download header
Scenario Outline: uploading a chunked file with checksum should return the checksum in the download header
Given using <dav_version> DAV path
And user "Alice" has uploaded chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e"
And user "Alice" has uploaded chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e"
Expand All @@ -123,7 +126,7 @@ Feature: checksums
| spaces |


Scenario Outline: Moving file with checksum should return the checksum in the download header
Scenario Outline: moving file with checksum should return the checksum in the download header
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" moves file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" using the WebDAV API
Expand All @@ -141,7 +144,7 @@ Feature: checksums
| spaces |

@issue-1291
Scenario Outline: Copying a file with checksum should return the checksum in the propfind using new DAV path
Scenario Outline: copying a file with checksum should return the checksum in the propfind using new DAV path
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" copies file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" using the WebDAV API
Expand All @@ -157,7 +160,7 @@ Feature: checksums
| spaces |

@issue-1316
Scenario Outline: Copying file with checksum should return the checksum in the download header using new DAV path
Scenario Outline: copying file with checksum should return the checksum in the download header using new DAV path
Given using <dav_version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a"
When user "Alice" copies file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" using the WebDAV API
Expand All @@ -173,7 +176,7 @@ Feature: checksums
| spaces |

@files_sharing-app-required @issue-1291
Scenario Outline: Sharing a file with checksum should return the checksum in the propfind using new DAV path
Scenario Outline: sharing a file with checksum should return the checksum in the propfind using new DAV path
Given auto-accept shares has been disabled
And using <dav_version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -188,7 +191,7 @@ Feature: checksums
| new |

@files_sharing-app-required @issue-1291 @skipOnOcV10
Scenario Outline: Modifying a shared file should return correct checksum in the propfind using new DAV path
Scenario Outline: modifying a shared file should return correct checksum in the propfind using new DAV path
Given auto-accept shares has been disabled
And using <dav_version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -203,7 +206,7 @@ Feature: checksums
| new | SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399 MD5:56e57920c3c8c727bfe7a5288cdf61c4 ADLER32:1048035a |

@issue-1315
Scenario Outline: Upload a file where checksum does not match
Scenario Outline: upload a file where checksum does not match
Given using <dav_version> DAV path
When user "Alice" uploads file with checksum "SHA1:f005ba11" and content "Some Text" to "/chksumtst.txt" using the WebDAV API
Then the HTTP status code should be "400"
Expand All @@ -220,7 +223,7 @@ Feature: checksums
| spaces |


Scenario Outline: Upload a file where checksum does match
Scenario Outline: upload a file where checksum does match
Given using <dav_version> DAV path
When user "Alice" uploads file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/chksumtst.txt" using the WebDAV API
Then the HTTP status code should be "201"
Expand All @@ -235,7 +238,7 @@ Feature: checksums
| spaces |

@issue-1315
Scenario Outline: Uploaded file should have the same checksum when downloaded
Scenario Outline: uploaded file should have the same checksum when downloaded
Given using <dav_version> DAV path
And user "Alice" has uploaded file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/chksumtst.txt"
When user "Alice" downloads file "/chksumtst.txt" using the WebDAV API
Expand All @@ -255,7 +258,7 @@ Feature: checksums

## Validation Plugin or Old Endpoint Specific
@issue-1343
Scenario Outline: Uploading an old method chunked file with checksum should fail using new DAV path
Scenario Outline: uploading an old method chunked file with checksum should fail using new DAV path
Given using <dav_version> DAV path
When user "Alice" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e" using the WebDAV API
Then the HTTP status code should be "503"
Expand All @@ -272,7 +275,7 @@ Feature: checksums

## upload overwriting
@issue-1291
Scenario Outline: Uploading a file with MD5 checksum overwriting an existing file
Scenario Outline: uploading a file with MD5 checksum overwriting an existing file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "some data" to "textfile0.txt"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" using the WebDAV API
Expand All @@ -295,7 +298,7 @@ Feature: checksums
| spaces |

@issue-1291
Scenario Outline: Uploading a file with SHA1 checksum overwriting an existing file
Scenario Outline: uploading a file with SHA1 checksum overwriting an existing file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "some data" to "textfile0.txt"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" with checksum "SHA1:3ee962b839762adb0ad8ba6023a4690be478de6f" using the WebDAV API
Expand All @@ -318,7 +321,7 @@ Feature: checksums
| spaces |

@skipOnStorage:ceph @skipOnStorage:scality @files_primary_s3-issue-224 @issue-1291
Scenario Outline: Uploading a file with invalid SHA1 checksum overwriting an existing file
Scenario Outline: uploading a file with invalid SHA1 checksum overwriting an existing file
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" with checksum "SHA1:f005ba11f005ba11f005ba11f005ba11f005ba11" using the WebDAV API
Expand All @@ -336,7 +339,7 @@ Feature: checksums
| spaces |

@issue-1296
Scenario Outline: Uploading a file with checksum should work for file with special characters
Scenario Outline: uploading a file with checksum should work for file with special characters
Given using <dav_version> DAV path
When user "Alice" uploads file "filesForUpload/textfile.txt" to <renamed_file> with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" using the WebDAV API
Then the HTTP status code should be "201"
Expand Down
5 changes: 4 additions & 1 deletion tests/acceptance/features/coreApiMain/main.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api
Feature: Other tests related to api
Feature: get robots.txt
As a user
I want to get file robots.txt
So that I can check its content

@issue-1314
Scenario: robots.txt file should be accessible
Expand Down
3 changes: 3 additions & 0 deletions tests/acceptance/features/coreApiMain/status.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api
Feature: Status
As a admin
I want to check status of the server
So that I can ensure that the server is working

@smokeTest
Scenario: Status.php is correct
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: Sharing resources with different case names with the sharee and checking the coexistence of resources on sharee/receivers side
As a user
I want to share resources with case sensitive names
So that I can make sure that the shares aren't case sensitive

Background:
Given auto-accept shares has been disabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: resources shared with the same name are received with unique names
As a user
I want to share resources with same name
So that I can make sure the naming is handled properly by the server

Background:
Given auto-accept shares has been disabled
Expand All @@ -21,5 +24,5 @@ Feature: resources shared with the same name are received with unique names
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on all endpoints should be "200"
And user "Carol" should see the following elements
| Shares/foo/ |
| /Shares/foo (1)/ |
| Shares/foo/ |
| /Shares/foo (1)/ |
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
@api @files_sharing-app-required @issue-1327
Feature: shares are received in the default folder for received shares
As a user
I want to share the default Shares folder
So that I can make sure it does not work

Background:
Given auto-accept shares has been disabled
And user "Alice" has been created with default attributes and without skeleton files


Scenario Outline: Do not allow sharing of the entire share_folder
Scenario Outline: do not allow sharing of the entire share folder
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
@api @files_sharing-app-required
Feature: sharing works when a username and group name are the same
As a user
I want to share resources with group and users having same name
So that I can make sure that the sharing works

Background:
Given auto-accept shares has been disabled
Expand Down
Loading

0 comments on commit 6400151

Please sign in to comment.