Closed SagarGi closed 2 years ago
Scenario: conflict with a big file (when chunking is implemented this upload should be chunked)
Given a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally in the middleware
When the user renames file "lorem.txt" to "big-video.mp4" using the webUI
And the user reloads the current page of the webUI
And the user uploads a created file "big-video.mp4" with overwrite using the webUI
Then file "big-video.mp4" should be listed on the webUI
And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4"
In the above scenario, however, the step And the user uploads a created file "big-video.mp4" with overwrite using the webUI
pass successfully, the file big-video.mp4
which is supposed to be synced/uploaded may not have been synced actually to the server due to some reason. And there is no wonder on the passing of the following step Then file "big-video.mp4" should be listed on the webUI
because the file big-video.mp4
already exists there no matter whether the local big-video.mp4
file was successfully uploaded or not. So when the content of the file big-video.mp4
is checked in step And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4"
, the content of the local file and the file on the server may not be the same because the file may not have been synced as I already said. And the unmatched content of those two files results in AssertionError
.
We can wait for the Upload complete
message dialog to strongly assure that the folder gets uploaded successfully. Done in this PR https://github.com/owncloud/web/pull/7416
The proposed PR has been merged so this issue can be closed now.
Now, this test failed with different error. see https://drone.owncloud.com/owncloud/web/27494/37/20
Suite: webUIUpload/upload.feature:94
Feature: conflict with a big file (when chunking is implemented this upload should be chunked)
Scenario: conflict with a big file (when chunking is implemented this upload should be chunked) # features/webUIUpload/upload.feature:94
- Connecting to selenium on port 4444...
ℹ Connected to selenium on port 4444 (244ms).
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 created folder "simple-folder" in the server
And user "Alice" has uploaded file with content "initial content" to "lorem.txt" in the server
And user "Alice" has uploaded file with content "initial content" to "simple-folder/lorem.txt" in the server
And user "Alice" has logged in using the webUI
√ Element <#user> was visible after 806 milliseconds.
√ Element <#user> was not present after 18 milliseconds.
√ Element <#files-view> was visible after 948 milliseconds.
√ Element <//*[self::table[contains(@class, "files-table")] or self::div[contains(@class, "files-empty")] or self::div[contains(@class, "files-not-found")]]> was visible after 118 milliseconds.
Given a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally in the middleware
When the user renames file "lorem.txt" to "big-video.mp4" using the webUI
√ 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")]> was visible after 26 milliseconds.
waiting for 500ms ...
Timeout waiting for Ajax calls to start
waiting for 500ms ...
√ Element <//*[@id="sidebar-panel-actions-item"]//*[contains(@class, "sidebar-panel__body-content")]> was present after 10 milliseconds.
√ Element <.oc-modal> was visible after 23 milliseconds.
waiting for 500ms ...
√ Element <.oc-modal> was not present after 106 milliseconds.
And the user reloads the current page of the webUI
And the user uploads a created file "big-video.mp4" with overwrite using the webUI
√ Element <#upload-menu-btn:not([disabled])> was visible after 467 milliseconds.
√ Element <#files-file-upload-button> was visible after 35 milliseconds.
waiting for 500ms ...
√ Element <.oc-modal-body-actions-confirm:enabled> was visible after 23 milliseconds.
√ Element <.oc-modal> was not present after 10 milliseconds.
√ Element <.upload-info-status .upload-info-success, .upload-info-status .upload-info-danger> was visible after 180 milliseconds.
Then file "big-video.mp4" should be listed on the webUI
Error while running .getElementText() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference: element i...
TimeoutError: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
{"status":-1,"message":"Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null","stack":"TypeError: Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null\n at Selenium2Protocol.getElementId (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/transport/selenium2.js:9:20)\n at GetText.elementFound (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/element/command.js:165:39)\n at action (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/api/element-commands/_baseElementCommand.js:55:36)\n at PeriodicPromise.perform (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:86:31)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:48:22)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:51:16)"}
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18)
at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18)
at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:352:51)
✖ failed
AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375: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:353:7)
And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4"
- skipped
Result: FAILED
Not reproducible locally even while running it 100 times.
occurred again https://drone.owncloud.com/owncloud/web/27564/37/20
Scenario: conflict with a big file (when chunking is implemented this upload should be chunked) # features/webUIUpload/upload.feature:94
- Connecting to selenium on port 4444...
ℹ Connected to selenium on port 4444 (243ms).
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 created folder "simple-folder" in the server
And user "Alice" has uploaded file with content "initial content" to "lorem.txt" in the server
And user "Alice" has uploaded file with content "initial content" to "simple-folder/lorem.txt" in the server
And user "Alice" has logged in using the webUI
√ Element <#user> was visible after 800 milliseconds.
√ Element <#user> was not present after 25 milliseconds.
√ Element <#files-view> was visible after 872 milliseconds.
√ Element <//*[self::table[contains(@class, "files-table")] or self::div[contains(@class, "files-empty")] or self::div[contains(@class, "files-not-found")]]> was visible after 126 milliseconds.
Given a file with the size of "30000000" bytes and the name "big-video.mp4" has been created locally in the middleware
When the user renames file "lorem.txt" to "big-video.mp4" using the webUI
√ 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")]> was visible after 28 milliseconds.
waiting for 500ms ...
Timeout waiting for Ajax calls to start
waiting for 500ms ...
√ Element <//*[@id="sidebar-panel-actions-item"]//*[contains(@class, "sidebar-panel__body-content")]> was present after 11 milliseconds.
√ Element <.oc-modal> was visible after 29 milliseconds.
waiting for 500ms ...
√ Element <.oc-modal> was not present after 104 milliseconds.
And the user reloads the current page of the webUI
And the user uploads a created file "big-video.mp4" with overwrite using the webUI
√ Element <#upload-menu-btn:not([disabled])> was visible after 485 milliseconds.
√ Element <#files-file-upload-button> was visible after 30 milliseconds.
waiting for 500ms ...
√ Element <.oc-modal-body-actions-confirm:enabled> was visible after 26 milliseconds.
√ Element <.oc-modal> was not present after 7 milliseconds.
√ Element <.upload-info-status .upload-info-success, .upload-info-status .upload-info-danger> was visible after 169 milliseconds.
Then file "big-video.mp4" should be listed on the webUI
Error while running .getElementText() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference: element i...
TimeoutError: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
{"status":-1,"message":"Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null","stack":"TypeError: Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null\n at Selenium2Protocol.getElementId (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/transport/selenium2.js:9:20)\n at GetText.elementFound (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/element/command.js:165:39)\n at action (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/api/element-commands/_baseElementCommand.js:55:36)\n at PeriodicPromise.perform (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:86:31)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:48:22)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:51:16)"}
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18)
at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18)
at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:352:51)
✖ failed
AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375: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:353:7)
And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4"
- skipped
Again, failed to reproduce the issue locally.
Failed again : https://drone.owncloud.com/owncloud/web/27649/39/20
Then file "big-video.mp4" should be listed on the webUI
Error while running .getElementText() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference: element i...
TimeoutError: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
{"status":-1,"message":"Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null","stack":"TypeError: Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null\n at Selenium2Protocol.getElementId (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/transport/selenium2.js:9:20)\n at GetText.elementFound (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/element/command.js:165:39)\n at action (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/api/element-commands/_baseElementCommand.js:55:36)\n at PeriodicPromise.perform (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:86:31)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:48:22)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:51:16)"}
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18)
at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18)
at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:352:51)
✖ failed
AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>:
at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375: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:353:7)
And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4"
- skipped
Currently, tasks on some other issues and PRs that I'm assigned to are in progress. So, I'm unassigning myself with this issue as I may not have much time to look into this one.
Failed again : https://drone.owncloud.com/owncloud/web/27649/39/20
Then file "big-video.mp4" should be listed on the webUI Error while running .getElementText() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference: element i... TimeoutError: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>: {"status":-1,"message":"Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null","stack":"TypeError: Cannot read property 'element-6066-11e4-a52e-4f735466cecf' of null\n at Selenium2Protocol.getElementId (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/transport/selenium2.js:9:20)\n at GetText.elementFound (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/element/command.js:165:39)\n at action (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/api/element-commands/_baseElementCommand.js:55:36)\n at PeriodicPromise.perform (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:86:31)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:48:22)\n at PeriodicPromise.runAction (/var/www/owncloud/web/tests/acceptance/node_modules/nightwatch/lib/utils/periodic-promise.js:51:16)"} at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:365:18) at Proxy.waitForFileVisible (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:353:18) at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/filesContext.js:352:51) ✖ failed AssertionError [ERR_ASSERTION]: An error occurred while running .getText() command on <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>: at Proxy.checkFileName (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/filesList.js:375: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:353:7) And as "Alice" the content of "big-video.mp4" in the server should be the same as the content of local file "big-video.mp4" - skipped
Re-occurred at build: https://drone.owncloud.com/owncloud/web/27692/37/20
Failing here as well: https://drone.owncloud.com/owncloud/web/27746/37/20
I will be taking over this issue.
This Error cannot be reproduce locally. All the steps implementation seems to be work fine. The error in getText()
(nightwatch API) returns -1
and also the value of the selector that is passed seems to be correct //span[contains(@class, "oc-resource-name") and (@data-test-resource-name='big-video.mp4' or @data-test-resource-path='/big-video.mp4') and @data-test-resource-type='file']>
.
Also Error while running .getElementText() protocol action: The command failed because the referenced element is no longer attached to the DOM. – stale element reference:
the build gives this error. Upon findings, this error typically arises because of
the element in the DOM is not found because your page is not entirely loaded when Selenium is searching for the element. To solve that, you can put an explicit wait condition that tells Selenium to wait until the element is available
(from web search) but cannot say its because of that in this scenario.
Failed in recent nightly too: https://drone.owncloud.com/owncloud/web/27801/37/20
here as well:https://drone.owncloud.com/owncloud/web/27802/37/20
Failing consistently when debugging in CI https://drone.owncloud.com/owncloud/web/27819/10/21. Seems like a hard failure in CI (But cannot be reproduce locally). Will try to make it some code refactor to make it more stable.
Re-occurred today at https://drone.owncloud.com/owncloud/web/27842/37/20
failed in bump id PR too: https://drone.owncloud.com/owncloud/web/27843/39/20
I still cant figure it out why it is failing but this build seems passing with some refactor. https://drone.owncloud.com/owncloud/web/27846/10/21 (113) consistent passing. I will add more scenarios to check its consistent.
Consistently passing with (226) scenarios without a single fail https://drone.owncloud.com/owncloud/web/27849/10/21 after some refactor to the code. i will double the scenarios again for lasttime.
I debug it through some code refactor and it seems to be passing (500+ scenarios) with this https://github.com/owncloud/web/pull/7524. I will make a separate PR for this issue.
Closing this issue for now as the refactor PR works consistently https://github.com/owncloud/web/pull/7532. Can be opened if it reappears again.
Build: https://drone.owncloud.com/owncloud/web/27155/37/20
We have related issue https://github.com/owncloud/web/issues/6713 or might be same. I have created new issue to investigate it since error messages are different.