Skip to content

Commit 9bcf597

Browse files
committed
adding test for thumbnail service
1 parent c0772c0 commit 9bcf597

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

tests/acceptance/features/coreApiWebdavPreviews/previews.feature

+19-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ Feature: previews of files downloaded through the webdav API
377377
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
378378
And using <dav-path-version> DAV path
379379
And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
380-
When user "Alice" downloads the preview of "/testimage.jpg" with width "36" and height "36" and processor thumbnail using the WebDAV API
380+
When user "Alice" downloads the preview of "/testimage.jpg" with width "32" and height "32" and processor thumbnail using the WebDAV API
381381
Then the HTTP status code should be "403"
382382
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
383383
Examples:
@@ -395,11 +395,28 @@ Feature: previews of files downloaded through the webdav API
395395
| THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
396396
And using <dav-path-version> DAV path
397397
And user "Alice" has uploaded file "filesForUpload/lorem-big.txt" to "/lorem-big.txt"
398-
When user "Alice" downloads the preview of "/lorem-big.txt" with width "36" and height "36" and processor thumbnail using the WebDAV API
398+
When user "Alice" downloads the preview of "/lorem-big.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
399399
Then the HTTP status code should be "403"
400400
And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
401401
Examples:
402402
| dav-path-version |
403403
| old |
404404
| new |
405405
| spaces |
406+
407+
@issue-10589 @env-config
408+
Scenario Outline: download a file preview when the maximum thumbnail input value in the environment is set to a valid value
409+
Given the following configs have been set:
410+
| config | value |
411+
| THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
412+
| THUMBNAILS_MAX_INPUT_WIDTH | 700 |
413+
| THUMBNAILS_MAX_INPUT_HEIGHT | 700 |
414+
And using <dav-path-version> DAV path
415+
And user "Alice" has uploaded file with content "hello world" to "test.txt"
416+
When user "Alice" downloads the preview of "/test.txt" with width "32" and height "32" and processor thumbnail using the WebDAV API
417+
Then the HTTP status code should be "200"
418+
Examples:
419+
| dav-path-version |
420+
| old |
421+
| new |
422+
| spaces |

0 commit comments

Comments
 (0)