check thumbnails in the share with me response (#1605)
* check thumbnails in the share with me response * check preview in report response
This commit is contained in:
@@ -2030,7 +2030,7 @@ class GraphHelper {
|
|||||||
string $user,
|
string $user,
|
||||||
string $password
|
string $password
|
||||||
): ResponseInterface {
|
): ResponseInterface {
|
||||||
$url = self::getBetaFullUrl($baseUrl, "me/drive/sharedWithMe");
|
$url = self::getBetaFullUrl($baseUrl, "me/drive/sharedWithMe?\$expand=thumbnails");
|
||||||
return HttpRequestHelper::get(
|
return HttpRequestHelper::get(
|
||||||
$url,
|
$url,
|
||||||
$xRequestId,
|
$xRequestId,
|
||||||
@@ -2055,7 +2055,7 @@ class GraphHelper {
|
|||||||
string $user,
|
string $user,
|
||||||
string $password
|
string $password
|
||||||
): ResponseInterface {
|
): ResponseInterface {
|
||||||
$url = self::getBetaFullUrl($baseUrl, "me/drive/sharedByMe");
|
$url = self::getBetaFullUrl($baseUrl, "me/drive/sharedByMe?\$expand=thumbnails");
|
||||||
return HttpRequestHelper::get(
|
return HttpRequestHelper::get(
|
||||||
$url,
|
$url,
|
||||||
$xRequestId,
|
$xRequestId,
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ Feature: REPORT request to Shares space
|
|||||||
Scenario Outline: check the REPORT response of the found file
|
Scenario Outline: check the REPORT response of the found file
|
||||||
Given using <dav-path-version> DAV path
|
Given using <dav-path-version> DAV path
|
||||||
And user "Alice" has uploaded file with content "Not all those who wander are lost." to "/folderMain/SubFolder1/subFOLDER2/frodo.txt"
|
And user "Alice" has uploaded file with content "Not all those who wander are lost." to "/folderMain/SubFolder1/subFOLDER2/frodo.txt"
|
||||||
|
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/folderMain/SubFolder1/subFOLDER2/testavatar.jpg"
|
||||||
When user "Brian" searches for "frodo.txt" using the WebDAV API
|
When user "Brian" searches for "frodo.txt" using the WebDAV API
|
||||||
Then the HTTP status code should be "207"
|
Then the HTTP status code should be "207"
|
||||||
And the following headers should match these regular expressions
|
And the following headers should match these regular expressions
|
||||||
@@ -61,6 +62,21 @@ Feature: REPORT request to Shares space
|
|||||||
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
|
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
|
||||||
| d:getcontentlength | 34 |
|
| d:getcontentlength | 34 |
|
||||||
| oc:remote-item-id | %file_id_pattern% |
|
| oc:remote-item-id | %file_id_pattern% |
|
||||||
|
When user "Brian" searches for "testavatar.jpg" using the WebDAV API
|
||||||
|
Then the HTTP status code should be "207"
|
||||||
|
And the following headers should match these regular expressions
|
||||||
|
| X-Request-Id | %request_id_pattern% |
|
||||||
|
And as user "Brian" the REPORT response should contain a resource "testavatar.jpg" with these key and value pairs:
|
||||||
|
| key | value |
|
||||||
|
| oc:fileid | %file_id_pattern% |
|
||||||
|
| oc:file-parent | %file_id_pattern% |
|
||||||
|
| oc:shareroot | /folderMain |
|
||||||
|
| oc:name | testavatar.jpg |
|
||||||
|
| d:getcontenttype | image/jpeg |
|
||||||
|
| oc:permissions | S |
|
||||||
|
| oc:privatelink | %base_url%/f/[0-9a-z-$%]+ |
|
||||||
|
| oc:has-preview | 1 |
|
||||||
|
| oc:remote-item-id | %file_id_pattern% |
|
||||||
Examples:
|
Examples:
|
||||||
| dav-path-version |
|
| dav-path-version |
|
||||||
| old |
|
| old |
|
||||||
|
|||||||
@@ -139,6 +139,68 @@ Feature: resources shared by user
|
|||||||
| Viewer |
|
| Viewer |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: sharer gets thumbnails when listing shared image file (Personal space)
|
||||||
|
Given user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "testavatar.jpg"
|
||||||
|
And user "Alice" has sent the following resource share invitation:
|
||||||
|
| resource | testavatar.jpg |
|
||||||
|
| space | Personal |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
When user "Alice" lists the shares shared by her using the Graph API
|
||||||
|
Then the HTTP status code should be "200"
|
||||||
|
And the JSON data of the response should contain resource "testavatar.jpg" with the following data:
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": [ "thumbnails" ],
|
||||||
|
"properties": {
|
||||||
|
"thumbnails": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["small", "medium", "large"],
|
||||||
|
"properties": {
|
||||||
|
"small": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=36.*y=36"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"medium": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=48.*y=48"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"large": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=96.*y=96"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
Scenario: sharer lists the file share shared from inside a folder (Personal space)
|
Scenario: sharer lists the file share shared from inside a folder (Personal space)
|
||||||
Given user "Alice" has created folder "FolderToShare"
|
Given user "Alice" has created folder "FolderToShare"
|
||||||
And user "Alice" has uploaded file with content "hello world" to "FolderToShare/textfile.txt"
|
And user "Alice" has uploaded file with content "hello world" to "FolderToShare/textfile.txt"
|
||||||
|
|||||||
@@ -315,6 +315,79 @@ Feature: an user gets the resources shared to them
|
|||||||
| Viewer |
|
| Viewer |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario: sharee gets thumbnails when listing shared image file (Personal space)
|
||||||
|
Given user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "testavatar.jpg"
|
||||||
|
And user "Alice" has sent the following resource share invitation:
|
||||||
|
| resource | testavatar.jpg |
|
||||||
|
| space | Personal |
|
||||||
|
| sharee | Brian |
|
||||||
|
| shareType | user |
|
||||||
|
| permissionsRole | Viewer |
|
||||||
|
When user "Brian" lists the shares shared with him using the Graph API
|
||||||
|
Then the HTTP status code should be "200"
|
||||||
|
And the JSON data of the response should match
|
||||||
|
"""
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": ["value"],
|
||||||
|
"properties": {
|
||||||
|
"value": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["thumbnails"],
|
||||||
|
"properties": {
|
||||||
|
"thumbnails": {
|
||||||
|
"type": "array",
|
||||||
|
"minItems": 1,
|
||||||
|
"maxItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["small", "medium", "large"],
|
||||||
|
"properties": {
|
||||||
|
"small": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=36.*y=36"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"medium": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=48.*y=48"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"large": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["url"],
|
||||||
|
"properties": {
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^https://.*scalingup=0.*preview=1.*processor=thumbnail.*x=96.*y=96"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
Scenario Outline: sharee lists the folder share (Personal space)
|
Scenario Outline: sharee lists the folder share (Personal space)
|
||||||
Given user "Alice" has created folder "folder"
|
Given user "Alice" has created folder "folder"
|
||||||
And user "Alice" has sent the following resource share invitation:
|
And user "Alice" has sent the following resource share invitation:
|
||||||
|
|||||||
Reference in New Issue
Block a user