favorites tests (#2474)

This commit is contained in:
Viktor Scharf
2026-03-16 14:49:17 +01:00
committed by GitHub
parent 1623a5080c
commit e161069317
12 changed files with 786 additions and 531 deletions
@@ -0,0 +1,603 @@
Feature: favorites
As a user
I want to check that I can mark and unmark files and folders as favorites using the Graph API
Background:
Given user "Alice" has been created with default attributes
Scenario Outline: add a file to favorites in the personal space
Given user "Alice" has created folder "parent"
And user "Alice" has uploaded file "filesForUpload/<file>" to "/parent/<file>"
When user "Alice" marks file "parent/<file>" as favorite from space "Personal" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"file": {
"type": "object",
"required": ["mimeType"],
"properties": {
"mimeType": {
"const": "<mimeType>"
}
}
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "<file>"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "personal"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "parent"
},
"path": {
"const": "/parent"
}
}
},
"size": {
"type": "integer",
"const": <size>
}
}
}
"""
And as user "Alice" file "parent/<file>" should be favorited
Examples:
| file | size | mimeType |
| textfile.txt | 28 | text/plain |
| simple.odt | 10119 | application/vnd.oasis.opendocument.text |
| testavatar.jpg | 45343 | image/jpeg |
| simple.pdf | 17684 | application/pdf |
| testaudio.mp3 | 6144 | audio/mpeg |
Scenario: add a folder to favorites in the personal space
Given user "Alice" has created folder "parent"
And user "Alice" has uploaded file with content "first" to "/parent/first.txt"
And user "Alice" has uploaded file with content "second" to "/parent/second.txt"
When user "Alice" marks folder "parent" as favorite from space "Personal" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"folder",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"folder": {
"type": "object"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "parent"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "personal"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "/"
},
"path": {
"const": "/"
}
}
},
"size": {
"type": "integer",
"const": 11
}
}
}
"""
And as user "Alice" folder "parent" should be favorited
Scenario: add a shared file to favorites
Given user "Brian" has been created with default attributes
And user "Alice" has uploaded file with content "OpenCloud test text file" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "textfile.txt" synced
When user "Brian" marks file "textfile.txt" as favorite from space "Shares" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"file": {
"type": "object",
"required": ["mimeType"],
"properties": {
"mimeType": {
"const": "text/plain"
}
}
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "textfile.txt"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "personal"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "/"
},
"path": {
"const": "/"
}
}
},
"size": {
"type": "integer",
"const": 24
}
}
}
"""
And as user "Brian" file "Shares/textfile.txt" should be favorited
But as user "Alice" file "textfile.txt" should not be favorited
Scenario: add a shared folder to favorites
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "parent"
And user "Alice" has created folder "parent/sub"
And user "Alice" has uploaded file with content "OpenCloud test text file" to "parent/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | parent |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "parent" synced
When user "Brian" marks folder "parent/sub" as favorite from space "Shares" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"folder",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"folder": {
"type": "object"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "sub"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "personal"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "parent"
},
"path": {
"const": "/parent"
}
}
},
"size": {
"type": "integer",
"const": 0
}
}
}
"""
And as user "Brian" folder "Shares/parent/sub" should be favorited
But as user "Alice" folder "parent/sub" should not be favorited
Scenario: add a file of the project space to favorites
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "text.txt"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" marks file "text.txt" as favorite from space "new-space" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"file",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"file": {
"type": "object",
"required": ["mimeType"],
"properties": {
"mimeType": {
"const": "text/plain"
}
}
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "text.txt"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "project"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "/"
},
"path": {
"const": "/"
}
}
},
"size": {
"type": "integer",
"const": 11
}
}
}
"""
Scenario: add a folder of the project space to favorites
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "space-folder" in space "new-space"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
When user "Brian" marks folder "space-folder" as favorite from space "new-space" using the Graph API
Then the HTTP status code should be "201"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"eTag",
"folder",
"id",
"lastModifiedDateTime",
"name",
"parentReference",
"size"
],
"properties": {
"eTag": {
"type": "string",
"pattern": "%etag_pattern%"
},
"folder": {
"type": "object"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"lastModifiedDateTime": {
"type": "string",
"format": "date-time"
},
"name": {
"const": "space-folder"
},
"parentReference": {
"type": "object",
"required": [
"driveId",
"driveType",
"id",
"name",
"path"
],
"properties": {
"driveId": {
"type": "string",
"pattern": "^%space_id_pattern%$"
},
"driveType": {
"const": "project"
},
"id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
},
"name": {
"const": "/"
},
"path": {
"const": "/"
}
}
},
"size": {
"type": "integer",
"const": 0
}
}
}
"""
Scenario: remove file from favorites from the personal space
Given user "Alice" has created folder "parent"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/parent/textfile.txt"
And user "Alice" has marked file "parent/textfile.txt" as favorite from space "Personal"
When user "Alice" unmarks file "parent/textfile.txt" as favorite from space "Personal" using the Graph API
Then the HTTP status code should be "204"
And as user "Alice" file "parent/textfile.txt" should not be favorited
Scenario: remove folder from favorites from the personal space
Given user "Alice" has created folder "parent"
And user "Alice" has marked folder "parent" as favorite from space "Personal"
When user "Alice" unmarks folder "parent" as favorite from space "Personal" using the Graph API
Then the HTTP status code should be "204"
And as user "Alice" folder "parent" should not be favorited
Scenario: remove file from favorites from the shares
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "parent"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/parent/textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | parent/textfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "textfile.txt" synced
And user "Brian" has marked file "textfile.txt" as favorite from space "Shares"
When user "Brian" unmarks file "textfile.txt" as favorite from space "Shares" using the Graph API
Then the HTTP status code should be "204"
And as user "Brian" file "Shares/textfile.txt" should not be favorited
Scenario: remove folder from favorites from the shares
Given user "Brian" has been created with default attributes
And user "Alice" has created folder "parent"
And user "Alice" has created folder "parent/sub"
And user "Alice" has sent the following resource share invitation:
| resource | parent |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "parent" synced
And user "Brian" has marked folder "parent/sub" as favorite from space "Shares"
When user "Brian" unmarks folder "parent/sub" as favorite from space "Shares" using the Graph API
Then the HTTP status code should be "204"
And as user "Brian" folder "Shares/parent/sub" should not be favorited
Scenario: remove file from favorites from the project space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has uploaded a file inside space "new-space" with content "hello world" to "text.txt"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
And user "Brian" has marked file "text.txt" as favorite from space "new-space"
When user "Brian" unmarks file "text.txt" as favorite from space "new-space" using the Graph API
Then the HTTP status code should be "204"
Scenario: remove folder from favorites from the project space
Given user "Brian" has been created with default attributes
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And using spaces DAV path
And user "Alice" has created a space "new-space" with the default quota using the Graph API
And user "Alice" has created a folder "space-folder" in space "new-space"
And user "Alice" has sent the following space share invitation:
| space | new-space |
| sharee | Brian |
| shareType | user |
| permissionsRole | Space Viewer |
And user "Brian" has marked folder "space-folder" as favorite from space "new-space"
When user "Brian" unmarks folder "space-folder" as favorite from space "new-space" using the Graph API
Then the HTTP status code should be "204"
@@ -1,68 +0,0 @@
Feature: favorite
As a user
I want to favorite resources
So that I can access them quickly
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And using spaces DAV path
And user "Alice" has created folder "/PARENT"
Scenario: favorite a received share itself
Given user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/PARENT" in space "Shares" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/PARENT" inside space "Shares" should be favorited
Scenario: favorite a file inside of a received share
Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/PARENT/parent.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/PARENT/parent.txt" inside space "Shares" should be favorited
Scenario: favorite a folder inside of a received share
Given user "Alice" has created folder "/PARENT/sub-folder"
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/PARENT/sub-folder" in space "Shares" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/PARENT/sub-folder" inside space "Shares" should be favorited
Scenario: sharee file favorite state should not change the favorite state of sharer
Given user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
And user "Alice" has sent the following resource share invitation:
| resource | PARENT/parent.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "parent.txt" synced
When user "Brian" favorites element "/parent.txt" in space "Shares" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/parent.txt" inside space "Shares" should be favorited
And as user "Alice" file "/PARENT/parent.txt" inside space "Personal" should not be favorited
@@ -1,191 +0,0 @@
Feature: favorite
As a user
I want to favorite resources
So that I can access them quickly
Background:
Given using OCS API version "1"
And user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile2.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile3.txt"
And user "Alice" has uploaded file with content "some data" to "/textfile4.txt"
And user "Alice" has created folder "/FOLDER"
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
@issue-1263
Scenario Outline: favorite a folder
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" folder "/FOLDER" should be favorited
When user "Alice" gets the following properties of folder "/FOLDER" using the WebDAV API
| propertyName |
| oc:favorite |
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1263
Scenario Outline: unfavorite a folder
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/FOLDER"
When user "Alice" unfavorites element "/FOLDER" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" folder "/FOLDER" should not be favorited
When user "Alice" gets the following properties of folder "/FOLDER" using the WebDAV API
| propertyName |
| oc:favorite |
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@smokeTest @issue-1263
Scenario Outline: favorite a file
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" file "/textfile0.txt" should be favorited
When user "Alice" gets the following properties of file "/textfile0.txt" using the WebDAV API
| propertyName |
| oc:favorite |
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@smokeTest @issue-1263
Scenario Outline: unfavorite a file
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
When user "Alice" unfavorites element "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" file "/textfile0.txt" should not be favorited
When user "Alice" gets the following properties of file "/textfile0.txt" using the WebDAV API
| propertyName |
| oc:favorite |
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@smokeTest @issue-1228
Scenario Outline: get favorited elements of a folder
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
And user "Alice" favorites element "/textfile0.txt" using the WebDAV API
And user "Alice" favorites element "/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "207"
And user "Alice" should have the following favorited items
| /FOLDER |
| /textfile0.txt |
| /textfile1.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1228
Scenario Outline: get favorited elements of a subfolder
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile0.txt"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile1.txt"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile2.txt"
When user "Alice" favorites element "/subfolder/textfile0.txt" using the WebDAV API
And user "Alice" favorites element "/subfolder/textfile1.txt" using the WebDAV API
And user "Alice" favorites element "/subfolder/textfile2.txt" using the WebDAV API
And user "Alice" unfavorites element "/subfolder/textfile1.txt" using the WebDAV API
Then the HTTP status code should be "207"
And user "Alice" should have the following favorited items
| /subfolder/textfile0.txt |
| /subfolder/textfile2.txt |
And user "Alice" should not have the following favorited items
| /subfolder/textfile1.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1228
Scenario Outline: get favorited elements and limit count of entries
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
And user "Alice" has favorited element "/textfile1.txt"
And user "Alice" has favorited element "/textfile2.txt"
And user "Alice" has favorited element "/textfile3.txt"
And user "Alice" has favorited element "/textfile4.txt"
When user "Alice" lists the favorites and limits the result to 3 elements using the WebDAV API
Then the search result should contain any "3" of these entries:
| /textfile0.txt |
| /textfile1.txt |
| /textfile2.txt |
| /textfile3.txt |
| /textfile4.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1228
Scenario Outline: get favorited elements paginated in subfolder
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile1.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile2.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile3.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile4.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile5.txt"
And user "Alice" has favorited element "/subfolder/textfile0.txt"
And user "Alice" has favorited element "/subfolder/textfile1.txt"
And user "Alice" has favorited element "/subfolder/textfile2.txt"
And user "Alice" has favorited element "/subfolder/textfile3.txt"
And user "Alice" has favorited element "/subfolder/textfile4.txt"
And user "Alice" has favorited element "/subfolder/textfile5.txt"
When user "Alice" lists the favorites and limits the result to 3 elements using the WebDAV API
Then the search result should contain any "3" of these entries:
| /subfolder/textfile0.txt |
| /subfolder/textfile1.txt |
| /subfolder/textfile2.txt |
| /subfolder/textfile3.txt |
| /subfolder/textfile4.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1228
Scenario Outline: favoriting a folder does not change the favorite state of elements inside the folder
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/PARENT/parent.txt" using the WebDAV API
And user "Alice" favorites element "/PARENT" using the WebDAV API
Then the HTTP status code should be "207"
And user "Alice" should have the following favorited items
| /PARENT |
| /PARENT/parent.txt |
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@@ -1,114 +0,0 @@
@skipOnReva
Feature: favorite
As a user
I want to favorite the shared resources
So that I can access them quickly
Background:
Given user "Alice" has been created with default attributes
And user "Alice" has created folder "/PARENT"
And user "Alice" has uploaded file with content "some data" to "/PARENT/parent.txt"
Scenario Outline: favorite a file inside of a received share
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/Shares/PARENT/parent.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/Shares/PARENT/parent.txt" should be favorited
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: favorite a folder inside of a received share
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/PARENT/sub-folder"
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/Shares/PARENT/sub-folder" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT/sub-folder" should be favorited
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: favorite a received share itself
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
When user "Brian" favorites element "/Shares/PARENT" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT" should be favorited
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1228
Scenario Outline: moving a favorite file out of a share keeps favorite state
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has sent the following resource share invitation:
| resource | PARENT |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "PARENT" synced
And user "Brian" has favorited element "/Shares/PARENT/parent.txt"
When user "Brian" moves file "/Shares/PARENT/parent.txt" to "/taken_out.txt" using the WebDAV API
Then the HTTP status code should be "201"
And as "Brian" file "/taken_out.txt" should exist
And as user "Brian" file "/taken_out.txt" should be favorited
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: sharee file favorite state should not change the favorite state of sharer
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has sent the following resource share invitation:
| resource | PARENT/parent.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "parent.txt" synced
When user "Brian" favorites element "/Shares/parent.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/Shares/parent.txt" should be favorited
And as user "Alice" file "/PARENT/parent.txt" should not be favorited
Examples:
| dav-path-version |
| old |
| new |
| spaces |