Closed SagarGi closed 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.
Should we set an expiration date like in e2e tests instead of using the date picker UI?
CC @phil-davis @individual-it
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?
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
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 /span[contains(@class, "oc-resource-name") and (@data-test-resource-name='testimage.jpg' or @data-test-resource-path='/testimage.jpg')]/ancestor::tr[contains(@class, "oc-tbody-tr")]> was visible after 20 milliseconds. waiting for 500ms ... Timeout waiting for Ajax calls to start waiting for 500ms ... √ Element /*[@id="sidebar-panel-sharing-item"]//*[contains(@class, "sidebar-panel__body-content")]> 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 /button[contains(@class, "files-collaborators-expiration-button")]> 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 /span[contains(@class, "vc-nav-item") and @role="button" and normalize-space(.)="2022"]> to be present for 500 milliseconds. - expected "visible" but got: "not found" (503ms) undefined ✖ failed Timed out while waiting for element /span[contains(@class, "vc-nav-item") and @role="button" and normalize-space(.)="2022"]> 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 (