Initial QSfera import
This commit is contained in:
@@ -0,0 +1,236 @@
|
||||
@env-config
|
||||
Feature: copying from public link share
|
||||
As a user
|
||||
I want to make a copy of a resource within a public link
|
||||
So that I can have a backup
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
And user "Alice" has created folder "/PARENT"
|
||||
And the config "OC_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" has been set to "false"
|
||||
|
||||
@issue-10331
|
||||
Scenario: copy file within a public link folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And as "Alice" file "/PARENT/copy1.txt" should exist
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/copy1.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-10331
|
||||
Scenario: copy folder within a public link folder
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/testFolder-copy" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
And as "Alice" folder "/PARENT/testFolder-copy" should exist
|
||||
And the content of file "/PARENT/testFolder/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/testFolder-copy/testfile.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-10331
|
||||
Scenario: copy file within a public link folder to a new folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/testFolder"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/testFolder/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And as "Alice" file "/PARENT/testFolder/copy1.txt" should exist
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/testFolder/copy1.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-10331
|
||||
Scenario: copy file within a public link folder to existing file
|
||||
Given user "Alice" has uploaded file with content "some data 0" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And as "Alice" file "/PARENT/copy1.txt" should exist
|
||||
And the content of file "/PARENT/copy1.txt" for user "Alice" should be "some data 0"
|
||||
|
||||
@issue-1232 @issue-10331
|
||||
Scenario: copy folder within a public link folder to existing file
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/copy1.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
And the content of file "/PARENT/copy1.txt/testfile.txt" for user "Alice" should be "some data"
|
||||
But as "Alice" file "/PARENT/copy1.txt" should not exist
|
||||
And as "Alice" file "/copy1.txt" should exist in the trashbin
|
||||
|
||||
@issue-10331
|
||||
Scenario: copy file within a public link folder and delete file
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/copy1.txt" using the public WebDAV API
|
||||
And user "Alice" deletes file "/PARENT/copy1.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as "Alice" file "/PARENT/copy1.txt" should not exist
|
||||
|
||||
@issue-1232 @issue-10331
|
||||
Scenario: copy file within a public link folder to existing folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/new-folder"
|
||||
And user "Alice" has uploaded file with content "some data 1" to "/PARENT/new-folder/testfile1.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/new-folder" using the public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/new-folder" for user "Alice" should be "some data"
|
||||
And as "Alice" folder "/PARENT/new-folder" should not exist
|
||||
And as "Alice" folder "new-folder" should exist in the trashbin
|
||||
|
||||
@issue-10331
|
||||
Scenario Outline: copy file with special characters in it's name within a public link folder
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/<file-name>"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/<file-name>" to "/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/<file-name>" should exist
|
||||
And as "Alice" file "/PARENT/copy1.txt" should exist
|
||||
And the content of file "/PARENT/<file-name>" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/copy1.txt" for user "Alice" should be "some data"
|
||||
Examples:
|
||||
| file-name |
|
||||
| नेपाली.txt |
|
||||
| strängé file.txt |
|
||||
| C++ file.cpp |
|
||||
| sample,1.txt |
|
||||
|
||||
@issue-10331
|
||||
Scenario Outline: copy file within a public link folder to a file with special characters in it's name
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/<destination-file-name>" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And as "Alice" file "/PARENT/<destination-file-name>" should exist
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/<destination-file-name>" for user "Alice" should be "some data"
|
||||
Examples:
|
||||
| destination-file-name |
|
||||
| नेपाली.txt |
|
||||
| strängé file.txt |
|
||||
| C++ file.cpp |
|
||||
| sample,1.txt |
|
||||
|
||||
@issue-10331
|
||||
Scenario Outline: copy file within a public link folder into a folder with special characters
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And user "Alice" has created folder "/PARENT/<destination-folder-name>"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/<destination-folder-name>/copy1.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And as "Alice" file "/PARENT/<destination-folder-name>/copy1.txt" should exist
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
And the content of file "/PARENT/<destination-folder-name>/copy1.txt" for user "Alice" should be "some data"
|
||||
Examples:
|
||||
| destination-folder-name |
|
||||
| नेपाली.txt |
|
||||
| strängé file.txt |
|
||||
| C++ file.cpp |
|
||||
| sample,1.txt |
|
||||
|
||||
@issue-8711 @issue-10331
|
||||
Scenario: copy file within a public link folder to a same file
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/testfile.txt" using the public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-8711 @issue-10331
|
||||
Scenario: copy folder within a public link folder to a same folder
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/testFolder" using the public WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
And the content of file "/PARENT/testFolder/testfile.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-1230 @issue-10331
|
||||
Scenario: copy file within a public link folder to a share item root
|
||||
Given user "Alice" has uploaded file with content "some data" to "/PARENT/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies file "/testfile.txt" to "/" using the public WebDAV API
|
||||
Then the HTTP status code should be "409"
|
||||
And as "Alice" file "/PARENT/testfile.txt" should exist
|
||||
And the content of file "/PARENT/testfile.txt" for user "Alice" should be "some data"
|
||||
|
||||
@issue-1230 @issue-10331
|
||||
Scenario: copy folder within a public link folder to a share item root
|
||||
Given user "Alice" has created folder "/PARENT/testFolder"
|
||||
And user "Alice" has uploaded file with content "some data" to "/PARENT/testFolder/testfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public copies folder "/testFolder" to "/" using the public WebDAV API
|
||||
Then the HTTP status code should be "409"
|
||||
And as "Alice" folder "/PARENT/testFolder" should exist
|
||||
And the content of file "/PARENT/testFolder/testfile.txt" for user "Alice" should be "some data"
|
||||
@@ -0,0 +1,248 @@
|
||||
@skipOnReva
|
||||
Feature: multi-link sharing
|
||||
As a user
|
||||
I want to create multiple public links for a single resource
|
||||
So that I can share them with various permissions and/or different groups of people
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
|
||||
@smokeTest
|
||||
Scenario Outline: creating three public shares of a folder
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | read |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And as user "Alice" the public shares of folder "/FOLDER" should be
|
||||
| path | permissions | name |
|
||||
| /FOLDER | 15 | sharedlink2 |
|
||||
| /FOLDER | 15 | sharedlink1 |
|
||||
| /FOLDER | 1 | sharedlink3 |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: creating three public shares of a file
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | read |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And as user "Alice" the public shares of file "/textfile0.txt" should be
|
||||
| path | permissions | name |
|
||||
| /textfile0.txt | 1 | sharedlink2 |
|
||||
| /textfile0.txt | 1 | sharedlink1 |
|
||||
| /textfile0.txt | 1 | sharedlink3 |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: check that updating password doesn't remove name of links
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| password | New-StronPass1 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And as user "Alice" the public shares of folder "/FOLDER" should be
|
||||
| path | permissions | name |
|
||||
| /FOLDER | 15 | sharedlink2 |
|
||||
| /FOLDER | 15 | sharedlink1 |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: deleting a file also deletes its public links
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has deleted file "/textfile0.txt"
|
||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as user "Alice" the file "/textfile0.txt" should not have any shares
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario Outline: deleting one public link share of a file doesn't affect the rest
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink3 |
|
||||
| password | %public% |
|
||||
When user "Alice" deletes public link share named "sharedlink2" in 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 as user "Alice" the public shares of file "/textfile0.txt" should be
|
||||
| path | permissions | name |
|
||||
| /textfile0.txt | 1 | sharedlink1 |
|
||||
| /textfile0.txt | 1 | sharedlink3 |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: overwriting a file doesn't remove its public shares
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile0.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile0.txt" using the WebDAV API
|
||||
Then the HTTP status code should be "204"
|
||||
And as user "Alice" the public shares of file "/textfile0.txt" should be
|
||||
| path | permissions | name |
|
||||
| /textfile0.txt | 1 | sharedlink1 |
|
||||
| /textfile0.txt | 1 | sharedlink2 |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
@issue-1251
|
||||
Scenario Outline: renaming a folder doesn't remove its public shares
|
||||
Given using OCS API version "1"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink1 |
|
||||
| password | %public% |
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| expirationDateTime | +3 days |
|
||||
| displayName | sharedlink2 |
|
||||
| password | %public% |
|
||||
When user "Alice" moves folder "/FOLDER" to "/FOLDER_RENAMED" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And as user "Alice" the public shares of file "/FOLDER_RENAMED" should be
|
||||
| path | permissions | name |
|
||||
| /FOLDER_RENAMED | 15 | sharedlink1 |
|
||||
| /FOLDER_RENAMED | 15 | sharedlink2 |
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
+393
@@ -0,0 +1,393 @@
|
||||
@skipOnReva
|
||||
Feature: update a public link share
|
||||
As a user
|
||||
I want to update a public link
|
||||
So that I change permissions whenever I want
|
||||
|
||||
Background:
|
||||
Given using OCS API version "1"
|
||||
And user "Alice" has been created with default attributes
|
||||
|
||||
|
||||
Scenario Outline: change expiration date of a public link share and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| expireDate | 2040-01-01T23:59:59+0100 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the OCS status message should be "OK"
|
||||
And the HTTP status code should be "200"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| id | A_STRING |
|
||||
| share_type | public_link |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| permissions | read |
|
||||
| stime | A_NUMBER |
|
||||
| parent | |
|
||||
| expiration | A_STRING |
|
||||
| token | A_STRING |
|
||||
| uid_file_owner | %username% |
|
||||
| displayname_file_owner | %displayname% |
|
||||
| additional_info_owner | %emailaddress% |
|
||||
| additional_info_file_owner | %emailaddress% |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| path | /FOLDER |
|
||||
| mimetype | httpd/unix-directory |
|
||||
| storage_id | A_STRING |
|
||||
| storage | A_NUMBER |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| mail_send | 0 |
|
||||
| name | |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
@smokeTest
|
||||
Scenario Outline: change expiration date of a newly created public link share and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| expirationDateTime | 2033-01-31T23:59:59.000Z |
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read |
|
||||
| stime | A_NUMBER |
|
||||
| expiration | 2033-01-31 |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
@issue-9724 @issue-10331
|
||||
Scenario Outline: creating a new public link share with password and adding an expiration date using public API
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has uploaded file with content "Random data" to "/randomfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | randomfile.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| expireDate | 2040-01-01T23:59:59+0100 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
And the public should be able to download file "randomfile.txt" from the last link share with password "%public%" and the content should be "Random data"
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: creating a new public link share, updating its password and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has set the following password for the last link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| password | %public% |
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: creating a new public link share, updating its permissions and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read,update,create,delete |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: creating a new public link share, updating its permissions to view download and upload and getting its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | upload |
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| share_type | public_link |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /FOLDER |
|
||||
| permissions | read,create |
|
||||
| stime | A_NUMBER |
|
||||
| token | A_TOKEN |
|
||||
| storage | A_STRING |
|
||||
| mail_send | 0 |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| url | AN_URL |
|
||||
| mimetype | httpd/unix-directory |
|
||||
Examples:
|
||||
| ocs-api-version | ocs-status-code |
|
||||
| 1 | 100 |
|
||||
| 2 | 200 |
|
||||
|
||||
@issue-1269 @issue-9724 @issue-10331
|
||||
Scenario Outline: updating share permissions from change to read restricts public from deleting files using the public API
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "PARENT"
|
||||
And user "Alice" has created folder "PARENT/CHILD"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/CHILD/child.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
When the public deletes file "CHILD/child.txt" from the last link share with password "%public%" using the public WebDAV API
|
||||
Then the HTTP status code of responses on all endpoints should be "403"
|
||||
And as "Alice" file "PARENT/CHILD/child.txt" should exist
|
||||
Examples:
|
||||
| ocs-api-version |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
@issue-9724 @issue-10331
|
||||
Scenario Outline: updating share permissions from read to change allows public to delete files using the public API
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And user "Alice" has created folder "PARENT"
|
||||
And user "Alice" has created folder "PARENT/CHILD"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/parent.txt"
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/CHILD/child.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has updated the last resource link share with
|
||||
| resource | PARENT |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
When the public deletes file "CHILD/child.txt" from the last link share with password "%public%" using the public WebDAV API
|
||||
And the public deletes file "parent.txt" from the last link share with password "%public%" using the public WebDAV API
|
||||
Then the HTTP status code of responses on all endpoints should be "204"
|
||||
And as "Alice" file "PARENT/CHILD/child.txt" should not exist
|
||||
And as "Alice" file "PARENT/parent.txt" should not exist
|
||||
Examples:
|
||||
| ocs-api-version |
|
||||
| 1 |
|
||||
| 2 |
|
||||
|
||||
|
||||
Scenario Outline: rename a folder with public link and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has moved folder "/FOLDER" to "/RENAMED_FOLDER"
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| share_type | public_link |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| permissions | read |
|
||||
| stime | A_NUMBER |
|
||||
| parent | |
|
||||
| expiration | |
|
||||
| token | A_STRING |
|
||||
| uid_file_owner | %username% |
|
||||
| displayname_file_owner | %displayname% |
|
||||
| item_type | folder |
|
||||
| item_source | A_STRING |
|
||||
| path | /RENAMED_FOLDER |
|
||||
| mimetype | httpd/unix-directory |
|
||||
| storage_id | A_STRING |
|
||||
| storage | A_STRING |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /RENAMED_FOLDER |
|
||||
| mail_send | 0 |
|
||||
| name | |
|
||||
Examples:
|
||||
| dav-path-version | ocs-api-version | ocs-status-code |
|
||||
| old | 1 | 100 |
|
||||
| old | 2 | 200 |
|
||||
| new | 1 | 100 |
|
||||
| new | 2 | 200 |
|
||||
| spaces | 1 | 100 |
|
||||
| spaces | 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: rename a file with public link and get its info
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "some content" to "/lorem.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | lorem.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
And user "Alice" has moved file "/lorem.txt" to "/new-lorem.txt"
|
||||
When user "Alice" gets the info of the last public link 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" should include
|
||||
| id | A_STRING |
|
||||
| share_type | public_link |
|
||||
| uid_owner | %username% |
|
||||
| displayname_owner | %displayname% |
|
||||
| permissions | read |
|
||||
| stime | A_NUMBER |
|
||||
| parent | |
|
||||
| expiration | |
|
||||
| token | A_STRING |
|
||||
| uid_file_owner | %username% |
|
||||
| displayname_file_owner | %displayname% |
|
||||
| item_type | file |
|
||||
| item_source | A_STRING |
|
||||
| path | /new-lorem.txt |
|
||||
| mimetype | text/plain |
|
||||
| storage_id | A_STRING |
|
||||
| storage | A_STRING |
|
||||
| file_source | A_STRING |
|
||||
| file_target | /new-lorem.txt |
|
||||
| mail_send | 0 |
|
||||
| name | |
|
||||
Examples:
|
||||
| dav-path-version | ocs-api-version | ocs-status-code |
|
||||
| old | 1 | 100 |
|
||||
| old | 2 | 200 |
|
||||
| new | 1 | 100 |
|
||||
| new | 2 | 200 |
|
||||
| spaces | 1 | 100 |
|
||||
| spaces | 2 | 200 |
|
||||
|
||||
|
||||
Scenario Outline: update the role of a public link to internal
|
||||
Given using OCS API version "<ocs-api-version>"
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile.txt"
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | textfile.txt |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When user "Alice" updates the last public link share using the sharing API with
|
||||
| permissions | 0 |
|
||||
Then the OCS status code should be "<ocs-status-code>"
|
||||
And the HTTP status code should be "200"
|
||||
Examples:
|
||||
| dav-path-version | ocs-api-version | ocs-status-code |
|
||||
| old | 1 | 100 |
|
||||
| old | 2 | 200 |
|
||||
| new | 1 | 100 |
|
||||
| new | 2 | 200 |
|
||||
| spaces | 1 | 100 |
|
||||
| spaces | 2 | 200 |
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
@issue-1276 @skipOnReva
|
||||
|
||||
Feature: upload to a public link share
|
||||
As a user
|
||||
I want to create a public link with upload permission
|
||||
So that the recipient can upload resources
|
||||
|
||||
Background:
|
||||
Given user "Alice" has been created with default attributes
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
|
||||
@issue-10331
|
||||
Scenario Outline: uploading file to a public upload-only share using public API that was deleted does not work
|
||||
Given using <dav-path-version> DAV path
|
||||
And using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
And user "Alice" has deleted folder "/FOLDER"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the public WebDAV API
|
||||
And the HTTP status code should be "404"
|
||||
|
||||
@issue-1268
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
@issue-1269 @issue-10331
|
||||
Scenario: uploading file to a public read-only share folder with public API does not work
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | view |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the public WebDAV API
|
||||
And the HTTP status code should be "403"
|
||||
|
||||
@issue-10331
|
||||
Scenario: uploading to a public upload-only share with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
And the following headers should match these regular expressions
|
||||
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
|
||||
|
||||
@issue-10331
|
||||
Scenario: uploading to a public upload-only share with password with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
|
||||
@issue-10331
|
||||
Scenario: uploading to a public read/write share with password with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test-file" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test-file"
|
||||
|
||||
@skipOnReva @issue-10331
|
||||
Scenario: uploading file to a public shared folder with read/write permission when the sharer has insufficient quota does not work with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | edit |
|
||||
| password | %public% |
|
||||
And user "Admin" has changed the quota of the personal space of user "Alice" to "1"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
@skipOnReva @issue-10331
|
||||
Scenario: uploading file to a public shared folder with upload-only permission when the sharer has insufficient quota does not work with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
And user "Admin" has changed the quota of the personal space of user "Alice" to "1"
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
|
||||
Then the HTTP status code should be "507"
|
||||
|
||||
@smokeTest @issue-10331
|
||||
Scenario: uploading to a public upload-write and no edit and no overwrite share with public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test2"
|
||||
|
||||
@smokeTest @issue-1267 @issue-10331
|
||||
Scenario: uploading same file to a public upload-write and no edit and no overwrite share multiple times with new public API
|
||||
Given using SharingNG
|
||||
And user "Alice" has created the following resource link share:
|
||||
| resource | FOLDER |
|
||||
| space | Personal |
|
||||
| permissionsRole | createOnly |
|
||||
| password | %public% |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the following headers should match these regular expressions
|
||||
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
|
||||
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And the content of file "/FOLDER/test.txt" for user "Alice" should be "test"
|
||||
And the content of file "/FOLDER/test (2).txt" for user "Alice" should be "test2"
|
||||
Reference in New Issue
Block a user