[tests-only][full-ci]changing given from ocs to graph in feature file (#9142)

* changing given from ocs to graph in feature file

* addressing reviews
This commit is contained in:
Sabin Panta
2024-05-16 15:34:28 +05:45
committed by GitHub
parent c6e788b3c8
commit 6284411edb
5 changed files with 202 additions and 66 deletions

View File

@@ -48,6 +48,7 @@ default:
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SpacesContext:
- FavoritesContext:
- WebDavPropertiesContext:
- SharingNgContext:
@@ -87,6 +88,7 @@ default:
context: *common_ldap_suite_context
contexts:
- FeatureContext: *common_feature_context_params
- SpacesContext:
- PublicWebDavContext:
- TrashbinContext:
- WebDavPropertiesContext:
@@ -103,6 +105,7 @@ default:
- TrashbinContext:
- WebDavPropertiesContext:
- AuthContext:
- SharingNgContext:
coreApiShareOperationsToShares1:
paths:

View File

@@ -78,15 +78,15 @@ File and sync features in a shared scenario
#### [File deletion using dav gives unique string in filename in the trashbin](https://github.com/owncloud/product/issues/178)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L58)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:71](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L71)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:75](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L75)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:93](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L93)
cannot share a folder with create permission
#### [Resource with share permission create is readable for sharee](https://github.com/owncloud/ocis/issues/4524)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:118](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L118)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:130](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L130)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:155](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L155)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:172](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L172)
#### [Public link enforce permissions](https://github.com/owncloud/ocis/issues/1269)
@@ -141,15 +141,11 @@ cannot share a folder with create permission
- [coreApiShareUpdateToShares/updateShare.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L161)
- [coreApiShareUpdateToShares/updateShare.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareUpdateToShares/updateShare.feature#L162)
#### [Share lists deleted user as 'user'](https://github.com/owncloud/ocis/issues/903)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:544](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L544)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:545](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L545)
#### [deleting a share with wrong authentication returns OCS status 996 / HTTP 500](https://github.com/owncloud/ocis/issues/1229)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:207](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L207)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:208](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L208)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:277](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L277)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:278](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L278)
### Other
@@ -252,8 +248,8 @@ And other missing implementation of favorites
#### [Sharing a same file twice to the same group](https://github.com/owncloud/ocis/issues/1710)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:588](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L588)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:589](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L589)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:650](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L650)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:651](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L651)
#### [PATCH request for TUS upload with wrong checksum gives incorrect response](https://github.com/owncloud/ocis/issues/1755)
@@ -321,8 +317,8 @@ And other missing implementation of favorites
#### [Shares to deleted group listed in the response](https://github.com/owncloud/ocis/issues/2441)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:470](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L470)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:471](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L471)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:502](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L502)
- [coreApiShareManagementBasicToShares/createShareToSharesFolder.feature:503](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/createShareToSharesFolder.feature#L503)
#### [copying the file inside Shares folder returns 404](https://github.com/owncloud/ocis/issues/3874)
@@ -376,14 +372,14 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers
- [coreApiShareManagementToShares/acceptShares.feature:457](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementToShares/acceptShares.feature#L457)
- [coreApiShareOperationsToShares2/shareAccessByID.feature:119](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L119)
- [coreApiShareOperationsToShares2/shareAccessByID.feature:120](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareOperationsToShares2/shareAccessByID.feature#L120)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L161)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L162)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:163](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L163)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:164](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L164)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:179](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L179)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:180](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L180)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:181](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L181)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:182](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L182)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:213](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L213)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:214](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L214)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:215](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L215)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:216](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L216)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:237](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L237)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:238](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L238)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:239](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L239)
- [coreApiShareManagementBasicToShares/deleteShareFromShares.feature:240](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiShareManagementBasicToShares/deleteShareFromShares.feature#L240)
#### [Content-type is not multipart/byteranges when downloading file with Range Header](https://github.com/owncloud/ocis/issues/2677)

View File

@@ -1690,9 +1690,9 @@ trait Sharing {
$shareId = (string) $this->getLastCreatedPublicShare()->id;
} else {
if ($sharer === null) {
$shareId = $this->getLastCreatedUserGroupShareId();
$shareId = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedUserGroupShareID() : $this->getLastCreatedUserGroupShareId();
} else {
$shareId = $this->getLastCreatedUserGroupShareId($sharer);
$shareId = ($this->isUsingSharingNG()) ? $this->shareNgGetLastCreatedUserGroupShareID() : $this->getLastCreatedUserGroupShareId($sharer);
}
}
$url = $this->getSharesEndpointPath("/$shareId");

View File

@@ -255,8 +255,13 @@ Feature: sharing
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has uploaded file with content "ownCloud test text file 0" to "/randomfile.txt"
And user "Brian" has shared file "randomfile.txt" with group "grp1"
And user "Brian" has deleted the last share
And user "Brian" has sent the following resource share invitation:
| resource | randomfile.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has removed the access of group "grp1" from resource "randomfile.txt" of space "Personal"
When user "Brian" shares file "/randomfile.txt" with group "grp1" using the sharing API
And as "Alice" file "/Shares/randomfile.txt" should exist
@@ -270,11 +275,31 @@ Feature: sharing
| David |
| Emily |
And user "Alice" has created folder "/folder1"
And user "Alice" has shared folder "/folder1" with user "Brian"
And user "Alice" has shared folder "/folder1" with user "Carol"
And user "Alice" has sent the following resource share invitation:
| resource | folder1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | folder1 |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has created folder "/folder1/folder2"
And user "Alice" has shared folder "/folder1/folder2" with user "David"
And user "Alice" has shared folder "/folder1/folder2" with user "Emily"
And user "Alice" has sent the following resource share invitation:
| resource | folder1/folder2 |
| space | Personal |
| sharee | David |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | folder1/folder2 |
| space | Personal |
| sharee | Emily |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" sends HTTP method "GET" to OCS API endpoint "/apps/files_sharing/api/v1/shares"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -370,15 +395,17 @@ Feature: sharing
And the content of file "Shares/randomfile.txt" for user "brian" should be "Random data"
Scenario: creating a new share with user of a group when username contains capital letters
Scenario: creating a new share with user of a group when group name contains capital letters
Given these users have been created with default attributes and without skeleton files:
| username |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And group "GROUP" has been created
And user "Brian" has been added to group "GROUP"
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
And user "Alice" has shared file "randomfile.txt" with group "grp1"
Then user "Brian" should see the following elements
When user "Alice" shares file "randomfile.txt" with group "GROUP" using the sharing API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And user "Brian" should see the following elements
| /Shares/randomfile.txt |
And the content of file "/Shares/randomfile.txt" for user "Brian" should be "Random data"
@@ -447,7 +474,12 @@ Feature: sharing
And user "Brian" has been added to group "grp1"
And user "Carol" has been added to group "grp1"
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has shared file "/textfile0.txt" with group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
When user "Alice" sends HTTP method "GET" to OCS API endpoint "/apps/files_sharing/api/v1/shares"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -482,8 +514,18 @@ Feature: sharing
And user "Alice" has created folder "/common"
And user "Alice" has created folder "/common/sub"
And user "Alice" has uploaded file with content "ownCloud" to "/textfile0.txt"
And user "Alice" has shared folder "common" with group "grp1"
And user "Alice" has shared file "textfile0.txt" with user "Carol"
And user "Alice" has sent the following resource share invitation:
| resource | common |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | File Editor |
And user "Alice" has moved file "/textfile0.txt" to "/common/textfile0.txt"
And user "Alice" has moved file "/common/textfile0.txt" to "/common/sub/textfile0.txt"
When user "Carol" uploads file "filesForUpload/file_to_overwrite.txt" to "/Shares/textfile0.txt" using the WebDAV API
@@ -531,8 +573,18 @@ Feature: sharing
| Brian |
| Carol |
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile0.txt" with user "Carol"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has been deleted
When user "Alice" gets all the shares of the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs-status-code>"
@@ -550,7 +602,12 @@ Feature: sharing
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/Folder1"
And user "Alice" has created folder "/Folder2"
And user "Alice" has shared folder "/Folder1" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | Folder1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has moved file "/Folder2" to "/renamedFolder2"
When user "Alice" shares folder "/renamedFolder2" with user "Brian" using the sharing API
Then the OCS status code should be "<ocs-status-code>"
@@ -578,7 +635,12 @@ Feature: sharing
Given using OCS API version "<ocs-api-version>"
And group "grp1" has been created
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
When user "Alice" shares file "textfile0.txt" with group "grp1" using the sharing API
Then the HTTP status code should be "<http-status>"
And the OCS status code should be "403"

View File

@@ -14,9 +14,15 @@ Feature: sharing
@issue-7555
Scenario Outline: delete all group shares
Given using OCS API version "<ocs-api-version>"
And using SharingNG
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has shared file "textfile0.txt" with group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
And user "Brian" has moved file "/Shares/textfile0.txt" to "/Shares/anotherName.txt"
When user "Alice" deletes the last share using the sharing API
Then the OCS status code should be "<ocs-status-code>"
@@ -32,7 +38,13 @@ Feature: sharing
@smokeTest
Scenario Outline: delete a share
Given using OCS API version "<ocs-api-version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" deletes the last share using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -48,7 +60,12 @@ Feature: sharing
Given using OCS API version "1"
And user "Alice" has created folder "/common"
And user "Alice" has created folder "/common/sub"
And user "Alice" has shared folder "/common/sub" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | /common/sub |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Alice" deletes folder "/common" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" folder "/Shares/sub" should not exist
@@ -59,7 +76,12 @@ Feature: sharing
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" deletes file "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" file "/Shares/shared/shared_file.txt" should not exist
@@ -73,7 +95,12 @@ Feature: sharing
And user "Alice" has created folder "/shared"
And user "Alice" has created folder "/shared/sub"
And user "Alice" has moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
When user "Brian" deletes folder "/Shares/shared/sub" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" folder "/Shares/shared/sub" should not exist
@@ -93,7 +120,12 @@ Feature: sharing
And user "Carol" has been added to group "grp1"
And user "Carol" has created folder "PARENT"
And user "Carol" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Carol" has shared file "/PARENT/parent.txt" with group "grp1"
And user "Carol" has sent the following resource share invitation:
| resource | /PARENT/parent.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Carol" has stored etag of element "/PARENT"
And user "Brian" has stored etag of element "/"
And user "Brian" has stored etag of element "/Shares"
@@ -108,7 +140,12 @@ Feature: sharing
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared folder "shared" with user "Brian" with permissions "read"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" deletes file "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/shared/shared_file.txt" should exist
@@ -119,7 +156,12 @@ Feature: sharing
Given using OCS API version "1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared folder "shared" with user "Brian" with permissions "create"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
When user "Brian" deletes file "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/shared/shared_file.txt" should exist
@@ -130,7 +172,12 @@ Feature: sharing
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"
And user "Alice" has shared folder "shared" with user "Brian" with permissions "create"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Uploader |
And user "Brian" has uploaded file "filesForUpload/textfile.txt" to "/Shares/shared/textfile.txt"
When user "Brian" deletes file "/Shares/shared/textfile.txt" using the WebDAV API
Then the HTTP status code should be "403"
@@ -149,7 +196,12 @@ Feature: sharing
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared entry "<entry-to-share>" with group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | <entry-to-share> |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | <permission-role> |
When user "Brian" deletes the last share of user "Alice" using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http-status-code>"
@@ -157,34 +209,46 @@ Feature: sharing
And as "Brian" entry "<received-entry>" should exist
And as "Carol" entry "<received-entry>" should exist
Examples:
| entry-to-share | ocs-api-version | http-status-code | received-entry |
| /shared/shared_file.txt | 1 | 200 | /Shares/shared_file.txt |
| /shared/shared_file.txt | 2 | 404 | /Shares/shared_file.txt |
| /shared | 1 | 200 | /Shares/shared |
| /shared | 2 | 404 | /Shares/shared |
| entry-to-share | permission-role | ocs-api-version | http-status-code | received-entry |
| /shared/shared_file.txt | File Editor | 1 | 200 | /Shares/shared_file.txt |
| /shared/shared_file.txt | File Editor | 2 | 404 | /Shares/shared_file.txt |
| /shared | Editor | 1 | 200 | /Shares/shared |
| /shared | Editor | 2 | 404 | /Shares/shared |
Scenario Outline: individual share recipient tries to delete the share
Given using OCS API version "<ocs-api-version>"
And using SharingNG
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared entry "<entry-to-share>" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | <entry-to-share> |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permission-role> |
When user "Brian" deletes the last share of user "Alice" using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http-status-code>"
And as "Alice" entry "<entry-to-share>" should exist
And as "Brian" entry "<received-entry>" should exist
Examples:
| entry-to-share | ocs-api-version | http-status-code | received-entry |
| /shared/shared_file.txt | 1 | 200 | /Shares/shared_file.txt |
| /shared/shared_file.txt | 2 | 404 | /Shares/shared_file.txt |
| /shared | 1 | 200 | /Shares/shared |
| /shared | 2 | 404 | /Shares/shared |
| entry-to-share | permission-role | ocs-api-version | http-status-code | received-entry |
| /shared/shared_file.txt | File Editor | 1 | 200 | /Shares/shared_file.txt |
| /shared/shared_file.txt | File Editor | 2 | 404 | /Shares/shared_file.txt |
| /shared | Editor | 1 | 200 | /Shares/shared |
| /shared | Editor | 2 | 404 | /Shares/shared |
@issue-720
Scenario Outline: request PROPFIND after sharer deletes the collaborator
Given using OCS API version "<ocs-api-version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Alice" deletes the last share using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -198,7 +262,13 @@ Feature: sharing
@issue-1229
Scenario Outline: delete a share with wrong authentication
Given using OCS API version "<ocs-api-version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And using SharingNG
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Brian" tries to delete the last share of user "Alice" using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http-status-code>"
@@ -210,7 +280,12 @@ Feature: sharing
Scenario Outline: unshare a shared resources
Given using OCS API version "<ocs-api-version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
When user "Alice" unshares file "textfile0.txt" shared to "Brian"
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"