Skip to content

Commit

Permalink
Refactored feature files to make consistent inter-scenarios space
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Oct 31, 2022
1 parent 5821d71 commit 0e4c616
Show file tree
Hide file tree
Showing 30 changed files with 136 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Feature: cannot share resources with invalid permissions
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"


Scenario Outline: Cannot create a share of a file or folder with invalid permissions
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Feature: local-storage
| Alice |
| Brian |


@skipOnEncryptionType:user-keys @encryption-issue-181
Scenario Outline: Share a file inside a local external storage
Given using OCS API version "<ocs_api_version>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Feature: sharing
Background:
Given user "Alice" has been created with default attributes and without skeleton files

@smokeTest
@skipOnEncryptionType:user-keys @issue-32322 @skipOnOcV10.8 @skipOnOcV10.9.0 @skipOnOcV10.9.1
@smokeTest @skipOnEncryptionType:user-keys @issue-32322 @skipOnOcV10.8 @skipOnOcV10.9.0 @skipOnOcV10.9.1
Scenario Outline: Creating a share of a file with a user, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -32,8 +31,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |

@smokeTest
@skipOnEncryptionType:user-keys @issue-32322
@smokeTest @skipOnEncryptionType:user-keys @issue-32322
Scenario Outline: Creating a share of a file containing commas in the filename, with a user, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -59,6 +57,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: Creating a share of a file with a user and asking for various permission combinations
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -93,6 +92,7 @@ Feature: sharing
| 1 | 2 | 2 | 100 |
| 2 | 2 | 2 | 200 |


Scenario Outline: Creating a share of a file with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -106,6 +106,7 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |


Scenario Outline: Creating a share of a folder with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -119,6 +120,7 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |


Scenario Outline: Creating a share of a folder with a user, the default permissions are all permissions(31)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -143,6 +145,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: Creating a share of a file with a group, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand All @@ -167,6 +170,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: Creating a share of a folder with a group, the default permissions are all permissions(31)
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand Down Expand Up @@ -219,6 +223,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: sharing again an own file while belonging to a group
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -235,6 +240,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: sharing subfolder of already shared folder, GET result is correct
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
Expand Down Expand Up @@ -266,6 +272,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: user shares a file with file name longer than 64 chars to another user
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -280,6 +287,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: user shares a file with file name longer than 64 chars to a group
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand All @@ -296,6 +304,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: user shares a folder with folder name longer than 64 chars to another user
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -311,6 +320,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: user shares a folder with folder name longer than 64 chars to a group
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand Down Expand Up @@ -362,6 +372,7 @@ Feature: sharing
| /randomfile.txt |
And the content of file "randomfile.txt" for user "Brian" should be "Random data"


Scenario Outline: Share of folder to a group with emoji in the name
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
Expand Down Expand Up @@ -469,6 +480,7 @@ Feature: sharing
| /common/sub/textfile0.txt |
| /textfile0.txt |


Scenario Outline: sharing back to resharer is not allowed
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
Expand All @@ -488,6 +500,7 @@ Feature: sharing
| 1 | 200 |
| 2 | 404 |


Scenario Outline: sharing back to original sharer is not allowed
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
Expand Down Expand Up @@ -529,6 +542,7 @@ Feature: sharing
| 1 | 200 |
| 2 | 404 |


Scenario Outline: shares to a deleted user should not be listed as shares for the sharer
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Feature: sharing
| Alice |
| Brian |


Scenario Outline: Delete all group shares
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand Down Expand Up @@ -36,6 +37,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario: orphaned shares
Given using OCS API version "1"
And user "Alice" has created folder "/common"
Expand Down Expand Up @@ -93,6 +95,7 @@ Feature: sharing
And the etag of element "/" of user "Brian" should have changed
And the etag of element "/PARENT" of user "Carol" should not have changed


Scenario: sharee of a read-only share folder tries to delete the shared folder
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
Expand All @@ -102,6 +105,7 @@ Feature: sharing
Then the HTTP status code should be "403"
And as "Brian" file "/shared/shared_file.txt" should exist


Scenario: sharee of a upload-only shared folder tries to delete a file in the shared folder
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
Expand All @@ -111,6 +115,7 @@ Feature: sharing
Then the HTTP status code should be "403"
And as "Alice" file "/shared/shared_file.txt" should exist


Scenario: sharee of an upload-only shared folder tries to delete their file in the folder
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
Expand All @@ -120,6 +125,7 @@ Feature: sharing
Then the HTTP status code should be "403"
And as "Alice" file "/shared/textfile.txt" should exist


Scenario Outline: A Group share recipient tries to delete the share
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand All @@ -144,6 +150,7 @@ Feature: sharing
| /PARENT | 1 | 200 | PARENT |
| /PARENT | 2 | 404 | PARENT |


Scenario Outline: An individual share recipient tries to delete the share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "PARENT"
Expand All @@ -161,6 +168,7 @@ Feature: sharing
| /PARENT | 1 | 200 | PARENT |
| /PARENT | 2 | 404 | PARENT |


Scenario Outline: delete a share with wrong authentication
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToShare.txt"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Feature: Exclude groups from receiving shares
And user "Brian" has been added to group "grp1"
And user "David" has been added to group "grp2"


Scenario Outline: user cannot share with a group that is excluded from receiving shares but can share with other groups
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "PARENT"
Expand All @@ -40,6 +41,7 @@ Feature: Exclude groups from receiving shares
| 1 | 200 |
| 2 | 403 |


Scenario Outline: exclude multiple groups from receiving shares stops the user to share with any of them
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "PARENT"
Expand Down Expand Up @@ -70,6 +72,7 @@ Feature: Exclude groups from receiving shares
| 1 | 200 |
| 2 | 403 |


Scenario Outline: user cannot reshare a received share with a group that is excluded from receiving shares but can share with other groups
Given using OCS API version "<ocs_api_version>"
And user "Carol" has created folder "PARENT"
Expand All @@ -96,6 +99,7 @@ Feature: Exclude groups from receiving shares
| 1 | 200 |
| 2 | 403 |


Scenario Outline: sharing with a user that is part of a group that is excluded from receiving shares still works
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "PARENT"
Expand All @@ -114,6 +118,7 @@ Feature: Exclude groups from receiving shares
| 1 | 100 |
| 2 | 200 |


Scenario Outline: sharing with a user that is part of a group that is excluded from receiving shares using an other group works
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "PARENT"
Expand All @@ -134,6 +139,7 @@ Feature: Exclude groups from receiving shares
| 1 | 100 |
| 2 | 200 |


Scenario Outline: a user that is part of a group that is excluded from receiving shares still can initiate shares
Given using OCS API version "<ocs_api_version>"
And user "Brian" has created folder "PARENT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Feature: local-storage
| Alice |
| Brian |


@skipOnEncryptionType:user-keys @encryption-issue-181
Scenario Outline: Share a file inside a local external storage
Given using OCS API version "<ocs_api_version>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ Feature: sharing
And auto-accept shares has been disabled
And user "Alice" has been created with default attributes and without skeleton files

@smokeTest @skipOnOcV10.8 @skipOnOcV10.9.0 @skipOnOcV10.9.1
@skipOnEncryptionType:user-keys @issue-32322
@smokeTest @skipOnOcV10.8 @skipOnOcV10.9.0 @skipOnOcV10.9.1 @skipOnEncryptionType:user-keys @issue-32322
Scenario Outline: Creating a share of a file with a user, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -37,8 +36,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |

@smokeTest @skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0
@skipOnEncryptionType:user-keys @issue-32322 @issue-ocis-2133
@smokeTest @skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0 @skipOnEncryptionType:user-keys @issue-32322 @issue-ocis-2133
Scenario Outline: Creating a share of a file containing commas in the filename, with a user, the default permissions are read(1)+update(2)+can-share(16)
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -102,6 +100,7 @@ Feature: sharing
| 1 | 2 | 2 | 100 |
| 2 | 2 | 2 | 200 |


Scenario Outline: Creating a share of a file with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand All @@ -117,6 +116,7 @@ Feature: sharing
| 1 | 200 |
| 2 | 400 |


Scenario Outline: Creating a share of a folder with no permissions should fail
Given using OCS API version "<ocs_api_version>"
And user "Brian" has been created with default attributes and without skeleton files
Expand Down Expand Up @@ -274,7 +274,6 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


@skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0
Scenario Outline: sharing again an own file while belonging to a group
Given using OCS API version "<ocs_api_version>"
Expand Down Expand Up @@ -535,7 +534,6 @@ Feature: sharing
| 1 | 100 | /textfile0.txt |
| 2 | 200 | /textfile0.txt |


@skipOnFilesClassifier @issue-files-classifier-291 @issue-ocis-2146 @skipOnOcV10.6 @skipOnOcV10.7 @skipOnOcV10.8.0
Scenario: Share a file by multiple channels and download from sub-folder and direct file share
Given these users have been created with default attributes and without skeleton files:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Feature: sharing
| Brian |
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"


Scenario Outline: Delete all group shares
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand Down Expand Up @@ -43,6 +44,7 @@ Feature: sharing
| 1 | 100 |
| 2 | 200 |


Scenario Outline: orphaned shares
Given using OCS API version "1"
And user "Alice" has created folder "/common"
Expand Down Expand Up @@ -136,6 +138,7 @@ Feature: sharing
And as "Alice" file "/shared/shared_file.txt" should exist
And as "Brian" file "/Shares/shared/shared_file.txt" should exist


Scenario: sharee of a upload-only shared folder tries to delete a file in the shared folder
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
Expand All @@ -148,6 +151,7 @@ Feature: sharing
# Note: for Brian, the file does not "exist" because he only has "create" permission, not "read"
And as "Brian" file "/Shares/shared/shared_file.txt" should not exist


Scenario: sharee of an upload-only shared folder tries to delete their file in the folder
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
Expand All @@ -160,6 +164,7 @@ Feature: sharing
# Note: for Brian, the file does not "exist" because he only has "create" permission, not "read"
And as "Brian" file "/Shares/shared/textfile.txt" should not exist


Scenario Outline: A Group share recipient tries to delete the share
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
Expand Down Expand Up @@ -195,6 +200,7 @@ Feature: sharing
| /shared | 1 | 200 | /Shares/shared | /shared |
| /shared | 2 | 404 | /Shares/shared | /shared |


Scenario Outline: An individual share recipient tries to delete the share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "/shared"
Expand Down
Loading

0 comments on commit 0e4c616

Please sign in to comment.