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

Expiration date related test failing in current nightly build #8042

Closed
SwikritiT opened this issue Nov 30, 2022 · 7 comments · Fixed by #8058
Closed

Expiration date related test failing in current nightly build #8042

SwikritiT opened this issue Nov 30, 2022 · 7 comments · Fixed by #8058
Assignees
Labels

Comments

@SwikritiT
Copy link
Contributor

Following tests are failing in current nightly in both storages

webUISharingInternalGroupsToRoot/shareWithGroups.feature:203
webUISharingInternalGroups/shareWithGroups.feature:222

Build link: https://drone.owncloud.com/owncloud/web/30214/23/18

Scenario: change existing expiration date of an existing share with another internal group # features/webUISharingInternalGroups/shareWithGroups.feature:222
   ✔ 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 the setting "shareapi_auto_accept_share" of app "core" has been set to "no" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And the administrator has set the default folder for received shares to "Shares" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76
       | username |
       | Alice    |
       | Brian    |
       | Carol    |
   ✔ And group "grp1" has been created in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has been added to group "grp1" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has been added to group "grp1" in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Carol" has created file "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Carol" has created a new share with following settings in the server # stepDefinitions/middlewareContext.js:76
       | path            | lorem.txt |
       | shareTypeString | group     |
       | shareWith       | grp1      |
       | expireDate      | +14       |
   ✔ And user "Alice" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has accepted the share "Shares/lorem.txt" offered by user "Carol" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Carol" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user edits the collaborator expiry date of "grp1" of file "lorem.txt" to "+7" days using the webUI # stepDefinitions/sharingContext.js:630
   ✖ Then user "Alice" should have received a share with target "Shares/lorem.txt" and expiration date in 7 days in the server # stepDefinitions/middlewareContext.js:66
       Error: AssertionError [ERR_ASSERTION]: Expected Shares/lorem.txt: Wed Dec 07 2022 00:00:00 GMT+0000 (Coordinated Universal Time). Found Shares/lorem.txt: Wed Dec 14 2022 00:00:00 GMT+0000 (Coordinated Universal Time)
           at /usr/src/app/src/stepDefinitions/sharingContext.js:231:28
           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 (node:internal/process/task_queues:96:5)
   - And user "Brian" should have received a share with target "Shares/lorem.txt" and expiration date in 7 days in the server # stepDefinitions/middlewareContext.js:66
   - And user "Carol" should have a share with these details in the server: # stepDefinitions/middlewareContext.js:76
       | field      | value      |
       | path       | /lorem.txt |
       | share_type | group      |
       | uid_owner  | Carol      |
       | share_with | grp1       |
       | expiration | +7         |
   ✔ 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
Scenario: change existing expiration date of an existing share with another internal group # features/webUISharingInternalGroupsToRoot/shareWithGroups.feature:203
   ✔ 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 these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76
       | username |
       | Alice    |
       | Brian    |
       | Carol    |
   ✔ And these groups have been created in the server: # stepDefinitions/middlewareContext.js:76
       | groupname |
       | grp1      |
       | grp11     |
   ✔ And user "Alice" has been added to group "grp1" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Brian" has been added to group "grp1" in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Carol" has created file "lorem.txt" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Carol" has created a new share with following settings in the server # stepDefinitions/middlewareContext.js:76
       | path            | lorem.txt |
       | shareTypeString | group     |
       | shareWith       | grp1      |
       | expireDate      | +14       |
   ✔ And user "Carol" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user edits the collaborator expiry date of "grp1" of file "lorem.txt" to "+7" days using the webUI # stepDefinitions/sharingContext.js:630
   ✖ Then user "Alice" should have received a share with target "lorem.txt" and expiration date in 7 days in the server # stepDefinitions/middlewareContext.js:66
       Error: AssertionError [ERR_ASSERTION]: Expected lorem.txt: Wed Dec 07 2022 00:00:00 GMT+0000 (Coordinated Universal Time). Found lorem.txt: Wed Dec 14 2022 00:00:00 GMT+0000 (Coordinated Universal Time)
           at /usr/src/app/src/stepDefinitions/sharingContext.js:231:28
           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 (node:internal/process/task_queues:96:5)
   - And user "Brian" should have received a share with target "lorem.txt" and expiration date in 7 days in the server # stepDefinitions/middlewareContext.js:66
   - And user "Carol" should have a share with these details in the server: # stepDefinitions/middlewareContext.js:76
       | field      | value      |
       | path       | /lorem.txt |
       | share_type | group      |
       | uid_owner  | Carol      |
       | share_with | grp1       |
       | expiration | +7         |
   ✔ 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

Both the tests are failing in the same step, as it's the last day of November there might be some problem with the date picker for next month?

@SwikritiT
Copy link
Contributor Author

might be hard failure the tests are failing in this build too https://drone.owncloud.com/owncloud/web/30215/24/18

@SwikritiT
Copy link
Contributor Author

SwikritiT commented Dec 1, 2022

Build link: https://drone.owncloud.com/owncloud/web/30269/21/18
Two more new tests failing in current nightly along with the previous ones

webUISharingExpirationDate/shareWithExpirationDate.feature:14
webUISharingExpirationDate/shareWithExpirationDate.feature:21
Scenario: share a file with another internal user which should expire after 2 days # features/webUISharingExpirationDate/shareWithExpirationDate.feature:14
   ✔ 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 these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76
       | username |
       | Alice    |
       | Brian    |
   ✔ Given user "Alice" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user shares file "testimage.jpg" with user "Brian Murphy" which expires in "+2" days using the webUI # stepDefinitions/sharingContext.js:860
   ✖ Then user "Brian" should have received a share with target "testimage.jpg" and expiration date in 2 days in the server # stepDefinitions/middlewareContext.js:66
       Error: AssertionError [ERR_ASSERTION]: Expected testimage.jpg: Sat Dec 03 2022 00:00:00 GMT+0000 (Coordinated Universal Time). Found 
           at /usr/src/app/src/stepDefinitions/sharingContext.js:231:28
           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 (node:internal/process/task_queues:96: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
Scenario: share a file with another internal user which should expire after 2 days with shares mounted in "Shares" # features/webUISharingExpirationDate/shareWithExpirationDate.feature:21
   ✔ 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 these users have been created with default attributes and without skeleton files in the server: # stepDefinitions/middlewareContext.js:76
       | username |
       | Alice    |
       | Brian    |
   ✔ Given the administrator has set the default folder for received shares to "Shares" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has uploaded file "testavatar.jpg" to "testimage.jpg" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:68
   ✔ When the user shares file "testimage.jpg" with user "Brian Murphy" which expires in "+2" days using the webUI # stepDefinitions/sharingContext.js:860
   ✖ Then user "Brian" should have received a share with target "Shares/testimage.jpg" and expiration date in 2 days in the server # stepDefinitions/middlewareContext.js:66
       Error: AssertionError [ERR_ASSERTION]: Expected Shares/testimage.jpg: Sat Dec 03 2022 00:00:00 GMT+0000 (Coordinated Universal Time). Found 
           at /usr/src/app/src/stepDefinitions/sharingContext.js:231:28
           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 (node:internal/process/task_queues:96: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

@JammingBen
Copy link
Contributor

JammingBen commented Dec 1, 2022

After a short research: The problem could be that the current year is not selectable.

image

We have a minDate for setting date, which is always today. When manually setting it to yesterday (11/30/2022), selecting the current year works. When setting today (12/01/2022), the current year is not selectable. Maybe because we're now in the last month of the year? Could be a bug in the vue datepicker.

Edit: see nathanreyes/v-calendar#1131

@kulmann
Copy link
Contributor

kulmann commented Dec 1, 2022

@individual-it @phil-davis this lets a lot of tests fail and blocks every PR. can you make this a high priority please?

@kulmann
Copy link
Contributor

kulmann commented Dec 1, 2022

@individual-it @phil-davis this lets a lot of tests fail and blocks every PR. can you make this a high priority please?

@JammingBen is working on it in #8058

@JammingBen
Copy link
Contributor

Hot-patching the v-calender solved the issue: #8058

@phil-davis
Copy link
Contributor

The tests actually found a bug. There could be a latent bug waiting to be noticed on any day of the year! That's the thing about date-time tests - every day/date is new and is a day/date for which the tests have never been run before!

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

Successfully merging a pull request may close this issue.

5 participants