Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly fail on webUISharingPublicExpire/shareByPublicLinkExpiringLinks.feature #7320

Closed
SagarGi opened this issue Jul 25, 2022 · 12 comments
Closed
Assignees
Labels

Comments

@SagarGi
Copy link
Member

SagarGi commented Jul 25, 2022

Build: https://drone.owncloud.com/owncloud/web/26985/35/20

1) Scenario: user can change the expiry date of an existing public link to a date that is before the enforced max expiry date # features/webUISharingPublicExpire/shareByPublicLinkExpiringLinks.feature:147
   ✔ Before # setup.js:38
   ✔ Before # setup.js:42
   ✔ Before # setup.js:53
   ✔ Before # setup.js:60
   ✔ Before # setup.js:71
   ✔ Before # stepDefinitions/filesContext.js:17
   ✔ Before # stepDefinitions/generalContext.js:199
   ✔ Before # stepDefinitions/generalContext.js:237
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given the setting "shareapi_default_expire_date" of app "core" has been set to "yes" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And the setting "shareapi_enforce_expire_date" of app "core" has been set to "yes" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has created file "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has created a public link with following settings in the server # stepDefinitions/middlewareContext.js:76
       | path       | lorem.txt   |
       | name       | Public link |
       | expireDate | +5          |
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user edits the public link named "Public link" of file "lorem.txt" changing expireDate to "+7" # stepDefinitions/publicLinkContext.js:122
   ✖ Then user "Alice" should have a share with these details in the server: # stepDefinitions/middlewareContext.js:76
       | field       | value       |
       | share_type  | public_link |
       | uid_owner   | Alice       |
       | permissions | read        |
       | path        | /lorem.txt  |
       | name        | Public link |
       | expiration  | +7          |
       Error: AssertionError [ERR_ASSERTION]: could not find expected share in "{
         "ocs": {
           "meta": {
             "status": "ok",
             "statuscode": 200,
             "message": null,
             "totalitems": "",
             "itemsperpage": ""
           },
           "data": [
             {
               "id": "51",
               "share_type": 3,
               "uid_owner": "Alice",
               "displayname_owner": "Alice Hansen",
               "permissions": 1,
               "stime": 1658625057,
               "parent": null,
               "expiration": "2022-07-24 00:00:00",
               "token": "O1CmLmnNhmd6sRk",
               "uid_file_owner": "Alice",
               "displayname_file_owner": "Alice Hansen",
               "additional_info_owner": null,
               "additional_info_file_owner": null,
               "path": "/lorem.txt",
               "mimetype": "text/plain",
               "storage_id": "home::Alice",
               "storage": 45,
               "item_type": "file",
               "item_source": 250,
               "file_source": 250,
               "file_parent": 248,
               "file_target": "/lorem.txt",
               "name": "Public link",
               "url": "http://owncloud/index.php/s/O1CmLmnNhmd6sRk",
               "mail_send": 0,
               "attributes": null
             }
           ]
         }
       }"

This seems like the expiration date from the response is not correct. Needs an investigation before it will intermittently behave.

@sushmita56 sushmita56 self-assigned this Jul 25, 2022
@sushmita56
Copy link
Contributor

sushmita56 commented Jul 26, 2022

Not reproducible locally

@sushmita56 sushmita56 removed their assignment Jul 26, 2022
@SagarGi
Copy link
Member Author

SagarGi commented Jul 26, 2022

@sushmita56 do not remove you assignment as it is in progress. Please get someone to finalize what to do with the issue, otherwise it will be in progress without any assignees.

@sushmita56
Copy link
Contributor

Moving to the backlog, for now, can be brought to the current sprint if reappears again.

@amrita-shrestha
Copy link
Contributor

Re-occurred again in build: https://drone.owncloud.com/owncloud/web/27697/35/20

@sushmita56 sushmita56 self-assigned this Aug 22, 2022
@SwikritiT
Copy link
Contributor

occured again here: https://drone.owncloud.com/owncloud/web/27698/35/20

1) Scenario: user can change the expiry date of an existing public link to a date that is before the enforced max expiry date # features/webUISharingPublicExpire/shareByPublicLinkExpiringLinks.feature:147
   ✔ Before # setup.js:38
   ✔ Before # setup.js:42
   ✔ Before # setup.js:53
   ✔ Before # setup.js:60
   ✔ Before # setup.js:71
   ✔ Before # stepDefinitions/filesContext.js:17
   ✔ Before # stepDefinitions/generalContext.js:206
   ✔ Before # stepDefinitions/generalContext.js:244
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given the setting "shareapi_default_expire_date" of app "core" has been set to "yes" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And the setting "shareapi_enforce_expire_date" of app "core" has been set to "yes" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has created file "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has created a public link with following settings in the server # stepDefinitions/middlewareContext.js:76
       | path       | lorem.txt   |
       | name       | Public link |
       | expireDate | +5          |
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user edits the public link named "Public link" of file "lorem.txt" changing expireDate to "+7" # stepDefinitions/publicLinkContext.js:122
   ✖ Then user "Alice" should have a share with these details in the server: # stepDefinitions/middlewareContext.js:76
       | field       | value       |
       | share_type  | public_link |
       | uid_owner   | Alice       |
       | permissions | read        |
       | path        | /lorem.txt  |
       | name        | Public link |
       | expiration  | +7          |
       Error: AssertionError [ERR_ASSERTION]: could not find expected share in "{
         "ocs": {
           "meta": {
             "status": "ok",
             "statuscode": 200,
             "message": null,
             "totalitems": "",
             "itemsperpage": ""
           },
           "data": [
             {
               "id": "51",
               "share_type": 3,
               "uid_owner": "Alice",
               "displayname_owner": "Alice Hansen",
               "permissions": 1,
               "stime": 1661141762,
               "parent": null,
               "expiration": "2022-08-22 00:00:00",
               "token": "pvDlD9v6xStpg56",
               "uid_file_owner": "Alice",
               "displayname_file_owner": "Alice Hansen",
               "additional_info_owner": null,
               "additional_info_file_owner": null,
               "path": "/lorem.txt",
               "mimetype": "text/plain",
               "storage_id": "home::Alice",
               "storage": 45,
               "item_type": "file",
               "item_source": 250,
               "file_source": 250,
               "file_parent": 248,
               "file_target": "/lorem.txt",
               "name": "Public link",
               "url": "http://owncloud/index.php/s/pvDlD9v6xStpg56",
               "mail_send": 0,
               "attributes": null
             }
           ]
         }
       }"
           at /usr/src/app/src/helpers/sharingHelper.js:146:16
           at runMicrotasks (<anonymous>)
           at processTicksAndRejections (node:internal/process/task_queues:96:5)
           at async /usr/src/app/src/app.js:61:7
           at /var/www/owncloud/web/tests/acceptance/stepDefinitions/middlewareContext.js:38:15
           at runMicrotasks (<anonymous>)
           at processTicksAndRejections (internal/process/task_queues.js:95:5)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:262
   ✔ After # stepDefinitions/generalContext.js:231
   ✔ After # stepDefinitions/generalContext.js:172
   ✔ After # setup.js:104
   ✔ After # setup.js:100
   ✔ After # setup.js:96
   ✔ After # setup.js:89
   ✔ After # setup.js:80

@sushmita56
Copy link
Contributor

Failed to reproduce again.

@individual-it
Copy link
Member

skipped for now in #7500
@sushmita56 please see how often it fails in CI
It might be also only happen on specifics days or times

@saw-jan
Copy link
Member

saw-jan commented Aug 22, 2022

I am guessing this fail is also related to #7227
I mean, both tests might be failing due to same issue

@saw-jan
Copy link
Member

saw-jan commented Aug 22, 2022

Looks like this is a hard failure.
@sushmita56 Please, pull the latest master and try again.

@phil-davis
Copy link
Contributor

@sushmita56 @saw-jan note that the test scenario has been skipped completely in web PR #7500 which is merged to master. So you will need to unskip the test in any PR where you want to try the scenario.

@sushmita56
Copy link
Contributor

sushmita56 commented Aug 24, 2022

In case the last date of the month is hidden due to the small screen resolution and we wish to set the expiration date to the last day of the month, we will need to scroll down to click that date. Once we hover over the date, the scroller moves up itself, hiding the date again. As a result, our test doesn't get the selector of the date that was supposed to be clicked. That's why our test fails as we get closer to the end of the month.

Screen recording:

web_calendar.mp4

So, as a result of my debugging and findings, I can conclude that this caused the error. Another issue for bug reporting will be created.

@sushmita56
Copy link
Contributor

Bug reported here. #7513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants