copy feature files from core

This commit is contained in:
Saw-jan
2023-01-05 09:22:52 +05:45
committed by Phil Davis
parent 35d4cb53ae
commit c59392bc1e
336 changed files with 52903 additions and 0 deletions
@@ -0,0 +1,187 @@
@api @issue-ocis-reva-172
Feature: there can be only one exclusive lock on a resource
Background:
Given user "Alice" has been created with default attributes and without skeleton files
Scenario Outline: a second lock cannot be set on a folder when its exclusively locked
Given using <dav-path> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | exclusive |
When user "Alice" locks file "textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |
@notToImplementOnOCIS
Scenario Outline: if a parent resource is exclusively locked a child resource cannot be locked again
Given using <dav-path> DAV path
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 user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | exclusive |
When user "Alice" locks folder "PARENT/CHILD" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "PARENT/CHILD/child.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: if a parent resource is exclusively locked with depth 0 a child resource can be locked again
Given using <dav-path> DAV path
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 user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | exclusive |
| depth | 0 |
When user "Alice" locks folder "PARENT/CHILD" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And 1 locks should be reported for file "PARENT/CHILD/child.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@skipOnOcV10 @issue-34358 @notToImplementOnOCIS
Scenario Outline: if a child resource is exclusively locked a parent resource cannot be locked again
Given using <dav-path> DAV path
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 user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | exclusive |
When user "Alice" locks folder "PARENT" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "PARENT/CHILD/child.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: if a child resource is exclusively locked a parent resource can be locked with depth 0
Given using <dav-path> DAV path
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 user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | exclusive |
When user "Alice" locks folder "PARENT" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
| depth | 0 |
Then the HTTP status code should be "200"
And 1 locks should be reported for file "PARENT/CHILD/child.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@files_sharing-app-required
Scenario Outline: a share receiver cannot lock a resource exclusively locked by itself
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Brian" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has locked file "textfile0 (2).txt" setting the following properties
| lockscope | exclusive |
When user "Brian" locks file "textfile0 (2).txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "textfile0 (2).txt" of user "Brian" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |
@files_sharing-app-required
Scenario Outline: a share receiver cannot lock a resource exclusively locked by the owner
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Brian" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | exclusive |
When user "Brian" locks file "textfile0 (2).txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "textfile0 (2).txt" of user "Brian" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |
@files_sharing-app-required
Scenario Outline: a share owner cannot lock a resource exclusively locked by a share receiver
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Brian" has uploaded file "filesForUpload/textfile.txt" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Brian" has locked file "textfile0 (2).txt" setting the following properties
| lockscope | exclusive |
When user "Alice" locks file "textfile0.txt" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "423"
And 1 locks should be reported for file "textfile0.txt" of user "Alice" by the WebDAV API
And 1 locks should be reported for file "textfile0 (2).txt" of user "Brian" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@personalSpace @skipOnOcV10
Examples:
| dav-path | lock-scope |
| spaces | shared |
| spaces | exclusive |
@@ -0,0 +1,22 @@
@api @notToImplementOnOCIS @issue-ocis-reva-172
Feature: there can be only one exclusive lock on a resource
@issue-34358
Scenario Outline: if a child resource is exclusively locked a parent resource cannot be locked again
Given user "Alice" has been created with default attributes and without skeleton files
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 <dav-path> DAV path
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | exclusive |
When user "Alice" locks folder "PARENT" using the WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "200"
And 2 locks should be reported for file "PARENT/CHILD/child.txt" of user "Alice" by the WebDAV API
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@@ -0,0 +1,128 @@
@api @issue-ocis-reva-172
Feature: lock folders
Background:
Given user "Alice" has been created with default attributes and without skeleton files
@smokeTest @notToImplementOnOCIS
Scenario Outline: upload to a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has locked folder "FOLDER" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: upload to a subfolder of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has created folder "PARENT/CHILD"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" uploads file "filesForUpload/textfile.txt" to "/PARENT/CHILD/textfile.txt" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/CHILD/textfile.txt" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@smokeTest @notToImplementOnOCIS
Scenario Outline: create folder in a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has locked folder "FOLDER" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" creates folder "/FOLDER/new-folder" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" folder "/FOLDER/new-folder" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: create folder in a subfolder of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has created folder "PARENT/CHILD"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" creates folder "/PARENT/CHILD/new-folder" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" folder "/PARENT/CHILD/new-folder" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: Move file out of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" moves file "/PARENT/parent.txt" to "/parent.txt" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/parent.txt" should not exist
But as "Alice" file "/PARENT/parent.txt" should exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: Move file out of a locked sub folder one level higher into locked parent folder
Given using <dav-path> DAV path
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 user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" moves file "/PARENT/CHILD/child.txt" to "/PARENT/child.txt" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/child.txt" should not exist
But as "Alice" file "/PARENT/CHILD/child.txt" should exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@notToImplementOnOCIS
Scenario Outline: lockdiscovery of a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" gets the following properties of folder "PARENT" using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response to user "Alice" should match "<lock-root>"
And the value of the item "//d:locktoken/d:href" in the response to user "Alice" should match "/^opaquelocktoken:[a-z0-9-]+$/"
Examples:
| dav-path | lock-scope | lock-root |
| old | shared | /%base_path%\/remote.php\/webdav\/PARENT$/ |
| old | exclusive | /%base_path%\/remote.php\/webdav\/PARENT$/ |
| new | shared | /%base_path%\/remote.php\/dav\/files\/%username%\/PARENT$/ |
| new | exclusive | /%base_path%\/remote.php\/dav\/files\/%username%\/PARENT$/ |
@@ -0,0 +1,100 @@
@api @smokeTest @public_link_share-feature-required @files_sharing-app-required @issue-ocis-reva-172 @notToImplementOnOCIS
Feature: persistent-locking in case of a public link
Background:
Given user "Alice" has been created with default attributes and without skeleton files
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"
@smokeTest
Scenario Outline: Uploading a file into a locked public folder
Given using <dav-path> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has created a public link share of folder "FOLDER" with change permission
And user "Alice" has locked folder "FOLDER" setting the following properties
| lockscope | <lock-scope> |
When the public uploads file "/test.txt" with content "test" using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/FOLDER/test.txt" should not exist
Examples:
| dav-path | lock-scope | public-webdav-api-version |
| old | shared | old |
| old | exclusive | old |
| new | shared | old |
| new | exclusive | old |
| old | shared | new |
| old | exclusive | new |
| new | shared | new |
| new | exclusive | new |
Scenario Outline: Uploading a file into a locked subfolder of a public folder
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | <lock-scope> |
And the public has uploaded file "test.txt" with content "test"
When the public uploads file "CHILD/test.txt" with content "test" using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/CHILD/test.txt" should not exist
But the content of file "/PARENT/test.txt" for user "Alice" should be "test"
Examples:
| public-webdav-api-version | lock-scope |
| new | shared |
| new | exclusive |
@smokeTest
Scenario Outline: Overwrite a file inside a locked public folder
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public uploads file "parent.txt" with content "test" using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "423"
And the content of file "/PARENT/parent.txt" for user "Alice" should be:
"""
This is a testfile.
Cheers.
"""
Examples:
| public-webdav-api-version | lock-scope |
| new | shared |
| new | exclusive |
Scenario Outline: Overwrite a file inside a locked subfolder of a public folder
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | <lock-scope> |
And the public has uploaded file "parent.txt" with content "changed text"
When the public uploads file "CHILD/child.txt" with content "test" using the <public-webdav-api-version> public WebDAV API
Then the HTTP status code should be "423"
And the content of file "/PARENT/parent.txt" for user "Alice" should be "changed text"
But the content of file "/PARENT/CHILD/child.txt" for user "Alice" should be:
"""
This is a testfile.
Cheers.
"""
Examples:
| public-webdav-api-version | lock-scope |
| new | shared |
| new | exclusive |
@smokeTest
Scenario Outline: Public locking is not supported
Given user "Alice" has created a public link share of folder "PARENT" with change permission
When the public locks "/CHILD" in the last public link shared folder using the <public-webdav-api-version> public WebDAV API setting the following properties
| lockscope | <lock-scope> |
Then the HTTP status code should be "405"
And the value of the item "//s:message" in the response should be "Locking not allowed from public endpoint"
Examples:
| public-webdav-api-version | lock-scope |
| old | shared |
| old | exclusive |
Examples:
| public-webdav-api-version | lock-scope |
| new | shared |
| new | exclusive |
@@ -0,0 +1,127 @@
@api @smokeTest @public_link_share-feature-required @files_sharing-app-required @issue-ocis-reva-172 @notToImplementOnOCIS
Feature: LOCKDISCOVERY for public links
Background:
Given user "Alice" has been created with default attributes and without skeleton files
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"
Scenario Outline: lockdiscovery root of public link when root is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery subfolder of a locked public link when root is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/CHILD" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery subfolder of a public link when subfolder is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/CHILD" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/CHILD$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery file in a subfolder of a public link when subfolder is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/CHILD/child.txt" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/CHILD$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery file in a subfolder of a public link when root is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/CHILD/child.txt" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery file in a subfolder of a public link when the file is locked
Given user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT/CHILD/child.txt" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/CHILD/child.txt" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/CHILD\/child.txt$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
Scenario Outline: lockdiscovery file in a subfolder of a public link when the folder above the public link is locked
Given user "Alice" has created a public link share of folder "PARENT/CHILD" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public gets the following properties of entry "/child.txt" in the last created public link using the WebDAV API
| propertyName |
| d:lockdiscovery |
Then the HTTP status code should be "200"
And the value of the item "//d:lockroot/d:href" in the response should match "/%base_path%\/public.php\/webdav\/$/"
And the item "//d:locktoken/d:href" in the response should not exist
And the value of the item "//d:timeout" in the response should match "/Second-\d+/"
Examples:
| lock-scope |
| shared |
| exclusive |
@@ -0,0 +1,132 @@
@api @issue-ocis-reva-172
Feature: actions on a locked item are possible if the token is sent with the request
Background:
Given user "Alice" has been created with default attributes and without skeleton files
@smokeTest @notToImplementOnOCIS
Scenario Outline: rename a file in a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" moves file "/PARENT/parent.txt" to "/PARENT/renamed-file.txt" sending the locktoken of folder "PARENT" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/parent.txt" should not exist
But as "Alice" file "/PARENT/renamed-file.txt" should exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@smokeTest @notToImplementOnOCIS
Scenario Outline: move a file into a locked folder
Given using <dav-path> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Alice" has locked folder "FOLDER" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" moves file "/PARENT/parent.txt" to "/FOLDER/moved-file.txt" sending the locktoken of folder "FOLDER" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/parent.txt" should not exist
But as "Alice" file "/FOLDER/moved-file.txt" should exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@smokeTest @notToImplementOnOCIS
Scenario Outline: move a file into a locked folder is impossible when using the wrong token
Given using <dav-path> DAV path
And user "Alice" has created folder "FOLDER"
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 locked folder "FOLDER" setting the following properties
| lockscope | <lock-scope> |
And user "Alice" has locked folder "PARENT/CHILD" setting the following properties
| lockscope | <lock-scope> |
When user "Alice" moves file "/PARENT/parent.txt" to "/FOLDER/moved-file.txt" sending the locktoken of folder "PARENT/CHILD" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/parent.txt" should exist
But as "Alice" file "/FOLDER/moved-file.txt" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@skipOnOcV10 @issue-34338 @files_sharing-app-required @notToImplementOnOCIS
Scenario Outline: share receiver cannot rename a file in a folder locked by the owner even when sending the locktoken
Given using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/parent.txt"
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" moves file "Shares/PARENT/parent.txt" to "Shares/PARENT/renamed-file.txt" sending the locktoken of file "PARENT" of user "Alice" using the WebDAV API
Then the HTTP status code should be "423"
And as "Alice" file "/PARENT/parent.txt" should exist
But as "Alice" file "/PARENT/renamed-file.txt" should not exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@files_sharing-app-required @notToImplementOnOCIS
Scenario Outline: public cannot overwrite a file in a folder locked by the owner even when sending the locktoken
Given user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file with content "ownCloud test text file parent" to "PARENT/parent.txt"
And user "Alice" has created a public link share of folder "PARENT" with change permission
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When the public uploads file "parent.txt" with content "test" sending the locktoken of file "PARENT" of user "Alice" using the <webdav_api_version> public WebDAV API
Then the HTTP status code should be "<http_status_code>"
And the content of file "/PARENT/parent.txt" for user "Alice" should be "ownCloud test text file parent"
Examples:
| lock-scope | webdav_api_version | http_status_code |
| shared | old | 423 |
| exclusive | old | 423 |
| shared | new | 423 |
| exclusive | new | 423 |
@skipOnOcV10 @issue-34360 @files_sharing-app-required
Scenario Outline: two users having both a shared lock can use the resource
Given using <dav-path> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file with content "some data" to "textfile0.txt"
And user "Brian" has uploaded file with content "some data" to "textfile0.txt"
And user "Alice" has shared file "/textfile0.txt" with user "Brian"
And user "Brian" has accepted share "/textfile0.txt" offered by user "Alice"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | shared |
And user "Brian" has locked file "Shares/textfile0.txt" setting the following properties
| lockscope | shared |
When user "Alice" uploads file with content "from user 0" to "textfile0.txt" sending the locktoken of file "textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 0"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 0"
When user "Brian" uploads file with content "from user 1" to "Shares/textfile0.txt" sending the locktoken of file "Shares/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And the content of file "textfile0.txt" for user "Alice" should be "from user 1"
And the content of file "Shares/textfile0.txt" for user "Brian" should be "from user 1"
Examples:
| dav-path |
| old |
| new |
@personalSpace
Examples:
| dav-path |
| spaces |
@@ -0,0 +1,25 @@
@api @notToImplementOnOCIS @issue-ocis-reva-172
Feature: actions on a locked item are possible if the token is sent with the request
@issue-34338 @files_sharing-app-required
Scenario Outline: share receiver cannot rename a file in a folder locked by the owner even when sending the locktoken
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using <dav-path> DAV path
And user "Alice" has created folder "PARENT"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "PARENT/parent.txt"
And user "Alice" has shared folder "PARENT" with user "Brian"
And user "Alice" has locked folder "PARENT" setting the following properties
| lockscope | <lock-scope> |
When user "Brian" moves file "PARENT/parent.txt" to "PARENT/renamed-file.txt" sending the locktoken of file "PARENT" of user "Alice" using the WebDAV API
Then the HTTP status code should be "201"
And as "Alice" file "/PARENT/parent.txt" should not exist
But as "Alice" file "/PARENT/renamed-file.txt" should exist
Examples:
| dav-path | lock-scope |
| old | shared |
| old | exclusive |
| new | shared |
| new | exclusive |
@@ -0,0 +1,29 @@
@api @notToImplementOnOCIS @issue-ocis-reva-172
Feature: actions on a locked item are possible if the token is sent with the request
@issue-34360 @files_sharing-app-required
Scenario Outline: two users having both a shared lock can use the resource
Given these users have been created with default attributes and without skeleton files:
| username |
| Alice |
| Brian |
And using <dav-path> DAV path
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt"
And user "Brian" has uploaded file with content "ownCloud test text file 0" to "textfile0.txt"
And user "Alice" has shared file "textfile0.txt" with user "Brian"
And user "Alice" has locked file "textfile0.txt" setting the following properties
| lockscope | shared |
And user "Brian" has locked file "textfile0 (2).txt" setting the following properties
| lockscope | shared |
When user "Alice" uploads file with content "from user 0" to "textfile0.txt" sending the locktoken of file "textfile0.txt" using the WebDAV API
Then the HTTP status code should be "423"
And the content of file "textfile0.txt" for user "Alice" should be "ownCloud test text file 0"
And the content of file "textfile0 (2).txt" for user "Brian" should be "ownCloud test text file 0"
When user "Brian" uploads file with content "from user 1" to "textfile0 (2).txt" sending the locktoken of file "textfile0 (2).txt" using the WebDAV API
Then the HTTP status code should be "423"
And the content of file "textfile0.txt" for user "Alice" should be "ownCloud test text file 0"
And the content of file "textfile0 (2).txt" for user "Brian" should be "ownCloud test text file 0"
Examples:
| dav-path |
| old |
| new |