Files

1096 lines
56 KiB
Gherkin
Raw Permalink Normal View History

2023-01-02 17:26:54 +05:45
Feature: copy file
As a user
I want to be able to copy files
So that I can manage my files
Background:
Given using OCS API version "1"
And user "Alice" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
And user "Alice" has uploaded file with content "ownCloud test text file 1" to "/textfile1.txt"
And user "Alice" has created folder "/FOLDER"
@smokeTest
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile0.txt" to "/FOLDER/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/FOLDER/textfile0.txt" for user "Alice" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@smokeTest
2023-06-05 17:18:44 +05:45
Scenario Outline: copying and overwriting a file
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile0.txt" to "/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/textfile1.txt" for user "Alice" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file when 2 files exist with different case
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
# "/textfile1.txt" already exists in the skeleton, make another with only case differences in the file name
When user "Alice" copies file "/textfile0.txt" to "/TextFile1.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/textfile1.txt" for user "Alice" should be "ownCloud test text file 1"
And the content of file "/TextFile1.txt" for user "Alice" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva @env-config
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file to a folder with no permissions
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role> |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile0.txt" to "/Shares/testshare/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "403"
And user "Alice" should not be able to download file "/Shares/testshare/textfile0.txt"
Examples:
| dav-path-version | permissions-role |
| old | Viewer |
| new | Viewer |
| spaces | Viewer |
| old | Secure Viewer |
| new | Secure Viewer |
| spaces | Secure Viewer |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file to overwrite a file into a folder with no permissions
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "ownCloud test text file 1" to "textfile1.txt"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
And user "Brian" has copied file "textfile1.txt" to "/testshare/overwritethis.txt"
When user "Alice" copies file "/textfile0.txt" to "/Shares/testshare/overwritethis.txt" using the WebDAV API
Then the HTTP status code should be "403"
And the content of file "/Shares/testshare/overwritethis.txt" for user "Alice" should be "ownCloud test text file 1"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2024-08-12 18:14:37 +05:45
@issue-1345 @issue-2177
2023-06-05 17:18:44 +05:45
Scenario Outline: copying file to a path with extension .part should not be possible
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile1.txt" to "/textfile1.part" using the WebDAV API
2024-08-12 18:14:37 +05:45
Then the HTTP status code should be "201"
2023-01-02 17:26:54 +05:45
And user "Alice" should see the following elements
| /textfile1.part |
2024-08-12 18:14:37 +05:45
| /textfile1.txt |
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file over the top of an existing folder
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/sample-folder"
When user "Alice" copies file "/textfile1.txt" to "/FOLDER" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "/FOLDER" for user "Alice" should be "ownCloud test text file 1"
And as "Alice" folder "/FOLDER/sample-folder" should not exist
And as "Alice" file "/textfile1.txt" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder over the top of an existing file
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/sample-folder"
When user "Alice" copies folder "/FOLDER" to "/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/FOLDER/sample-folder" should exist
And as "Alice" folder "/textfile1.txt/sample-folder" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into another folder at different level
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/second-level-folder"
And user "Alice" has created folder "FOLDER/second-level-folder/third-level-folder"
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b/sample-folder-c"
When user "Alice" copies folder "Sample-Folder-A/sample-folder-b" to "FOLDER/second-level-folder/third-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And as "Alice" folder "/FOLDER/second-level-folder/third-level-folder/sample-folder-c" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a folder at different level
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/second-level-folder"
And user "Alice" has created folder "FOLDER/second-level-folder/third-level-folder"
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "FOLDER/second-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should not exist
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "FOLDER/second-level-folder" should exist
And the content of file "FOLDER/second-level-folder" for user "Alice" should be "sample file-c"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a file at different level
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file with content "file at second level" to "FOLDER/second-level-file.txt"
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "FOLDER/second-level-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "FOLDER/second-level-file.txt" should exist
And as "Alice" file "FOLDER/textfile-c.txt" should not exist
And the content of file "FOLDER/second-level-file.txt" for user "Alice" should be "sample file-c"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into a file at different level
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/second-level-folder"
And user "Alice" has created folder "FOLDER/second-level-folder/third-level-folder"
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies folder "FOLDER/second-level-folder" to "Sample-Folder-A/sample-folder-b/textfile-c.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should exist
And as "Alice" folder "Sample-Folder-A/sample-folder-b/textfile-c.txt/third-level-folder" should exist
And as "Alice" folder "Sample-Folder-A/sample-folder-b/second-level-folder" should not exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2024-08-07 16:34:44 +05:45
@issue-1239 @issue-3874 @issue-9753 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file over the top of an existing folder received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/BRIAN-Folder"
And user "Brian" has created folder "BRIAN-Folder/sample-folder"
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-Folder |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-Folder" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile1.txt" to "/Shares/BRIAN-Folder" using the WebDAV API
2024-08-07 16:34:44 +05:45
Then the HTTP status code should be "400"
And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist
And as "Alice" file "/Shares/BRIAN-Folder" should not exist
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal"
2024-08-07 16:34:44 +05:45
And as "Brian" folder "BRIAN-Folder" should exist
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2024-08-07 16:34:44 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
2024-08-07 16:34:44 +05:45
@skipOnReva @issue-9753
2024-07-29 14:57:52 +05:45
Scenario Outline: copy a file over the top of an existing file received as a share
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "file to copy" to "copy.txt"
And user "Brian" has been created with default attributes
2024-07-29 14:57:52 +05:45
And user "Brian" has uploaded file with content "file to share" to "lorem.txt"
And user "Brian" has sent the following resource share invitation:
| resource | lorem.txt |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | File Editor |
And user "Alice" has a share "lorem.txt" synced
When user "Alice" copies file "copy.txt" to "Shares/lorem.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "Shares/lorem.txt" for user "Alice" should be "file to copy"
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "lorem.txt" shared by user "Brian" from space "Personal"
2024-07-29 14:57:52 +05:45
And the content of file "lorem.txt" for user "Brian" should be "file to copy"
Examples:
| dav-path-version |
| old |
| new |
2024-08-07 16:34:44 +05:45
| spaces |
2024-07-29 14:57:52 +05:45
2024-08-07 16:34:44 +05:45
@issue-1239 @issue-6999 @issue-9753 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder over the top of an existing file received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has uploaded file with content "file to share" to "/sharedfile1.txt"
And user "Brian" has sent the following resource share invitation:
| resource | sharedfile1.txt |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | File Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "sharedfile1.txt" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/sample-folder"
When user "Alice" copies folder "/FOLDER" to "/Shares/sharedfile1.txt" using the WebDAV API
2024-08-07 16:34:44 +05:45
Then the HTTP status code should be "400"
And the content of file "Shares/sharedfile1.txt" for user "Alice" should be "file to share"
And as "Alice" folder "/Shares/sharedfile1.txt" should not exist
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" from space "Personal"
2024-08-07 16:34:44 +05:45
And the content of file "sharedfile1.txt" for user "Brian" should be "file to share"
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
2024-08-07 16:34:44 +05:45
| spaces |
2024-07-29 14:57:52 +05:45
2024-08-07 16:34:44 +05:45
@issue-6999 @issue-9753 @skipOnReva
2024-07-29 14:57:52 +05:45
Scenario Outline: copy a folder over the top of an existing folder received as a share
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2024-07-29 14:57:52 +05:45
And user "Brian" has created folder "BRIAN-Folder"
And user "Brian" has created folder "BRIAN-Folder/brian-folder"
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-Folder |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has a share "BRIAN-Folder" synced
And user "Alice" has created folder "FOLDER/alice-folder"
When user "Alice" copies folder "FOLDER" to "Shares/BRIAN-Folder" using the WebDAV API
2024-08-07 16:34:44 +05:45
Then the HTTP status code should be "400"
And as "Alice" folder "Shares/BRIAN-Folder/brian-folder" should exist
And as "Alice" folder "Shares/BRIAN-Folder/alice-folder" should not exist
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal"
2024-08-07 16:34:44 +05:45
And as "Brian" folder "BRIAN-Folder" should exist
2024-07-29 14:57:52 +05:45
Examples:
| dav-path-version |
| old |
| new |
2024-08-07 16:34:44 +05:45
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into another folder at different level which is received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder/third-level-folder"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b/sample-folder-c"
When user "Alice" copies folder "Sample-Folder-A/sample-folder-b" to "Shares/BRIAN-FOLDER/second-level-folder/third-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And as "Alice" folder "/Shares/BRIAN-FOLDER/second-level-folder/third-level-folder/sample-folder-c" should exist
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a folder at different level received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder/third-level-folder"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "Shares/BRIAN-FOLDER/second-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-folder" should not exist
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/second-level-folder" should exist
And the content of file "Shares/BRIAN-FOLDER/second-level-folder" for user "Alice" should be "sample file-c"
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a file at different level received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has uploaded file with content "file at second level" to "BRIAN-FOLDER/second-level-file.txt"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "Shares/BRIAN-FOLDER/second-level-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/second-level-file.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/textfile-c.txt" should not exist
And the content of file "Shares/BRIAN-FOLDER/second-level-file.txt" for user "Alice" should be "sample file-c"
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into a file at different level received as a user share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has uploaded file with content "file at third level" to "BRIAN-FOLDER/second-level-folder/third-level-file.txt"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/second-level-folder"
And user "Alice" has created folder "FOLDER/second-level-folder/third-level-folder"
When user "Alice" copies folder "FOLDER/second-level-folder" to "/Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt" should exist
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should exist
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt/third-level-folder" should exist
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/second-level-folder" should not exist
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2024-08-07 16:34:44 +05:45
@issue-1239 @issue-9753 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file over the top of an existing folder received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "/BRIAN-Folder"
And user "Brian" has created folder "BRIAN-Folder/sample-folder"
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-Folder |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-Folder" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile1.txt" to "/Shares/BRIAN-Folder" using the WebDAV API
2024-08-07 16:34:44 +05:45
Then the HTTP status code should be "400"
And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist
And as "Alice" file "/Shares/BRIAN-Folder" should not exist
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal"
2024-08-07 16:34:44 +05:45
And as "Brian" folder "BRIAN-Folder/sample-folder" should exist
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2024-08-07 16:34:44 +05:45
@issue-1239 @issue-6999 @issue-9753 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder over the top of an existing file received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
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 "file to share" to "/sharedfile1.txt"
And user "Brian" has sent the following resource share invitation:
| resource | sharedfile1.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "sharedfile1.txt" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/sample-folder"
When user "Alice" copies folder "/FOLDER" to "/Shares/sharedfile1.txt" using the WebDAV API
2024-08-07 16:34:44 +05:45
Then the HTTP status code should be "400"
And as "Alice" file "/Shares/sharedfile1.txt" should exist
And as "Alice" folder "/Shares/sharedfile1.txt" should not exist
2024-11-29 16:47:02 +05:45
And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" from space "Personal"
2024-08-07 16:34:44 +05:45
And as "Brian" file "sharedfile1.txt" should exist
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into another folder at different level which is received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder/third-level-folder"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b/sample-folder-c"
When user "Alice" copies folder "Sample-Folder-A/sample-folder-b" to "Shares/BRIAN-FOLDER/second-level-folder/third-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/Sample-Folder-A/sample-folder-b/sample-folder-c" should exist
And as "Alice" folder "/Shares/BRIAN-FOLDER/second-level-folder/third-level-folder/sample-folder-c" should exist
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a folder at different level received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder/third-level-folder"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "Shares/BRIAN-FOLDER/second-level-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-folder" should not exist
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/second-level-folder" should exist
And the content of file "Shares/BRIAN-FOLDER/second-level-folder" for user "Alice" should be "sample file-c"
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file into a file at different level received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has uploaded file with content "file at second level" to "BRIAN-FOLDER/second-level-file.txt"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "Sample-Folder-A"
And user "Alice" has created folder "Sample-Folder-A/sample-folder-b"
And user "Alice" has uploaded file with content "sample file-c" to "Sample-Folder-A/sample-folder-b/textfile-c.txt"
When user "Alice" copies file "Sample-Folder-A/sample-folder-b/textfile-c.txt" to "Shares/BRIAN-FOLDER/second-level-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "Sample-Folder-A/sample-folder-b/textfile-c.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/second-level-file.txt" should exist
And as "Alice" file "Shares/BRIAN-FOLDER/textfile-c.txt" should not exist
And the content of file "Shares/BRIAN-FOLDER/second-level-file.txt" for user "Alice" should be "sample file-c"
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@issue-1239 @skipOnReva
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a folder into a file at different level received as a group share
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And group "grp1" has been created
And user "Alice" has been added to group "grp1"
And user "Brian" has been added to group "grp1"
And user "Brian" has created folder "BRIAN-FOLDER"
And user "Brian" has created folder "BRIAN-FOLDER/second-level-folder"
And user "Brian" has uploaded file with content "file at third level" to "BRIAN-FOLDER/second-level-folder/third-level-file.txt"
And using SharingNG
And user "Brian" has sent the following resource share invitation:
| resource | BRIAN-FOLDER |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "BRIAN-FOLDER" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "FOLDER/second-level-folder"
And user "Alice" has created folder "FOLDER/second-level-folder/third-level-folder"
When user "Alice" copies folder "FOLDER/second-level-folder" to "Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt" should exist
And as "Alice" folder "FOLDER/second-level-folder/third-level-folder" should exist
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/third-level-file.txt/third-level-folder" should exist
And as "Alice" folder "Shares/BRIAN-FOLDER/second-level-folder/second-level-folder" should not exist
2024-11-27 11:59:10 +05:45
And as user "Alice" the last share should include the following properties:
2023-01-02 17:26:54 +05:45
| file_target | /Shares/BRIAN-FOLDER |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
Scenario Outline: copy a file of size zero byte
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file "filesForUpload/zerobyte.txt" to "/zerobyte.txt"
And user "Alice" has created folder "/testZeroByte"
When user "Alice" copies file "/zerobyte.txt" to "/testZeroByte/zerobyte.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/testZeroByte/zerobyte.txt" should exist
And as "Alice" file "/zerobyte.txt" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copy file into a nonexistent folder
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToCopy.txt"
When user "Alice" copies file "/fileToCopy.txt" to "/not-existing-folder/fileToCopy.txt" using the WebDAV API
Then the HTTP status code should be "409"
And as "Alice" file "/fileToCopy.txt" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copy a nonexistent file into a folder
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/doesNotExist.txt" to "/FOLDER/doesNotExist.txt" using the WebDAV API
Then the HTTP status code should be "404"
And as "Alice" file "/FOLDER/doesNotExist.txt" should not exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copy a folder into a nonexistent one
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/testshare"
When user "Alice" copies folder "/testshare" to "/not-existing/testshare" using the WebDAV API
Then the HTTP status code should be "409"
And user "Alice" should see the following elements
| /testshare |
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file into a shared folder as the sharee
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile0.txt" to "/Shares/testshare/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/Shares/testshare/textfile0.txt" for user "Alice" should be "ownCloud test text file 0"
And the content of file "/testshare/textfile0.txt" for user "Brian" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file into a shared folder as the sharer
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
And user "Brian" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
When user "Brian" copies file "/textfile0.txt" to "/testshare/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And the content of file "/Shares/testshare/textfile0.txt" for user "Alice" should be "ownCloud test text file 0"
And the content of file "/testshare/textfile0.txt" for user "Brian" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file out of a shared folder as the sharee
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded file with content "ownCloud test text file inside share" to "/Shares/testshare/fileInsideShare.txt"
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/fileInsideShare.txt" should exist
And the content of file "/fileInsideShare.txt" for user "Alice" should be "ownCloud test text file inside share"
And the content of file "/testshare/fileInsideShare.txt" for user "Brian" should be "ownCloud test text file inside share"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
Scenario Outline: sharee copies a file from a shared folder, shared with viewer permission
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "hello world" to "testshare/fileInsideShare.txt"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/fileInsideShare.txt" should exist
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@skipOnReva @env-config
Scenario Outline: sharee copies a file from a shared folder, shared with secure viewer permission
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Brian" has been created with default attributes
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "hello world" to "testshare/fileInsideShare.txt"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Secure Viewer |
And user "Alice" has a share "testshare" synced
When user "Alice" copies file "/Shares/testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/fileInsideShare.txt" should not exist
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file out of a shared folder as the sharer
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare"
And user "Brian" has uploaded file with content "ownCloud test text file inside share" to "/testshare/fileInsideShare.txt"
And user "Brian" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
When user "Brian" copies file "testshare/fileInsideShare.txt" to "/fileInsideShare.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/fileInsideShare.txt" should exist
And the content of file "/Shares/testshare/fileInsideShare.txt" for user "Alice" should be "ownCloud test text file inside share"
And the content of file "/fileInsideShare.txt" for user "Brian" should be "ownCloud test text file inside share"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a hidden file
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has uploaded the following files with content "hidden file"
| path |
| .hidden_file101 |
| /FOLDER/.hidden_file102 |
When user "Alice" copies file ".hidden_file101" to "/FOLDER/.hidden_file101" using the WebDAV API
And user "Alice" copies file "/FOLDER/.hidden_file102" to ".hidden_file102" using the WebDAV API
And as "Alice" the following files should exist
| path |
| .hidden_file102 |
| /FOLDER/.hidden_file101 |
And the content of the following files for user "Alice" should be "hidden file"
| path |
| .hidden_file102 |
| /FOLDER/.hidden_file101 |
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file between shares received from different users
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare0"
And user "Brian" has uploaded file with content "content inside testshare0" to "/testshare0/testshare0.txt"
And user "Carol" has created folder "/testshare1"
And user "Brian" has sent the following resource share invitation:
| resource | testshare0 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare0" synced
And user "Carol" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare1" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/Shares/testshare0/testshare0.txt" to "/Shares/testshare1/testshare0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Carol" file "testshare1/testshare0.txt" should exist
And as "Alice" file "Shares/testshare1/testshare0.txt" should exist
And the content of file "/testshare1/testshare0.txt" for user "Carol" should be "content inside testshare0"
And the content of file "/Shares/testshare1/testshare0.txt" for user "Alice" should be "content inside testshare0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva @env-config
2024-06-24 12:04:53 +05:45
Scenario Outline: copying a file between shares received from different users when one share is shared via Viewer and Secure viewer permission
Given using <dav-path-version> DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
And user "Brian" has created folder "/testshare0"
And user "Brian" has uploaded file with content "content inside testshare0" to "/testshare0/testshare0.txt"
And user "Brian" has created folder "/testshare0/folder_to_copy/"
And user "Carol" has created folder "/testshare1"
And user "Brian" has sent the following resource share invitation:
| resource | testshare0 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-1> |
And user "Alice" has a share "testshare0" synced
And user "Carol" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | <permissions-role-2> |
And user "Alice" has a share "testshare1" synced
When user "Alice" copies folder "/Shares/testshare0/folder_to_copy/" to "/Shares/testshare1/folder_to_copy/" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" folder "/Shares/testshare1/folder_to_copy/" should not exist
When user "Alice" copies file "/Shares/testshare0/testshare0.txt" to "/Shares/testshare1/testshare0.txt" using the WebDAV API
Then the HTTP status code should be "403"
And as "Alice" file "/Shares/testshare1/testshare0.txt" should not exist
Examples:
| dav-path-version | permissions-role-1 | permissions-role-2 |
| old | Secure Viewer | Secure Viewer |
| new | Secure Viewer | Secure Viewer |
| spaces | Secure Viewer | Secure Viewer |
| old | Secure Viewer | Viewer |
| new | Secure Viewer | Viewer |
| spaces | Secure Viewer | Viewer |
| old | Editor | Secure Viewer |
| new | Editor | Secure Viewer |
| spaces | Editor | Secure Viewer |
| old | Viewer | Secure Viewer |
| new | Viewer | Secure Viewer |
| spaces | Viewer | Secure Viewer |
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a folder between shares received from different users
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Brian" has created folder "/testshare0"
And user "Brian" has created folder "/testshare0/folder_to_copy/"
And user "Brian" has uploaded file with content "content inside testshare0" to "/testshare0/folder_to_copy/testshare0.txt"
And user "Carol" has created folder "/testshare1"
And user "Brian" has sent the following resource share invitation:
| resource | testshare0 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare0" synced
And user "Carol" has sent the following resource share invitation:
| resource | testshare1 |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Alice" has a share "testshare1" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/Shares/testshare0/folder_to_copy/" to "/Shares/testshare1/folder_to_copy/" using the WebDAV API
Then the HTTP status code should be "201"
And as "Carol" file "testshare1/folder_to_copy/testshare0.txt" should exist
And as "Alice" file "/Shares/testshare1/folder_to_copy/testshare0.txt" should exist
And the content of file "testshare1/folder_to_copy/testshare0.txt" for user "Carol" should be "content inside testshare0"
And the content of file "/Shares/testshare1/folder_to_copy/testshare0.txt" for user "Alice" should be "content inside testshare0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
@skipOnReva
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a file to a folder that is shared with multiple users
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/testshare"
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Brian" has a share "testshare" synced
And user "Alice" has sent the following resource share invitation:
| resource | testshare |
| space | Personal |
| sharee | Carol |
| shareType | user |
| permissionsRole | Editor |
2024-07-22 15:00:11 +05:45
And user "Carol" has a share "testshare" synced
2023-01-02 17:26:54 +05:45
When user "Alice" copies file "/textfile0.txt" to "/testshare/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/Shares/testshare/textfile0.txt" should exist
And as "Carol" file "/Shares/testshare/textfile0.txt" should exist
And the content of file "/Shares/testshare/textfile0.txt" for user "Brian" should be "ownCloud test text file 0"
And the content of file "/Shares/testshare/textfile0.txt" for user "Carol" should be "ownCloud test text file 0"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copy a folder into another one
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/testshare"
And user "Alice" has created folder "/an-other-folder"
When user "Alice" copies folder "/testshare" to "/an-other-folder/testshare" using the WebDAV API
Then the HTTP status code should be "201"
And user "Alice" should see the following elements
| /testshare |
2023-01-02 17:26:54 +05:45
And user "Alice" should see the following elements
| /an-other-folder/testshare |
2023-01-02 17:26:54 +05:45
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2024-06-24 12:54:57 +05:45
@issue-3023
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a folder into a sub-folder of itself
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/PARENT"
And user "Alice" has created folder "/PARENT/CHILD"
And user "Alice" has uploaded file with content "parent text" to "/PARENT/parent.txt"
And user "Alice" has uploaded file with content "child text" to "/PARENT/CHILD/child.txt"
When user "Alice" copies folder "/PARENT" to "/PARENT/CHILD/PARENT" using the WebDAV API
Then the HTTP status code should be "409"
And the content of file "/PARENT/parent.txt" for user "Alice" should be "parent text"
And the content of file "/PARENT/CHILD/child.txt" for user "Alice" should be "child text"
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
2023-01-02 17:26:54 +05:45
2023-06-05 17:18:44 +05:45
Scenario Outline: copying a folder with a file into another folder
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2023-01-02 17:26:54 +05:45
And user "Alice" has created folder "/FOLDER1"
And user "Alice" has created folder "/FOLDER2"
And user "Alice" has uploaded file with content "Folder 1 text" to "/FOLDER1/textfile.txt"
When user "Alice" copies folder "/FOLDER1" to "/FOLDER2/FOLDER1" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" folder "/FOLDER2/FOLDER1" should exist
And as "Alice" file "/FOLDER2/FOLDER1/textfile.txt" should exist
And as "Alice" folder "/FOLDER1" should exist
Examples:
2023-07-12 12:42:32 +05:45
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: copy a file into a folder with special characters
Given using <dav-path-version> DAV path
And user "Alice" has created folder <folder-name>
And user "Alice" has uploaded file with content "test file" to <file-name>
When user "Alice" copies file <file-name> to <destination> using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file <file-name> should exist
And as "Alice" file <destination> should exist
And as "Alice" folder <folder-name> should exist
Examples:
| dav-path-version | file-name | folder-name | destination |
| old | "'single'" | "folder-'single'" | "folder-'single'/'single'" |
| old | "question?" | "folder-question?" | "folder-question?/question?" |
| old | "&and#hash" | "folder-&and#hash" | "folder-&and#hash/&and#hash" |
| new | "'single'" | "folder-'single'" | "folder-'single'/'single'" |
| new | "question?" | "folder-question?" | "folder-question?/question?" |
| new | "&and#hash" | "folder-&and#hash" | "folder-&and#hash/&and#hash" |
| spaces | "'single'" | "folder-'single'" | "folder-'single'/'single'" |
| spaces | "question?" | "folder-question?" | "folder-question?/question?" |
| spaces | "&and#hash" | "folder-&and#hash" | "folder-&and#hash/&and#hash" |
2024-08-05 14:46:40 +05:45
@issue-8711
Scenario Outline: copying a file to itself
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "lorem epsum" to "textfile.txt"
When user "Alice" copies file "textfile.txt" to "textfile.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile.txt" for user "Alice" should be "lorem epsum"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-8711
Scenario Outline: copying a folder to itself
Given using <dav-path-version> DAV path
And user "Alice" has created folder "FOLDER1"
And user "Alice" has uploaded file with content "Folder 1 text" to "FOLDER1/textfile.txt"
When user "Alice" copies folder "FOLDER1" to "FOLDER1" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "FOLDER1" should exist
And the content of file "FOLDER1/textfile.txt" for user "Alice" should be "lorem epsum"
Examples:
| dav-path-version |
| old |
| new |
| spaces |