mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
adding test for thumbnail service (#10821)
This commit is contained in:
@@ -376,8 +376,8 @@ Feature: previews of files downloaded through the webdav API
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_WIDTH | 200 |
|
||||
| thumbnails | THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
|
||||
When user "Alice" downloads the preview of "/testimage.jpg" with width "36" and height "36" and processor thumbnail using the WebDAV API
|
||||
And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "/testimage.png"
|
||||
When user "Alice" downloads the preview of "/testimage.png" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
|
||||
Examples:
|
||||
@@ -395,7 +395,7 @@ Feature: previews of files downloaded through the webdav API
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/lorem-big.txt" to "/lorem-big.txt"
|
||||
When user "Alice" downloads the preview of "/lorem-big.txt" with width "36" and height "36" and processor thumbnail using the WebDAV API
|
||||
When user "Alice" downloads the preview of "/lorem-big.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
|
||||
Examples:
|
||||
@@ -403,3 +403,37 @@ Feature: previews of files downloaded through the webdav API
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
@issue-10589 @env-config
|
||||
Scenario Outline: download a file preview when the maximum thumbnail input value in the environment is set to a valid value
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
|
||||
| THUMBNAILS_MAX_INPUT_WIDTH | 700 |
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 700 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file with content "hello world" to "test.txt"
|
||||
When user "Alice" downloads the preview of "/test.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
|
||||
@issue-10589 @env-config
|
||||
Scenario Outline: download an image preview when the maximum thumbnail input value in the environment is set to a valid value
|
||||
Given the following configs have been set:
|
||||
| config | value |
|
||||
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 36KB |
|
||||
| THUMBNAILS_MAX_INPUT_WIDTH | 1250 |
|
||||
| THUMBNAILS_MAX_INPUT_HEIGHT | 650 |
|
||||
And using <dav-path-version> DAV path
|
||||
And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "/testimage.png"
|
||||
When user "Alice" downloads the preview of "/testimage.png" with width "32" and height "32" and processor thumbnail using the WebDAV API
|
||||
Then the HTTP status code should be "200"
|
||||
Examples:
|
||||
| dav-path-version |
|
||||
| old |
|
||||
| new |
|
||||
| spaces |
|
||||
Reference in New Issue
Block a user