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,75 @@
@api @files_sharing-app-required
Feature: sharing
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
@smokeTest
Scenario Outline: Sharee can see the share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last share_id should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest
Scenario Outline: Sharee can see the filtered share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile1.txt" using the provisioning API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last share_id should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest @issue-ocis-reva-260
Scenario Outline: Sharee can't see the share that is filtered out
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has shared file "textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile0.txt" using the provisioning API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last share id should not be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest @issue-ocis-reva-34 @issue-ocis-reva-194
Scenario Outline: Sharee can see the group share
Given using OCS API version "<ocs_api_version>"
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 "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last share_id should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,119 @@
@api @files_sharing-app-required @notToImplementOnOCIS
Feature: write directly into the folder for received shares
On ownCloud10 with the folder for received shares set, for example, to "Shares"
A user should see a "Shares" folder when they have received a share.
A user should be able to add their own resources into the "Shares" folder
and those resources will act like any resource that is local to the user.
Even if the user has no more received shares, the "Shares" folder is still there.
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
Scenario: the Shares folder does not exist before the first share is received
Then as "Alice" folder "/Shares" should not exist
And as "Brian" folder "/Shares" should not exist
Scenario: the Shares folder does not exist if no share has been accepted
Given user "Alice" has created folder "/shared"
When user "Alice" shares folder "/shared" with user "Brian" using the sharing API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And as "Brian" folder "/Shares" should not exist
And as "Alice" folder "/Shares" should not exist
Scenario: the Shares folder exists for the sharee after a share is accepted
Given user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
When user "Brian" accepts share "/shared" offered by user "Alice" using the sharing API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And as "Brian" folder "/Shares" should exist
But as "Alice" folder "/Shares" should not exist
Scenario: the Shares folder exists after a share is received, accepted and deleted
Given user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
When user "Alice" deletes the last share using the sharing API
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And as "Brian" folder "/Shares" should exist
But as "Alice" folder "/Shares" should not exist
Scenario: the Shares folder can be created first by the user
Given user "Alice" has created folder "/shared"
When user "Brian" creates folder "/Shares" using the WebDAV API
And user "Brian" creates folder "/Shares/aFolder" using the WebDAV API
And user "Alice" shares folder "/shared" with user "Brian" using the sharing API
And user "Brian" accepts share "/shared" offered by user "Alice" using the sharing API
# OCS status code is available only for the Sharing API request
Then the OCS status code of responses on all endpoints should be "100"
And the HTTP status code of responses on each endpoint should be "201, 201, 200, 200" respectively
And as "Brian" folder "/Shares" should exist
And as "Brian" folder "/Shares/shared" should exist
Scenario: the user can have created a matching resource in Shares before receiving a share
Given user "Alice" has created folder "/shared"
And user "Alice" has uploaded file with content "shared data" to "/shared/aFile.txt"
And user "Brian" has created folder "/Shares"
And user "Brian" has created folder "/Shares/shared"
And user "Brian" has uploaded file with content "data of Brian" to "/Shares/shared/aFile.txt"
When user "Alice" shares folder "/shared" with user "Brian" using the sharing API
And user "Brian" accepts share "/shared" offered by user "Alice" using the sharing API
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 as "Brian" folder "/Shares" should exist
And as "Brian" folder "/Shares/shared" should exist
And as "Brian" folder "/Shares/shared (2)" should exist
And the content of file "/Shares/shared/aFile.txt" for user "Brian" should be "data of Brian"
And the content of file "/Shares/shared (2)/aFile.txt" for user "Brian" should be "shared data"
Scenario: the user can write directly into the Shares folder
Given user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
When user "Brian" uploads file with content "some data" to "/Shares/textfile.txt" using the WebDAV API
And user "Brian" creates folder "/Shares/aFolder" using the WebDAV API
And user "Brian" uploads file with content "more data" to "/Shares/aFolder/aFile.txt" using the WebDAV API
Then the HTTP status code of responses on all endpoints should be "201"
And as "Brian" file "/Shares/textfile.txt" should exist
And the content of file "/Shares/textfile.txt" for user "Brian" should be "some data"
And as "Brian" file "/Shares/aFolder/aFile.txt" should exist
And the content of file "Shares/aFolder/aFile.txt" for user "Brian" should be "more data"
Scenario: the user can move files directly into the Shares folder
Given user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has uploaded file with content "some data" to "/textfile.txt"
When user "Brian" moves file "/textfile.txt" to "/Shares/textfile.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/textfile.txt" should exist
And the content of file "Shares/textfile.txt" for user "Brian" should be "some data"
Scenario: the user can delete files that they wrote into the Shares folder
Given user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has uploaded file with content "some data" to "/Shares/textfile.txt"
And user "Brian" has created folder "/Shares/aFolder"
When user "Brian" deletes file "/Shares/textfile.txt" using the WebDAV API
And user "Brian" deletes folder "/Shares/aFolder" using the WebDAV API
Then the HTTP status code of responses on all endpoints should be "204"
And as "Brian" folder "/Shares" should exist
But as "Brian" file "/Shares/textfile.txt" should not exist
And as "Brian" folder "/Shares/aFolder" should not exist
@@ -0,0 +1,149 @@
@api @files_sharing-app-required @issue-ocis-1289 @issue-ocis-1328
Feature: sharing
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
@smokeTest
Scenario Outline: moving a file into a share as recipient
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
When user "Brian" moves file "textfile0.txt" to "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/shared/shared_file.txt" should exist
And as "Alice" file "/shared/shared_file.txt" should exist
Examples:
| dav_version |
| old |
| new |
@smokeTest @files_trashbin-app-required @notToImplementOnOCIS
Scenario Outline: moving a file out of a share as recipient creates a backup for the owner
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has shared file "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has moved folder "/Shares/shared" to "/shared_renamed"
When user "Brian" moves file "/shared_renamed/shared_file.txt" to "/taken_out.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/taken_out.txt" should exist
And as "Alice" file "/shared/shared_file.txt" should not exist
And as "Alice" file "/shared_file.txt" should exist in the trashbin
Examples:
| dav_version |
| old |
| new |
@files_trashbin-app-required @notToImplementOnOCIS
Scenario Outline: moving a folder out of a share as recipient creates a backup for the owner
Given using <dav_version> DAV path
And user "Alice" has created folder "/shared"
And user "Alice" has created folder "/shared/sub"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
And user "Alice" has shared file "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Alice"
And user "Brian" has moved folder "/Shares/shared" to "/shared_renamed"
When user "Brian" moves folder "/shared_renamed/sub" to "/taken_out" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" folder "/taken_out" should exist
And as "Alice" folder "/shared/sub" should not exist
And as "Alice" folder "/sub" should exist in the trashbin
And as "Alice" file "/sub/shared_file.txt" should exist in the trashbin
Examples:
| dav_version |
| old |
| new |
Scenario Outline: Move files between shares by same user
Given using <dav_version> DAV path
And user "Alice" has created folder "share1"
And user "Alice" has created folder "share2"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has moved file "textfile0.txt" to "share1/textfile0.txt"
And user "Alice" has shared folder "/share1" with user "Brian"
And user "Alice" has shared folder "/share2" with user "Brian"
And user "Brian" has accepted share "/share1" offered by user "Alice"
And user "Brian" has accepted share "/share2" offered by user "Alice"
When user "Brian" moves file "/Shares/share1/textfile0.txt" to "/Shares/share2/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/share1/textfile0.txt" should not exist
But as "Brian" file "/Shares/share2/textfile0.txt" should exist
And as "Alice" file "share1/textfile0.txt" should not exist
But as "Alice" file "share2/textfile0.txt" should exist
Examples:
| dav_version |
| old |
| new |
Scenario Outline: Move files between shares by same user added by sharee
Given using <dav_version> DAV path
And user "Alice" has created folder "share1"
And user "Alice" has created folder "share2"
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared folder "/share1" with user "Brian"
And user "Alice" has shared folder "/share2" with user "Brian"
And user "Brian" has accepted share "/share1" offered by user "Alice"
And user "Brian" has accepted share "/share2" offered by user "Alice"
When user "Brian" moves file "textfile0.txt" to "/Shares/share1/shared_file.txt" using the WebDAV API
And user "Brian" moves file "/Shares/share1/shared_file.txt" to "/Shares/share2/shared_file.txt" using the WebDAV API
Then the HTTP status code of responses on all endpoints should be "201"
And as "Brian" file "/Shares/share1/shared_file.txt" should not exist
And as "Alice" file "share1/shared_file.txt" should not exist
But as "Brian" file "/Shares/share2/shared_file.txt" should exist
And as "Alice" file "share2/shared_file.txt" should exist
Examples:
| dav_version |
| old |
| new |
Scenario Outline: Move files between shares by different users
Given using <dav_version> DAV path
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has created folder "/PARENT"
And user "Brian" has created folder "/PARENT"
And user "Alice" has moved file "textfile0.txt" to "PARENT/shared_file.txt"
And user "Alice" has shared folder "/PARENT" with user "Carol"
And user "Brian" has shared folder "/PARENT" with user "Carol"
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Brian"
When user "Carol" moves file "/Shares/PARENT/shared_file.txt" to "/Shares/PARENT (2)/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Carol" file "/Shares/PARENT (2)/shared_file.txt" should exist
And as "Brian" file "PARENT/shared_file.txt" should exist
But as "Alice" file "PARENT/shared_file.txt" should not exist
Examples:
| dav_version |
| old |
| new |
Scenario Outline: overwrite a received file share
Given using <dav_version> DAV path
And user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt"
And user "Alice" has shared file "/textfile1.txt" with user "Brian"
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice"
When user "Brian" uploads file with content "this is a new content" to "/Shares/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" file "Shares/textfile1.txt" should exist
And the content of file "Shares/textfile1.txt" for user "Brian" should be "this is a new content"
And the content of file "textfile1.txt" for user "Alice" should be "this is a new content"
Examples:
| dav_version |
| old |
| new |
@@ -0,0 +1,222 @@
@api @files_sharing-app-required
Feature: sharing
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
@smokeTest @issue-ocis-reva-262
Scenario Outline: getting all shares of a user using that user
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/file_to_share.txt"
And user "Alice" has shared file "file_to_share.txt" with user "Brian"
And user "Brian" has accepted share "/file_to_share.txt" offered by user "Alice"
When user "Alice" gets all shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And file "/Shares/file_to_share.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@issue-ocis-reva-65
Scenario Outline: getting all shares of a user using another user
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
When the administrator gets all shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And file "/Shares/textfile0.txt" should not be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest
Scenario Outline: getting all shares of a file
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
| username |
| Carol |
| David |
And user "Alice" has uploaded file with content "some data" 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 "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Carol" has accepted share "/textfile0.txt" offered by user "Alice"
When user "Alice" gets all the shares from the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And user "Brian" should be included in the response
And user "Carol" should be included in the response
And user "David" should not be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest
Scenario Outline: getting all shares of a file with reshares
Given using OCS API version "<ocs_api_version>"
And these users have been created with default attributes and without skeleton files:
| username |
| Carol |
| David |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Brian" has shared file "/Shares/textfile0.txt" with user "Carol"
And user "Carol" has accepted share "/textfile0.txt" offered by user "Brian"
When user "Alice" gets all the shares with reshares from the file "textfile0.txt" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And user "Brian" should be included in the response
And user "Carol" should be included in the response
And user "David" should not be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest
Scenario Outline: User's own shares reshared to him don't appear when getting "shared with me" shares
Given using OCS API version "<ocs_api_version>"
And group "grp1" has been created
And user "Carol" has been created with default attributes and without skeleton files
And user "Carol" has been added to group "grp1"
And user "Carol" has created folder "/shared"
And user "Carol" has uploaded file with content "some data" to "/shared/shared_file.txt"
And user "Carol" has shared folder "/shared" with user "Brian"
And user "Brian" has accepted share "/shared" offered by user "Carol"
And user "Brian" has shared folder "/Shares/shared" with group "grp1"
# no need to accept this share as it is Carol's file
When user "Carol" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And the last share id should not be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest @toFixOnOCIS @issue-ocis-reva-357 @issue-ocis-reva-301 @issue-ocis-reva-302
#after fixing all the issues merge this scenario with the one below
Scenario Outline: getting share info of a share
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/file_to_share.txt"
And user "Alice" has shared file "file_to_share.txt" with user "Brian"
And user "Brian" has accepted share "/file_to_share.txt" offered by user "Alice"
When user "Alice" gets the info of 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"
And the fields of the last response to user "Alice" sharing with user "Brian" should include
| id | A_STRING |
| item_type | file |
| item_source | A_STRING |
| share_type | user |
| share_with | %username% |
| file_source | A_STRING |
| file_target | /Shares/file_to_share.txt |
| path | /file_to_share.txt |
| permissions | share,read,update |
| stime | A_NUMBER |
| storage | A_STRING |
| mail_send | 0 |
| uid_owner | %username% |
| share_with_displayname | %displayname% |
| displayname_owner | %displayname% |
| mimetype | text/plain |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@smokeTest @toFixOnOCIS @issue-ocis-reva-357 @issue-ocis-reva-301 @issue-ocis-reva-302
#after fixing all the issues merge this scenario with the one above
Scenario Outline: getting share info of a share (Bug demonstration for ocis)
Given using OCS API version "<ocs_api_version>"
And user "Alice" has uploaded file with content "some data" to "/file_to_share.txt"
And user "Alice" has shared file "file_to_share.txt" with user "Brian"
And user "Brian" has accepted share "/file_to_share.txt" offered by user "Alice"
When user "Alice" gets the info of 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"
And the fields of the last response to user "Alice" sharing with user "Brian" should include
| id | A_STRING |
| item_type | file |
| item_source | A_STRING |
| share_type | user |
| share_with | %username% |
| file_source | A_STRING |
| file_target | /Shares/file_to_share.txt |
| path | /file_to_share.txt |
| permissions | share,read,update |
| stime | A_NUMBER |
| storage | A_STRING |
| mail_send | 0 |
| uid_owner | %username% |
# | share_with_displayname | %displayname% |
# | displayname_owner | %displayname% |
# | mimetype | text/plain |
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@issue-ocis-reva-374
Scenario Outline: Get a share with a user that didn't receive the share
Given using OCS API version "<ocs_api_version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
When user "Carol" gets the info of the last share using the sharing API
Then the OCS status code should be "404"
And the HTTP status code should be "<http_status_code>"
Examples:
| ocs_api_version | http_status_code |
| 1 | 200 |
| 2 | 404 |
@skipOnLDAP @issue-ocis-reva-194 @skipOnGraph
Scenario: Share of folder to a group, remove user from that group
Given using OCS API version "1"
And user "Carol" has been created with default attributes and without skeleton files
And group "group0" has been created
And user "Brian" has been added to group "group0"
And user "Carol" has been added to group "group0"
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared folder "/PARENT" with group "group0"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
And user "Carol" has accepted share "/PARENT" offered by user "Alice"
When the administrator removes user "Carol" from group "group0" using the provisioning API
Then the HTTP status code should be "200"
And user "Brian" should see the following elements
| /Shares/PARENT/ |
| /Shares/PARENT/parent.txt |
But user "Carol" should not see the following elements
| /Shares/PARENT/ |
| /Shares/PARENT/parent.txt |
@issue-ocis-reva-372
Scenario Outline: getting all the shares inside the folder
Given using OCS API version "<ocs_api_version>"
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has shared file "PARENT/parent.txt" with user "Brian"
And user "Brian" has accepted share "<pending_share_path>" offered by user "Alice"
When user "Alice" gets all the shares inside the folder "PARENT" using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And file "/Shares/parent.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code | pending_share_path |
| 1 | 100 | /parent.txt |
| 2 | 200 | /parent.txt |
@@ -0,0 +1,59 @@
@api @files_sharing-app-required
Feature: get the pending shares filtered by type (user, group etc)
As a user
I want to be able to know the pending shares that I have received of a particular type (user, group etc)
So that I can reduce the amount of data that has to be transferred to be just the data that I need
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
And user "Alice" has created folder "/folderToShareWithPublic"
And user "Alice" has uploaded file with content "file to share with user" to "/fileToShareWithUser.txt"
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
Scenario Outline: getting pending shares received from users
Given using OCS API version "<ocs_api_version>"
When user "Brian" gets the pending user shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 1 file or folder should be included in the response
And folder "/Shares/folderToShareWithUser" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting pending shares received from groups
Given using OCS API version "<ocs_api_version>"
When user "Brian" gets the pending group shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 1 file or folder should be included in the response
And folder "/Shares/folderToShareWithGroup" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,63 @@
@api @files_sharing-app-required
Feature: get the received shares filtered by type (user, group etc)
As a user
I want to be able to know the shares that I have received of a particular type (user, group etc)
So that I can reduce the amount of data that has to be transferred to be just the data that I need
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
And user "Alice" has created folder "/folderToShareWithPublic"
And user "Alice" has uploaded file with content "file to share with user" to "/fileToShareWithUser.txt"
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
Scenario Outline: getting shares received from users
Given using OCS API version "<ocs_api_version>"
When user "Brian" gets the user shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 2 files or folders should be included in the response
And folder "/Shares/folderToShareWithUser" should be included in the response
And file "/Shares/fileToShareWithUser.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares received from groups
Given using OCS API version "<ocs_api_version>"
When user "Brian" gets the group shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 2 files or folders should be included in the response
And folder "/Shares/folderToShareWithGroup" should be included in the response
And folder "/Shares/fileToShareWithGroup.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,94 @@
@api @files_sharing-app-required
Feature: get the received shares filtered by type (user, group etc)
As a user
I want to be able to know the shares that I have received of a particular type (user, group etc)
So that I can reduce the amount of data that has to be transferred to be just the data that I need
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
And user "Alice" has created folder "/folderToShareWithPublic"
And user "Alice" has uploaded file with content "file to share with user" to "/fileToShareWithUser.txt"
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
Scenario Outline: getting shares received from users when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
When user "Brian" gets the user shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares received from groups when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
When user "Brian" gets the group shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares received from public links when there are none
# Note: public links are purposely created in this scenario
# users do not receive public links, so asking for a list of public links
# that are "shared with me" should always return an empty list.
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
When user "Brian" gets the public link shares shared with him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,93 @@
@api @files_sharing-app-required
Feature: get shares filtered by type (user, group etc)
As a user
I want to be able to know the shares that I have made of a particular type (user, group etc)
So that I can reduce the amount of data that has to be transferred to be just the data that I need
Background:
Given the administrator has set the default folder for received shares to "Shares"
And auto-accept shares has been disabled
And these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
And user "Alice" has created folder "/folderToShareWithPublic"
And user "Alice" has uploaded file with content "file to share with user" to "/fileToShareWithUser.txt"
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
Scenario Outline: getting shares shared to users
Given using OCS API version "<ocs_api_version>"
When user "Alice" gets the user shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 2 files or folders should be included in the response
And folder "/Shares/folderToShareWithUser" should be included in the response
And file "/Shares/fileToShareWithUser.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares shared to groups
Given using OCS API version "<ocs_api_version>"
When user "Alice" gets the group shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 2 files or folders should be included in the response
And folder "/Shares/folderToShareWithGroup" should be included in the response
And folder "/Shares/fileToShareWithGroup.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares shared to public links
Given using OCS API version "<ocs_api_version>"
When user "Alice" gets the public link shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 2 files or folders should be included in the response
And folder "/folderToShareWithPublic" should be included in the response
And folder "/fileToShareWithPublic.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares shared to users and groups
Given using OCS API version "<ocs_api_version>"
When user "Alice" gets the user and group shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And exactly 4 files or folders should be included in the response
And folder "/Shares/folderToShareWithUser" should be included in the response
And file "/Shares/fileToShareWithUser.txt" should be included in the response
And folder "/Shares/folderToShareWithGroup" should be included in the response
And folder "/Shares/fileToShareWithGroup.txt" should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
@@ -0,0 +1,83 @@
@api @files_sharing-app-required
Feature: get shares filtered by type (user, group etc)
As a user
I want to be able to know the shares that I have made of a particular type (user, group etc)
So that I can reduce the amount of data that has to be transferred to be just the data that I need
Background:
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has created folder "/folderToShareWithUser"
And user "Alice" has created folder "/folderToShareWithGroup"
And user "Alice" has created folder "/folderToShareWithPublic"
And user "Alice" has uploaded file with content "file to share with user" to "/fileToShareWithUser.txt"
And user "Alice" has uploaded file with content "file to share with group" to "/fileToShareWithGroup.txt"
And user "Alice" has uploaded file with content "file to share with public" to "/fileToShareWithPublic.txt"
Scenario Outline: getting shares shared to users when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
When user "Alice" gets the user shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares shared to groups when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /folderToShareWithPublic |
| permissions | read |
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has created a public link share with settings
| path | /fileToShareWithPublic.txt |
| permissions | read |
When user "Alice" gets the group shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: getting shares shared to public links when there are none
Given using OCS API version "<ocs_api_version>"
And user "Alice" has shared folder "/folderToShareWithUser" with user "Brian"
And user "Brian" has accepted share "/folderToShareWithUser" offered by user "Alice"
And user "Alice" has shared folder "/folderToShareWithGroup" with group "grp1"
And user "Brian" has accepted share "/folderToShareWithGroup" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithUser.txt" with user "Brian"
And user "Brian" has accepted share "/fileToShareWithUser.txt" offered by user "Alice"
And user "Alice" has shared file "/fileToShareWithGroup.txt" with group "grp1"
And user "Brian" has accepted share "/fileToShareWithGroup.txt" offered by user "Alice"
When user "Alice" gets the public link shares shared by him using the sharing API
Then the OCS status code should be "<ocs_status_code>"
And the HTTP status code should be "200"
And no files or folders should be included in the response
Examples:
| ocs_api_version | ocs_status_code |
| 1 | 100 |
| 2 | 200 |