Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests-Only] preview tests modified for ocis server #38744

Merged
merged 1 commit into from
May 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions tests/acceptance/features/apiWebdavPreviews/previews.feature
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@api @issue-ocis-187 @preview-extension-required
@api @preview-extension-required
Feature: previews of files downloaded through the webdav API

Background:
Given user "Alice" has been created with default attributes and without skeleton files

@issue-ocis-200
Scenario Outline: download previews of different sizes
@skipOnOcis @issue-ocis-2069
Scenario Outline: download different sizes of previews of file
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
When user "Alice" downloads the preview of "/parent.txt" with width <width> and height <height> using the WebDAV API
Then the HTTP status code should be "200"
Expand Down Expand Up @@ -52,15 +52,15 @@ Feature: previews of files downloaded through the webdav API
| A |
| %2F |

@issue-ocis-200

Scenario: download previews of files inside sub-folders
Given user "Alice" has created folder "subfolder"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/subfolder/parent.txt"
When user "Alice" downloads the preview of "/subfolder/parent.txt" with width "32" and height "32" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded image should be "32" pixels wide and "32" pixels high

@issue-ocis-189

Scenario Outline: download previews of file types that don't support preview
Given user "Alice" has uploaded file "filesForUpload/<filename>" to "/<newfilename>"
When user "Alice" downloads the preview of "/<newfilename>" with width "32" and height "32" using the WebDAV API
Expand All @@ -72,7 +72,7 @@ Feature: previews of files downloaded through the webdav API
| simple.odt | test.odt |
| new-data.zip | test.zip |

@issue-ocis-187

Scenario Outline: download previews of different image file types
Given user "Alice" has uploaded file "filesForUpload/<imageName>" to "/<newImageName>"
When user "Alice" downloads the preview of "/<newImageName>" with width "32" and height "32" using the WebDAV API
Expand All @@ -83,15 +83,15 @@ Feature: previews of files downloaded through the webdav API
| testavatar.jpg | testimage.jpg |
| testavatar.png | testimage.png |

@issue-ocis-187

Scenario: download previews of image after renaming it
Given user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
When user "Alice" moves file "/testimage.jpg" to "/testimage.txt" using the WebDAV API
And user "Alice" downloads the preview of "/testimage.txt" with width "32" and height "32" using the WebDAV API
Then the HTTP status code should be "200"
And the downloaded image should be "32" pixels wide and "32" pixels high

@issue-ocis-68
@issue-ocis-2067
Scenario: download previews of shared files
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
Expand All @@ -100,7 +100,7 @@ Feature: previews of files downloaded through the webdav API
Then the HTTP status code should be "200"
And the downloaded image should be "32" pixels wide and "32" pixels high

@issue-ocis-thumbnails-191
@issue-ocis-2071 @skipOnOcis
Scenario: download previews of other users files
Given user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
Expand All @@ -109,7 +109,7 @@ Feature: previews of files downloaded through the webdav API
And the value of the item "/d:error/s:message" in the response about user "Alice" should be "File not found: parent.txt in '%username%'"
And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"

@skipOnOcV10.3 @skipOnOcV10.4.0 @issue-ocis-190
@skipOnOcV10.3 @skipOnOcV10.4.0 @issue-ocis-2064
Scenario: download previews of folders
Given user "Alice" has created folder "subfolder"
When user "Alice" downloads the preview of "/subfolder/" with width "32" and height "32" using the WebDAV API
Expand All @@ -123,15 +123,15 @@ Feature: previews of files downloaded through the webdav API
And the value of the item "/d:error/s:message" in the response about user "Alice" should be "File with name parent.txt could not be located"
And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"

@issue-ocis-192
@issue-ocis-192 @issue-ocis-2070 @skipOnOcis
Scenario: Download file previews when it is disabled by the administrator
Given the administrator has updated system config key "enable_previews" with value "false" and type "boolean"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
When user "Alice" downloads the preview of "/parent.txt" with width "32" and height "32" using the WebDAV API
Then the HTTP status code should be "404"
And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"

@issue-ocis-193
@issue-ocis-2070 @skipOnOcis
Scenario: unset maximum size of previews
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
And the administrator has updated system config key "preview_max_x" with value "null"
Expand All @@ -140,7 +140,7 @@ Feature: previews of files downloaded through the webdav API
Then the HTTP status code should be "404"
And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound"

@skipOnOcV10.3 @skipOnOcV10.4.0 @issue-ocis-193
@issue-ocis-2070 @skipOnOcV10.3 @skipOnOcV10.4.0 @skipOnOcis
Scenario: set maximum size of previews
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
When the administrator updates system config key "preview_max_x" with value "null" using the occ command
Expand All @@ -150,7 +150,7 @@ Feature: previews of files downloaded through the webdav API
Then the HTTP status code should be "400"
And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\BadRequest"

@issue-ocis-200
@issue-ocis-2070 @skipOnOcis
Scenario Outline: download previews of different size smaller than the maximum size set
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
And the administrator has updated system config key "preview_max_x" with value "32"
Expand All @@ -165,7 +165,7 @@ Feature: previews of files downloaded through the webdav API
| 32 | 12 | 200 |
| 12 | 32 | 200 |

@issue-ocis-200
@issue-ocis-2070 @skipOnOcis
Scenario Outline: download previews of different size larger than the maximum size set
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/parent.txt"
And the administrator has updated system config key "preview_max_x" with value "32"
Expand Down