[full-ci] [tests-only] Use sharing-ng in given steps for sharing (#9221)

* resharing.feature: Used sharingNG for sharing in given step

* unlockFiles.feature: Used sharingNG for sharing in given step

* apiSpacesShares suite: Used sharingNG for sharing in given step

* acceptShares.feature: Used sharingNG for sharing in given step

* uploadFile.feature: Used sharingNG for sharing in given step

* coreApiWebdavUploadTUS suite: Used sharingNG for sharing in given step

* tag.feature: Used sharingNG for sharing in given step

* coreApiShareOperationsToShares2 suite: Used sharingNG for sharing in given step

* updateShare.feature: Used sharingNG for sharing in given step

* Fixed line numbers in expected failure
This commit is contained in:
Prarup Gurung
2024-05-22 13:01:54 +05:45
committed by GitHub
parent bac37771e2
commit 23800a6b09
19 changed files with 373 additions and 303 deletions
@@ -56,52 +56,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | update,read |
| shareWith | grp1 |
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "3"
Examples:
| dav-path-version |
| old |
| new |
@skipOnReva @issue-2213
Scenario Outline: check webdav share-permissions for received file with edit permissions but no reshare permissions
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has sent the following resource share invitation:
| resource | tmp.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | update,read |
Then the HTTP status code should be "200"
And as user "Brian" file "/Shares/tmp.txt" should contain a property "ocs:share-permissions" with value "3"
Examples:
| dav-path-version |
| old |
| new |
@issue-2213
Scenario Outline: check webdav share-permissions for received group shared file with edit permissions but no reshare permissions
Given using <dav-path-version> DAV path
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | update,read |
| shareWith | grp1 |
| resource | tmp.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -122,27 +82,6 @@ Feature: sharing
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | read |
Then the HTTP status code should be "200"
And as user "Brian" file "/Shares/tmp.txt" should contain a property "ocs:share-permissions" with value "1"
Examples:
| dav-path-version |
| old |
| new |
Scenario Outline: check webdav share-permissions for received group shared file with reshare permissions but no edit permissions
Given using <dav-path-version> DAV path
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has uploaded file with content "foo" to "/tmp.txt"
And user "Alice" has created a share with settings
| path | /tmp.txt |
| shareType | group |
| permissions | read |
| shareWith | grp1 |
When user "Brian" gets the following properties of file "/Shares/tmp.txt" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -198,10 +137,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | tmp |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
@@ -238,16 +179,17 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | tmp |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
When user "Alice" updates the last share using the sharing API with
| permissions | delete,create,read |
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "13"
Then the HTTP status code should be "200"
And as user "Brian" folder "/Shares/tmp" should contain a property "ocs:share-permissions" with value "13"
Examples:
| dav-path-version |
| old |
@@ -279,16 +221,17 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | tmp |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
When user "Alice" updates the last share using the sharing API with
| permissions | delete,update,read |
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "11"
Then the HTTP status code should be "200"
And as user "Brian" folder "/Shares/tmp" should contain a property "ocs:share-permissions" with value "11"
Examples:
| dav-path-version |
| old |
@@ -320,57 +263,17 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | create,update,read |
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "7"
Examples:
| dav-path-version |
| old |
| new |
@skipOnReva
Scenario Outline: check webdav share-permissions for received folder with all permissions but share
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | tmp |
| space | Personal |
| sharee | Brian |
| shareType | user |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And using SharingNG
When user "Alice" updates the last share using the sharing API with
| permissions | change |
| permissions | create,update,read |
Then the HTTP status code should be "200"
And as user "Brian" folder "/Shares/tmp" should contain a property "ocs:share-permissions" with value "15"
Examples:
| dav-path-version |
| old |
| new |
Scenario Outline: check webdav share-permissions for received group shared folder with all permissions but share
Given using <dav-path-version> DAV path
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/tmp"
And user "Alice" has created a share with settings
| path | tmp |
| shareType | group |
| shareWith | grp1 |
| permissions | change |
When user "Brian" gets the following properties of folder "/Shares/tmp" using the WebDAV API
| propertyName |
| ocs:share-permissions |
Then the HTTP status code should be "207"
And the single response should contain a property "ocs:share-permissions" with value "15"
And as user "Brian" folder "/Shares/tmp" should contain a property "ocs:share-permissions" with value "7"
Examples:
| dav-path-version |
| old |
@@ -11,11 +11,12 @@ Feature: sharing
Scenario: uploading file to a user read-only share folder does not work
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | read |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -27,11 +28,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | read |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -45,11 +47,12 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -72,11 +75,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Uploader |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
@@ -97,11 +101,12 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -122,11 +127,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | change |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile.txt" for user "Alice" should be:
@@ -172,11 +178,12 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | change |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -193,11 +200,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | change |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -212,11 +220,12 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | create |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -233,11 +242,12 @@ Feature: sharing
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | group |
| permissions | create |
| shareWith | grp1 |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Uploader |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
@@ -252,19 +262,20 @@ Feature: sharing
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a share with settings
| path | FOLDER |
| shareType | user |
| permissions | <permissions> |
| shareWith | Brian |
And user "Alice" has sent the following resource share invitation:
| resource | FOLDER |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Brian" uploads file with content "some content" to "/Shares/FOLDER/textFile.txt" using the WebDAV API
And user "Alice" downloads file "/FOLDER/textFile.txt" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded content should be "some content"
Examples:
| dav-path-version | permissions |
| old | change |
| new | create |
| dav-path-version | permissions-role |
| old | Editor |
| new | Uploader |
Scenario Outline: upload an empty file (size zero byte) to a shared folder
@@ -273,10 +284,10 @@ Feature: sharing
And user "Brian" has created folder "/folder-to-share"
And user "Brian" has sent the following resource share invitation:
| resource | folder-to-share |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
When user "Alice" uploads file "filesForUpload/zerobyte.txt" to "/Shares/folder-to-share/zerobyte.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/Shares/folder-to-share/zerobyte.txt" should exist