owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
448 stars 156 forks source link

webUIFiles/download.feature:11 failed #6001

Closed phil-davis closed 2 years ago

phil-davis commented 3 years ago

https://drone.owncloud.com/owncloud/web/20136/52/13

  Scenario: Try to download file and folder that used to exist but does not anymore # features/webUIFiles/download.feature:11
- Connecting to selenium on port 4444...

  Using: chrome (94.0.4606.61) on Linux platform.

ℹ Connected to selenium on port 4444 (289ms).
    Given user "Alice" has been created with default attributes and without skeleton files
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 928 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 239 milliseconds.
√ Element <.oc-app-container> was visible after 643 milliseconds.
    Given user "Alice" has created file "lorem.txt"
    And the user has browsed to the files page
√ Element <//nav[@id="files-breadcrumb"]//*[(self::a or self::button) and contains(text(),'All files')]> was visible after 36 milliseconds.
    And the following files have been deleted by user "Alice"
      │ name      │
      │ lorem.txt │
    When the user downloads file "lorem.txt" using the webUI
   NoSuchElementError: An error occurred while running .isVisible() command on <//*[@id="files-sidebar"]>: 
   {"sessionId":"7fb5c36d802a5989ee699143379f5cef","status":0,"value":[]}
       at Proxy.isSideBarOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:30:18)
       at Proxy.isSideBarOpenForResource (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:43:24)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:232:28)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:218:18)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:144:18)
       at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:1227:51)
   NoSuchElementError: An error occurred while running .isVisible() command on <//*[@id="files-sidebar"]>: 
   {"sessionId":"7fb5c36d802a5989ee699143379f5cef","status":0,"value":[]}
       at Proxy.isSideBarOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:30:18)
       at Proxy.closeSidebarIfOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:13:24)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:238:24)
       at runMicrotasks (<anonymous>)
       at processTicksAndRejections (internal/process/task_queues.js:95:5)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:218:7)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:144:7)
   NoSuchElementError: An error occurred while running .isVisible() command on <//*[@id="files-sidebar"]>: 
   {"sessionId":"7fb5c36d802a5989ee699143379f5cef","status":0,"value":[]}
       at Proxy.isSideBarOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:30:18)
       at Proxy.closeSidebarIfOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:13:24)
       at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:358:24)
       at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:251:18)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:241:18)
       at runMicrotasks (<anonymous>)
       at processTicksAndRejections (internal/process/task_queues.js:95:5)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:218:7)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:144:7)
Timed out while waiting for element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='lorem.txt' or @data-test-resource-path='/lorem.txt')]/ancestor::tr[contains(@class, "oc-tbody-tr")]> to be present for 5000 milliseconds. - expected "found" but got: "not found" (5001ms)
undefined    ✖ failed
      Timed out while waiting for element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='lorem.txt' or @data-test-resource-path='/lorem.txt')]/ancestor::tr[contains(@class, "oc-tbody-tr")]> to be present for 5000 milliseconds. - expected "found" but got: "not found" (5001ms)
          at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:360:18)
          at runMicrotasks (<anonymous>)
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
          at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:251:7)
          at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:241:7)
          at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:218:7)
          at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:144:7)
    Then the error message with header 'Download failed' should be displayed on the webUI
    - skipped
    When the user reloads the current page of the webUI
    - skipped
    Then file "lorem.txt" should not be listed on the webUI
    - skipped
    And as "Alice" file "lorem.txt" should not exist
    - skipped

This looks like an intermittent failure. Needs to be investigated.

kiranparajuli589 commented 3 years ago

reported scenario passed multiple times in the test PR without flakyness.

phil-davis commented 3 years ago

Note: we can't reproduce this locally or running many times in CI. If it happens again in nightly CI then I will reopen the issue.

phil-davis commented 2 years ago

https://drone.owncloud.com/owncloud/web/23115/56/15

Scenario: Try to download file and folder that used to exist but does not anymore # features/webUIFiles/download.feature:11
- Connecting to selenium on port 4444...

ℹ Connected to selenium on port 4444 (284ms).
  Using: chrome (94.0.4606.61) on Linux platform.

    Given user "Alice" has been created with default attributes and without skeleton files in the server
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 612 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 87 milliseconds.
√ Element <#files-view> was visible after 607 milliseconds.
    Given user "Alice" has created file "lorem.txt" in the server
    And the user has browsed to the files page
√ Element <//nav[@id="files-breadcrumb"]//*[(self::a or self::button)]/span[contains(text(),'All files')]> was visible after 29 milliseconds.
    And the following files have been deleted by user "Alice" in the server
      │ name      │
      │ lorem.txt │
    When the user downloads file "lorem.txt" using the webUI
   NoSuchElementError: An error occurred while running .isVisible() command on <//*[@id="files-sidebar"]>: 
   {"sessionId":"c48c85fad891fb24636c4863425afef4","status":0,"value":[]}
       at Proxy.isSideBarOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:30:18)
       at Proxy.isSideBarOpenForResource (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:52:24)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:246:28)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:232:18)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:158:18)
       at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:1114:51)
   NoSuchElementError: An error occurred while running .isVisible() command on <//*[@id="files-sidebar"]>: 
   {"sessionId":"c48c85fad891fb24636c4863425afef4","status":0,"value":[]}
       at Proxy.isSideBarOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:30:18)
       at Proxy.closeSidebarIfOpen (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/appSideBar.js:13:24)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:252:24)
       at runMicrotasks (<anonymous>)
       at processTicksAndRejections (internal/process/task_queues.js:95:5)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:232:7)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:158:7)
   NoSuchElementError: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='lorem.txt' or @data-test-resource-path='/lorem.txt')]>: 
   {"sessionId":"c48c85fad891fb24636c4863425afef4","status":0,"value":[]}
       at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:367:18)
       at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:336:18)
       at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:265:18)
       at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:255:18)
       at runMicrotasks (<anonymous>)
       at processTicksAndRejections (internal/process/task_queues.js:95:5)
       at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:232:7)
       at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:158:7)
    ✖ failed
      AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='lorem.txt' or @data-test-resource-path='/lorem.txt')]>:
          at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:377:16)
          at runMicrotasks (<anonymous>)
          at processTicksAndRejections (internal/process/task_queues.js:95:5)
          at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:336:7)
          at Proxy.clickRow (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:265:7)
          at Proxy.openSideBar (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:255:7)
          at Proxy.openFileActionsMenu (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:232:7)
          at Proxy.downloadFile (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:158:7)
    Then the error message with header 'Download failed' should be displayed on the webUI
    - skipped
    When the user reloads the current page of the webUI
    - skipped
    Then file "lorem.txt" should not be listed on the webUI
    - skipped
    And as "Alice" file "lorem.txt" should not exist in the server
    - skipped
saving screenshot of failed test

This is a bit of a strange test scenario, it relies on the idea that the file has been deleted on the back-end server, while it is listed on the web UI, and the user of the UI then tries to delete it. It seems that sometimes the file is not listed on the web UI - maybe it was not listed in the first place.

It might help to move Given user "Alice" has created file "lorem.txt" in the server to before the step when Alice logs in. The Background will need refactoring to do that.

phil-davis commented 2 years ago

PR #6498 should improve this.