mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-12-05 14:39:23 -05:00
* test: wait for the share sync in the Given steps that create shares Shares are synced (auto-accepted) asynchronously by the sharing service, so the scenarios waited for it with "user ... has a share ... synced" after each share. Where they didn't, the following steps could race with it, e.g. a hide sent before the auto-accept was overwritten by it. The Given steps that create user and group shares now wait until the share is synced for each user it was sent to (the members of a group), unless the user has auto-sync turned off. The "has a share ... synced" steps that only followed such a Given step are removed, and the line references of the expected failures are updated. Assisted-by: Claude Code:claude-opus-5-5 * test: don't wait for the sync of a share with the role Denied A share with the role Denied gives no access, so it never shows up in the shared-with-me list of the sharee, and the wait for its sync timed out. Assisted-by: Claude Code:claude-opus-5-5
330 lines
16 KiB
Gherkin
330 lines
16 KiB
Gherkin
@skipOnReva
|
|
Feature: move (rename) file
|
|
As a user
|
|
I want to be able to move and rename files
|
|
So that I can manage my file system
|
|
|
|
Background:
|
|
Given using OCS API version "1"
|
|
And user "Alice" has been created with default attributes
|
|
|
|
|
|
Scenario Outline: sharer moves a file into a shared folder
|
|
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 sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
And user "Brian" has uploaded file with content "test data" to "/testfile.txt"
|
|
When user "Brian" moves file "/testfile.txt" to "testshare/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And the content of file "/Shares/testshare/testfile.txt" for user "Alice" should be "test data"
|
|
And the content of file "/testshare/testfile.txt" for user "Brian" should be "test data"
|
|
And as "Brian" file "/testfile.txt" should not exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: sharee tries to move a file into a shared folder
|
|
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 sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
And user "Alice" has uploaded file with content "test data" to "/testfile.txt"
|
|
When user "Alice" moves file "/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "502"
|
|
And as "Alice" file "Shares/testshare/testfile.txt" should not exist
|
|
And as "Brian" file "testshare/testfile.txt" should not exist
|
|
But as "Alice" file "/testfile.txt" should exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a file out of a shared folder as the sharer
|
|
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 "test data" to "/testshare/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Brian" moves file "/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And the content of file "/testfile.txt" for user "Brian" should be "test data"
|
|
And as "Alice" file "/Shares/testshare/testfile.txt" should not exist
|
|
And as "Brian" file "/testshare/testfile.txt" should not exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a file out of a shared folder as the sharee
|
|
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 "test data" to "/testshare/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Alice" moves file "/Shares/testshare/testfile.txt" to "/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "502"
|
|
And as "Alice" file "/Shares/testshare/testfile.txt" should exist
|
|
And as "Brian" file "/testshare/testfile.txt" should exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a folder into a shared folder the sharer
|
|
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 sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
And user "Brian" has created folder "/testsubfolder"
|
|
And user "Brian" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
|
|
When user "Brian" moves folder "/testsubfolder" to "testshare/testsubfolder" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And the content of file "/Shares/testshare/testsubfolder/testfile.txt" for user "Alice" should be "test data"
|
|
And the content of file "/testshare/testsubfolder/testfile.txt" for user "Brian" should be "test data"
|
|
And as "Brian" file "/testsubfolder" should not exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a folder into a shared folder as the sharee
|
|
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 sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
And user "Alice" has created folder "/testsubfolder"
|
|
And user "Alice" has uploaded file with content "test data" to "/testsubfolder/testfile.txt"
|
|
When user "Alice" moves folder "/testsubfolder" to "Shares/testshare/testsubfolder" using the WebDAV API
|
|
Then the HTTP status code should be "502"
|
|
And as "Alice" folder "/Shares/testshare/testsubfolder" should not exist
|
|
And as "Brian" folder "/testshare/testsubfolder" should not exist
|
|
But as "Alice" folder "/testsubfolder" should exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a folder out of a shared folder as the sharer
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Brian" has created the following folders
|
|
| path |
|
|
| /testshare |
|
|
| /testshare/testsubfolder |
|
|
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Brian" moves folder "/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And the content of file "/testsubfolder/testfile.txt" for user "Brian" should be "test data"
|
|
And as "Alice" folder "/testshare/testsubfolder" should not exist
|
|
And as "Brian" folder "/testshare/testsubfolder" should not exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: moving a folder out of a shared folder as the sharee
|
|
Given using <dav-path-version> DAV path
|
|
And user "Brian" has been created with default attributes
|
|
And user "Brian" has created the following folders
|
|
| path |
|
|
| /testshare |
|
|
| /testshare/testsubfolder |
|
|
And user "Brian" has uploaded file with content "test data" to "/testshare/testsubfolder/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Alice" moves folder "/Shares/testshare/testsubfolder" to "/testsubfolder" using the WebDAV API
|
|
Then the HTTP status code should be "502"
|
|
And as "Alice" folder "/Shares/testshare/testsubfolder" should exist
|
|
And as "Brian" folder "/testshare/testsubfolder" should exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: sharee moves a file within a shared folder (Editor permissions)
|
|
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 created folder "testshare/child"
|
|
And user "Brian" has uploaded file with content "test data" to "testshare/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "201"
|
|
And as "Alice" file "/Shares/testshare/child/testfile.txt" should exist
|
|
And as "Brian" file "/testshare/child/testfile.txt" should exist
|
|
And as "Alice" file "/Shares/testshare/testfile.txt" should not exist
|
|
And as "Brian" file "/testshare/testfile.txt" should not exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Editor |
|
|
| new | Editor |
|
|
| spaces | Editor |
|
|
|
|
|
|
Scenario Outline: sharee tries to move a file within a shared folder (Viewer/Uploader permissions)
|
|
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 created folder "testshare/child"
|
|
And user "Brian" has uploaded file with content "test data" to "testshare/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/child/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "403"
|
|
And as "Alice" file "/Shares/testshare/child/testfile.txt" should not exist
|
|
And as "Brian" file "/testshare/child/testfile.txt" should not exist
|
|
And as "Alice" file "/Shares/testshare/testfile.txt" should exist
|
|
And as "Brian" file "/testshare/testfile.txt" should exist
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| new | Viewer |
|
|
| spaces | Viewer |
|
|
| old | Uploader |
|
|
| new | Uploader |
|
|
| spaces | Uploader |
|
|
|
|
@issue-1976
|
|
Scenario Outline: sharee tries to move a file into same shared folder with same name
|
|
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 "test data" to "testshare/testfile.txt"
|
|
And user "Brian" has sent the following resource share invitation:
|
|
| resource | testshare |
|
|
| space | Personal |
|
|
| sharee | Alice |
|
|
| shareType | user |
|
|
| permissionsRole | <permissions-role> |
|
|
When user "Alice" moves folder "Shares/testshare/testfile.txt" to "Shares/testshare/testfile.txt" using the WebDAV API
|
|
Then the HTTP status code should be "403"
|
|
And as "Brian" the file with original path "testshare/testfile.txt" should not exist in the trashbin
|
|
And the content of file "Shares/testshare/testfile.txt" for user "Alice" should be "test data"
|
|
And the content of file "testshare/testfile.txt" for user "Brian" should be "test data"
|
|
Examples:
|
|
| dav-path-version | permissions-role |
|
|
| old | Viewer |
|
|
| old | Uploader |
|
|
| old | Editor |
|
|
| new | Viewer |
|
|
| new | Uploader |
|
|
| new | Editor |
|
|
| spaces | Viewer |
|
|
| spaces | Uploader |
|
|
| spaces | Editor |
|