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

Cypress: Instability in Complete Actions (dialog partly disabled) #601

Closed
achaikou opened this issue Sep 7, 2021 · 4 comments
Closed

Cypress: Instability in Complete Actions (dialog partly disabled) #601

achaikou opened this issue Sep 7, 2021 · 4 comments
Assignees

Comments

@achaikou
Copy link
Contributor

achaikou commented Sep 7, 2021

https://dashboard.cypress.io/projects/ry3x7y/runs/90/overview/a2e633d9-ae4d-4214-a2b7-cad569fff63e/screenshots
https://dashboard.cypress.io/projects/ry3x7y/runs/97/overview/225369c8-0f53-45d6-be7e-331561259ace/screenshots
Initial investigation yesterday didn't give any results.
Reason is unclear, as we also see that priority select is disabled (as if the whole right side of the dialog, it seems), but nothing in the code does it. So reason might be very tightly coupled cypress/CI/react.

Was yet unable to reproduce locally.

@achaikou achaikou changed the title Cypress: Instability in Complete Actions Cypress: Instability in Complete Actions (dialog partly disabled) Sep 7, 2021
@achaikou
Copy link
Contributor Author

achaikou commented Sep 7, 2021

I am really out of good ideas here.
Problem appeared twice in the short period of time, which means it will unlikely go away on its own. Which means we better figure out the reason.

  • The failing sequence is the same as in Edit Action test, only that Edit Action is yet to fail with this problem
  • It might indicate that it is somehow connected to the previous test (as both times the second test in Complete Actions sequence failed), only that it looks like all the calls were complete in previous test and all data was visible, so it unlikely that something lingers
  • there apparently were many graphql loading bugs, and I saw some of them locally, but none of them would explain the disabled right part of the module window. We have disabling parameter for create notes button and for complete button, but not for Priority select. That probably indicates that error is not caused by our code.
  • other interesting point is that tabIndex for button is -1. It would have seemed like we managed to grab incorrect element if not for the fact that we see everything is disabled on screenshot. So most likely it really rendered like that.
  • looks like this can be reproduced only on CI, so on really fast machine. Unfortunately the dom history is not available there, it's on the list of cypress possible improvements.

It's also unclear what steps to fix this issue we can take. There seems to be nothing to wait for, as run looks exactly the same as non-failing ones, and everything looks to be loaded.

@achaikou
Copy link
Contributor Author

achaikou commented Sep 8, 2021

We have a full "complete" run failing with this error now
https://dashboard.cypress.io/projects/ry3x7y/runs/115/overview

And this is related!
https://dashboard.cypress.io/projects/ry3x7y/runs/113/overview/8d73193f-7a47-455d-9bf4-2134df61bddd/screenshots
View is the same, but apparently the full dialog is disabled

@achaikou
Copy link
Contributor Author

achaikou commented Sep 8, 2021

Mystery solved.

  • when issue was first discovered, we didn't have a git log, so I couldn't see from the dashboard if PR or master caused it. Even with git log it unfortunately wasn't clear that issue is caused by the same PR
  • after issue got merged without first fixing the tests, it spread out to all other PRs (as they are run against master!) leading me to believe this is a weird instability caused by who-knows-what
  • the implementation didn't help, as according to it just some of the values were disabled
  • low quality of cypress screenshots and videos led me to believe that for example Due date is not disabled

So two points:

  • all action tests must be modified to disallow deletion for the users which are not supposed to do that
  • see if it is possible not to confuse users in UI by making them think some elements are not disabled

image

@achaikou
Copy link
Contributor Author

achaikou commented Sep 9, 2021

  • The view is apparently can't be better as we don't have control over components
  • tests themselves are fixed in the Revise actions test #586

@achaikou achaikou closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant