owncloud / QA

:collision: public test plans for owncloud components and apps
GNU Affero General Public License v3.0
14 stars 17 forks source link

Tests related to `preview` returns `500` status code #823

Closed PrajwolAmatya closed 1 year ago

PrajwolAmatya commented 1 year ago

Build link: https://drone.owncloud.com/owncloud/ocis/25198/68/5

  Scenario: download previews of files inside sub-folders                                                                   # /drone/src/tests/acceptance/features/coreApiWebdavPreviews/previews.feature:45
    Given user "Alice" has created folder "subfolder"                                                                       # FeatureContext::userHasCreatedFolder()
    And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/subfolder/parent.txt"                                # FeatureContext::userHasUploadedAFileTo()
    When user "Alice" downloads the preview of "/subfolder/parent.txt" with width "32" and height "32" using the WebDAV API # FeatureContext::downloadPreviewOfFiles()
    Then the HTTP status code should be "200"                                                                               # FeatureContext::thenTheHTTPStatusCodeShouldBe()
      HTTP status code 500 is not the expected value 200
      Failed asserting that 500 matches expected '200'.
    And the downloaded image should be "32" pixels wide and "32" pixels high
  Scenario Outline: download previews of file types that don't support preview                                                   # /drone/src/tests/acceptance/features/coreApiWebdavPreviews/previews.feature:53
    Given user "Alice" has uploaded file "filesForUpload/<filename>" to "/<newfilename>"                                         # FeatureContext::userHasUploadedAFileTo()
    When user "Alice" downloads the preview of "/<newfilename>" with width "32" and height "32" using the WebDAV API             # FeatureContext::downloadPreviewOfFiles()
    Then the HTTP status code should be "404"                                                                                    # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the value of the item "/d:error/s:exception" in the response about user "Alice" should be "Sabre\DAV\Exception\NotFound" # WebDavPropertiesContext::assertValueOfItemInResponseAboutUserIs()

    Examples:
      | filename     | newfilename |
      | simple.pdf   | test.pdf    |
      | simple.odt   | test.odt    |
        Failed step: Then the HTTP status code should be "404"
        HTTP status code 500 is not the expected value 404
        Failed asserting that 500 matches expected '404'.
      | new-data.zip | test.zip    |
        Failed step: Then the HTTP status code should be "404"
        HTTP status code 500 is not the expected value 404
        Failed asserting that 500 matches expected '404'.
  Scenario Outline: download previews of different image file types                                                   # /drone/src/tests/acceptance/features/coreApiWebdavPreviews/previews.feature:65
    Given user "Alice" has uploaded file "filesForUpload/<imageName>" to "/<newImageName>"                            # FeatureContext::userHasUploadedAFileTo()
    When user "Alice" downloads the preview of "/<newImageName>" with width "32" and height "32" using the WebDAV API # FeatureContext::downloadPreviewOfFiles()
    Then the HTTP status code should be "200"                                                                         # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And the downloaded image should be "32" pixels wide and "32" pixels high                                          # FeatureContext::imageDimensionsShouldBe()

    Examples:
      | imageName      | newImageName  |
      | testavatar.jpg | testimage.jpg |
        Failed step: Then the HTTP status code should be "200"
        HTTP status code 500 is not the expected value 200
        Failed asserting that 500 matches expected '200'.
      | testavatar.png | testimage.png |
        Failed step: Then the HTTP status code should be "200"
        HTTP status code 500 is not the expected value 200
        Failed asserting that 500 matches expected '200'.
  Scenario: updates to a group shared file should change the preview for both sharees and sharers                         # /drone/src/tests/acceptance/features/coreApiWebdavPreviews/previews.feature:168
    Given group "grp1" has been created                                                                                   # FeatureContext::groupHasBeenCreated()
    And user "Brian" has been created with default attributes and without skeleton files                                  # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And user "Carol" has been created with default attributes and without skeleton files                                  # FeatureContext::userHasBeenCreatedWithDefaultAttributesAndWithoutSkeletonFiles()
    And user "Brian" has been added to group "grp1"                                                                       # FeatureContext::userHasBeenAddedToGroup()
    And user "Carol" has been added to group "grp1"                                                                       # FeatureContext::userHasBeenAddedToGroup()
    And user "Alice" has created folder "FOLDER"                                                                          # FeatureContext::userHasCreatedFolder()
    And user "Alice" has uploaded file with content "file to upload" to "/FOLDER/lorem.txt"                               # FeatureContext::userHasUploadedAFileWithContentTo()
    And user "Alice" has shared folder "/FOLDER" with group "grp1"                                                        # FeatureContext::userHasSharedFileWithGroupUsingTheSharingApi()
    And user "Brian" has accepted share "/FOLDER" offered by user "Alice"                                                 # FeatureContext::userHasReactedToShareOfferedBy()
    And user "Carol" has accepted share "/FOLDER" offered by user "Alice"                                                 # FeatureContext::userHasReactedToShareOfferedBy()
    And user "Alice" has downloaded the preview of "/FOLDER/lorem.txt" with width "32" and height "32"                    # FeatureContext::userDownloadsThePreviewOfWithWidthAndHeight()
    And user "Brian" has downloaded the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32"              # FeatureContext::userDownloadsThePreviewOfWithWidthAndHeight()
    And user "Carol" has downloaded the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32"              # FeatureContext::userDownloadsThePreviewOfWithWidthAndHeight()
    When user "Alice" uploads file "filesForUpload/lorem.txt" to "/FOLDER/lorem.txt" using the WebDAV API                 # FeatureContext::userUploadsAFileTo()
    Then the HTTP status code should be "204"                                                                             # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And as user "Alice" the preview of "/FOLDER/lorem.txt" with width "32" and height "32" should have been changed       # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()
      HTTP status code 500 is not the expected value 200
      Failed asserting that 500 matches expected 200.
    And as user "Brian" the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32" should have been changed # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()
    And as user "Carol" the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32" should have been changed # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()
    When user "Brian" uploads file with content "new uploaded content" to "Shares/FOLDER/lorem.txt" using the WebDAV API  # FeatureContext::userUploadsAFileWithContentTo()
    Then the HTTP status code should be "204"                                                                             # FeatureContext::thenTheHTTPStatusCodeShouldBe()
    And as user "Alice" the preview of "/FOLDER/lorem.txt" with width "32" and height "32" should have been changed       # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()
    And as user "Brian" the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32" should have been changed # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()
    And as user "Carol" the preview of "Shares/FOLDER/lorem.txt" with width "32" and height "32" should have been changed # FeatureContext::asUserThePreviewOfPathWithHeightAndWidthShouldHaveBeenChanged()