2023-01-02 17:26:54 +05:45
Feature: set file properties
As a user
I want to be able to set meta-information about files
2023-04-21 14:59:50 +05:45
So that I can record file meta-information (detailed requirement TBD)
2023-01-02 17:26:54 +05:45
Background:
Given using OCS API version " 1 "
2024-11-29 09:39:21 +05:45
And user " Alice " has been created with default attributes
2023-01-02 17:26:54 +05:45
2023-03-31 17:20:30 +05:45
@smokeTest @issue-1263
2023-06-05 17:18:44 +05:45
Scenario Outline: setting custom DAV property and reading it
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2024-07-29 14:57:52 +05:45
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " testcustomprop.txt "
When user " Alice " sets property " very-custom-prop " of file " testcustomprop.txt " to " veryCustomPropValue "
Then the HTTP status code should be " 207 "
And the xml response should contain a property " very-custom-prop "
2024-07-30 17:10:35 +05:45
And the content in the response should include the following content:
"""
<d:prop><very-custom-prop></very-custom-prop></d:prop>
"""
2024-07-29 14:57:52 +05:45
When user " Alice " gets a custom property " very-custom-prop " of file " testcustomprop.txt "
Then the HTTP status code should be " 207 "
And the response should contain a custom " very-custom-prop " property with value " veryCustomPropValue "
2024-07-30 17:10:35 +05:45
And the content in the response should include the following content:
"""
<d:prop><very-custom-prop> veryCustomPropValue </very-custom-prop></d:prop>
"""
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
2023-03-31 17:20:30 +05:45
@issue-1297
2023-06-05 17:18:44 +05:45
Scenario Outline: setting custom complex DAV property and reading it
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 " /testcustomprop.txt "
2024-07-29 14:57:52 +05:45
When user " Alice " sets property " very-custom-prop " of file " testcustomprop.txt " to " <foo xmlns='http://bar'/> "
Then the HTTP status code should be " 207 "
And the xml response should contain a property " very-custom-prop "
When user " Alice " gets a custom property " very-custom-prop " of file " testcustomprop.txt "
Then the HTTP status code should be " 207 "
And the response should contain a custom " very-custom-prop " property with value " <foo xmlns='http://bar'/> "
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
2023-03-31 17:20:30 +05:45
@issue-1263
2023-06-05 17:18:44 +05:45
Scenario Outline: setting custom DAV property and reading it after the file is renamed
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 " /testcustompropwithmove.txt "
2024-07-29 14:57:52 +05:45
And user " Alice " has set property " very-custom-prop " of file " testcustompropwithmove.txt " to " valueForMovetest "
2023-01-02 17:26:54 +05:45
And user " Alice " has moved file " /testcustompropwithmove.txt " to " /catchmeifyoucan.txt "
2024-07-29 14:57:52 +05:45
When user " Alice " gets a custom property " very-custom-prop " of file " catchmeifyoucan.txt "
Then the response should contain a custom " very-custom-prop " property with value " valueForMovetest "
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-11-28 16:44:20 +05:45
@skipOnReva @issue-1297
2023-06-05 17:18:44 +05:45
Scenario Outline: setting custom DAV property on a shared file as an owner and reading as a recipient
2023-07-12 12:42:32 +05:45
Given using <dav-path-version> DAV path
2024-11-29 09:39:21 +05:45
And user " Brian " has been created with default attributes
2023-01-02 17:26:54 +05:45
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " /testcustompropshared.txt "
2024-05-20 12:21:10 +05:45
And user " Alice " has sent the following resource share invitation:
| resource | testcustompropshared.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
2024-07-22 15:00:11 +05:45
And user " Brian " has a share " testcustompropshared.txt " synced
2024-07-29 14:57:52 +05:45
When user " Alice " sets property " very-custom-prop " of file " testcustompropshared.txt " to " valueForSharetest "
Then the HTTP status code should be " 207 "
And the xml response should contain a property " very-custom-prop "
When user " Brian " gets a custom property " very-custom-prop " of file " Shares/testcustompropshared.txt "
Then the HTTP status code should be " 207 "
And the response should contain a custom " very-custom-prop " property with value " valueForSharetest "
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
2023-03-31 17:20:30 +05:45
@issue-1263
2023-06-05 17:18:44 +05:45
Scenario Outline: setting custom DAV property using one endpoint and reading it with other endpoint
2024-03-20 15:01:51 +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 " /testnewold.txt "
2024-07-29 14:57:52 +05:45
When user " Alice " sets property " very-custom-prop " of file " testnewold.txt " to " lucky "
Then the HTTP status code should be " 207 "
And the xml response should contain a property " very-custom-prop "
2024-03-20 15:01:51 +05:45
And using <dav-path-version-2> DAV path
2024-07-29 14:57:52 +05:45
When user " Alice " gets a custom property " very-custom-prop " of file " testnewold.txt "
Then the HTTP status code should be " 207 "
And the response should contain a custom " very-custom-prop " property with value " lucky "
2023-01-02 17:26:54 +05:45
Examples:
2024-03-20 15:01:51 +05:45
| dav-path-version | dav-path-version-2 |
| old | new |
| new | old |
| spaces | new |
| spaces | old |
| new | spaces |
| old | spaces |
2024-07-29 14:57:52 +05:45
@issue-2140
Scenario Outline: setting custom DAV property with custom namespace and reading it
Given using <dav-path-version> DAV path
And user " Alice " has uploaded file " filesForUpload/textfile.txt " to " testcustomprop.txt "
2024-07-30 17:10:35 +05:45
When user " Alice " sets property " very-custom-prop " with namespace " x1='http://whatever.org/ns' " of file " testcustomprop.txt " to " veryCustomPropValue " using the WebDAV API
2024-07-29 14:57:52 +05:45
Then the HTTP status code should be " 207 "
And the xml response should contain a property " x1:very-custom-prop " with namespace " x1='http://whatever.org/ns' "
And the content in the response should include the following content:
"""
<d:prop><x1:very-custom-prop xmlns:x1="http://whatever.org/ns"></x1:very-custom-prop></d:prop>
"""
When user " Alice " gets a custom property " x1:very-custom-prop " with namespace " x1='http://whatever.org/ns' " of file " testcustomprop.txt "
Then the HTTP status code should be " 207 "
2024-07-30 17:10:35 +05:45
And the response should contain a custom " x1:very-custom-prop " property with namespace " x1='http://whatever.org/ns' " and value " veryCustomPropValue "
2024-07-29 14:57:52 +05:45
And the content in the response should include the following content:
"""
2024-07-30 17:10:35 +05:45
<d:prop><x1:very-custom-prop xmlns:x1="http://whatever.org/ns"> veryCustomPropValue </x1:very-custom-prop></d:prop>
2024-07-29 14:57:52 +05:45
"""
Examples:
| dav-path-version |
| old |
| new |
| spaces |