Skip to content

Commit

Permalink
Skipped scenarios with updating configs
Browse files Browse the repository at this point in the history
  • Loading branch information
kiranparajuli589 committed May 25, 2021
1 parent 25393cb commit 90728e9
Showing 1 changed file with 10 additions and 46 deletions.
56 changes: 10 additions & 46 deletions tests/acceptance/features/apiWebdavPreviews/previews.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: previews of files downloaded through the webdav API
Background:
Given user "Alice" has been created with default attributes and without skeleton files

@skipOnOcV10
@skipOnOcV10 @issue-2069
Scenario Outline: download different sizes of previews of file on ocis
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
Expand All @@ -18,7 +18,7 @@ Feature: previews of files downloaded through the webdav API
| 1 | 1024 | 16 | 16 |
| 1024 | 1 | 640 | 480 |

@skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
@issue-2069 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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
Expand Down Expand Up @@ -114,16 +114,16 @@ 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

@skipOnOcV10
Scenario: download previews of other users files
@skipOnOcV10 @issue-ocis-2071
Scenario: download previews of other users files in ocis
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"
When user "Brian" downloads the preview of "/parent.txt" of "Alice" 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: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"

@skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
@issue-ocis-2071 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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 @@ -146,24 +146,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-OC-Storage @skipOnOcis-OCIS-Storage
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"

@skipOnOcV10
Scenario: unset maximum size of previews on ocis
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"
And the administrator has updated system config key "preview_max_y" with value "null"
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 "200"
And the downloaded image should be "32" pixels wide and "32" pixels high

@skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
@issue-ocis-2070 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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 @@ -172,7 +163,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-2070 @skipOnOcV10.3 @skipOnOcV10.4.0 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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 @@ -182,7 +173,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"

@skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
@issue-ocis-2070 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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 @@ -197,22 +188,8 @@ Feature: previews of files downloaded through the webdav API
| 32 | 12 | 200 |
| 12 | 32 | 200 |

@skipOnOcV10
Scenario Outline: download previews of different size smaller than the maximum size set on ocis
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"
And the administrator has updated system config key "preview_max_y" with value "32"
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"
And the downloaded image should be "<expected-width>" pixels wide and "<expected-height>" pixels high
Examples:
| width | height | expected-width | expected-height |
| 32 | 32 | 32 | 32 |
| 12 | 12 | 16 | 16 |
| 32 | 12 | 32 | 32 |
| 12 | 32 | 16 | 16 |

@skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
@issue-ocis-2070 @skipOnOcis-OC-Storage @skipOnOcis-OCIS-Storage
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 All @@ -224,16 +201,3 @@ Feature: previews of files downloaded through the webdav API
| width | height | http-code |
| 64 | 64 | 200 |
| 2048 | 2048 | 200 |

@skipOnOcV10
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"
And the administrator has updated system config key "preview_max_y" with value "32"
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"
And the downloaded image should be "<expected-width>" pixels wide and "<expected-height>" pixels high
Examples:
| width | height | expected-width | expected-height |
| 64 | 64 | 64 | 64 |
| 2048 | 2048 | 640 | 480 |

0 comments on commit 90728e9

Please sign in to comment.