-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Include actionability waits in before commands #270
Comments
I've been thinking about this when making this package and the real problem here is that actionability is a private Cypress API and as far as I remember working on cypress they are changing it pretty often. So I feel a little bit unsafe taking the private API and as far as you noticed this package doesn't have first-class maintenance so this can be an arrow in the knee at some point. |
Ye, so I guess the best course of action would be to ask Cypress to expose this as a first-class API cause without it implementing this kind of custom command while matching the "look and feel" of the built-in ones is nearly impossible. |
I wonder if there's a smart way to work around this by using one of cypress's built-in commands that would be a no-op but would make it run actionability tests before we dispatch Maybe |
I've noticed some flaky tests in our codebase and I think that I've diagnosed them to be related to the fact that
cypress-real-events
do not wait for "actionability" of the item.There is no related logic in the
realClick
's implementation:https://github.com/dmtrKovalenko/cypress-real-events/blob/660025b0dac4e69ef6a982eeb0a26e025d3a7696/src/commands/realClick.ts
but we can see in Cypress'
click
implementation that it includes such logic by default:https://github.com/cypress-io/cypress/blob/380f4e7d6036fc4fbd8c1443c011cb8414b231a7/packages/driver/src/cy/commands/actions/click.ts#L193
I've spotted this in my Cypress report and it seems to verify my conclusion:
I could work on adding the actionability waits if you agree that this is something that should be included by default. The API of
$actionability.verify
looks a little bit weird and perhaps you would have some tips as to how I could actually use it here.The text was updated successfully, but these errors were encountered: