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

investigate `webUISharingExpirationDate/shareWithExpirationDate.feature:21` nightly failure #7073

Closed SagarGi closed 2 years ago

SagarGi commented 2 years ago

build https://drone.owncloud.com/owncloud/web/25924/44/20

webUISharingExpirationDate/shareWithExpirationDate.feature:21 ``` @smokeTest @issue-4169 Scenario: share a file with another internal user which should expire after 2 days with shares mounted in "Shares" # features/webUISharingExpirationDate/shareWithExpirationDate.feature:21 - Connecting to selenium on port 4444... ℹ Connected to selenium on port 4444 (220ms). Using: chrome (94.0.4606.61) on Linux platform. INFO: setting screen resolution to 768x1024 Could not read config file. Set correct path of config file in WEB_UI_CONFIG env variable to fix this. Some tests may fail as a result. Given these users have been created with default attributes and without skeleton files in the server: │ username │ │ Alice │ │ Brian │ Given the administrator has set the default folder for received shares to "Shares" in the server And user "Alice" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server And user "Alice" has logged in using the webUI √ Element <#user> was visible after 796 milliseconds. √ Element <#user> was not present after 15 milliseconds. √ Element <#files-view> was visible after 875 milliseconds. When the user shares file "testimage.jpg" with user "Brian Murphy" which expires in "+2" days using the webUI √ Element was visible after 20 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element was present after 9 milliseconds. √ Element <#files-share-invite-input> was visible after 24 milliseconds. √ Element <#new-collaborators-form .vs__dropdown-menu .files-collaborators-autocomplete-user-text> was visible after 22 milliseconds. √ Element <#files-collaborators-role-button-new> was visible after 25 milliseconds. √ Element was visible after 24 milliseconds. √ Element <.vc-title> was visible after 43 milliseconds. √ Element <.vc-nav-title.vc-grid-focus> was visible after 29 milliseconds. Timed out while waiting for element to be present for 500 milliseconds. - expected "visible" but got: "not found" (503ms) undefined ✖ failed Timed out while waiting for element to be present for 500 milliseconds. - expected "visible" but got: "not found" (503ms) at Proxy.isExpiryDateDisabled (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/expirationDatePicker.js:125:10) at Proxy.setExpirationDate (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/expirationDatePicker.js:185:37) at Proxy.shareWithUserOrGroup (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/sharingDialog.js:193:12) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5) Then user "Brian" should have received a share with target "Shares/testimage.jpg" and expiration date in 2 days in the server - skipped Result: FAILED ```
sushmita56 commented 2 years ago

On multiple runs, the test is failing locally too. While running the same 50 scenarios at once, two scenarios of them failed. The failure was because the test was not waiting long enough for the year selector, so I increased the wait from 500ms to 800ms and now the test passes.

saw-jan commented 2 years ago

Should we set an expiration date like in e2e tests instead of using the date picker UI?

https://github.com/owncloud/web/blob/8b15e04dda3ecab427f98d95523af71e86d5897a/tests/e2e/support/objects/app-files/link/actions.ts#L70-L75

CC @phil-davis @individual-it

phil-davis commented 2 years ago

Should we set an expiration date like in e2e tests instead of using the date picker UI?

We have had trouble automating the control of date-pickers in UIs - there are many combinations of what a real user has to do in order to choose a date "x" days in the future. Maybe they can select a date in the current month, maybe they need to change to the next month, maybe they need to change to the next year, maybe something unusual happens with the way the weeks of a month are displayed.

If we don't use the date-picker then we will not know if the date-picker is broken. But we will have more reliable tests for the "real" underlying behavior.

@individual-it what do you think we should do?

individual-it commented 2 years ago

I don't understand why there is a hardcoded timeout in the first place, we should delete it and that would use the default timeout see #7083