should
is not retrying when chained after then
with no commands and returning undefined/null/void
#30230
Labels
type: breaking change
Requires a new major release version
Current behavior
When calling
.should
after.then
, that does not call any Cypress commands and returns undefined/null/void, theshould
assertion is not retried.According to the docs, when void is returned from
.then
, and no calls to any Cypress commands are made, the subject will not be modified.However, there is a change in behavior when using
.then
compared to when not using it or explicitly wrapping an element incy.wrap
.Desired behavior
.should
should be always retried, regardless if.then
was used or notTest code to reproduce
Good
Bad, here is a bug
Cypress Version
13.14.1
Node version
v20.16.0
Operating System
macOS Sonoma 14.6.1
Debug Logs
No response
Other
Keywords: no retry, should, assertion, not retrying, after then, implicit subject
The text was updated successfully, but these errors were encountered: