Closed phil-davis closed 2 years ago
reported scenario passed multiple times in the test PR without flakyness.
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.
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.
PR #6498 should improve this.
https://drone.owncloud.com/owncloud/web/20136/52/13
This looks like an intermittent failure. Needs to be investigated.