-
-
Notifications
You must be signed in to change notification settings - Fork 739
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
Fix cypress test "As editor, I can unlock a locked page" #5933
Conversation
Sometimes this test fails because it does not find the alert with the message that the content is locked. What may be happening is that the test runs too quickly, and Plone does not consider that the content has been locked. Then we wait a bit for Plone to consider it locked.
✅ Deploy Preview for volto canceled.
|
❌ Deploy Preview for plone-components failed.
|
@wesleybl thx, there is also a flaky one on the listing block tests which I will have to look at and add a pull request myself. It's annoying for me that we have to add these wait timeouts, I feel that we are not using Cypress to the best of its abilities but I guess it is what it is and we can always improve in the future. |
@wesleybl unfortunately the problem still occurs and I have a branch where I had to get rid of I myself have made pull requests with test fixes only to discover that they still crashed every so often In my own experience you need to run the test 20 times and several times to see if the test passes or not. I write this as a recipe for you to have in mind to use as well if you write tests or want to fix tests and ensure that they are fixed for good. test-cypress.mp4 |
@ichim-david great! I often cannot simulate an intermittent error locally. With your tip it seems possible. Thank you for sharing it! |
Sometimes this test fails because it does not find the alert with the message that the content is locked. What may be happening is that the test runs too quickly, and Plone does not consider that the content has been locked. Then we wait a bit for Plone to consider it locked.
This fix: https://github.com/plone/volto/actions/runs/8403447599/job/23013937367#step:10:649