cy.within() - subject not updated or assertion simply not retried as mentioned in docs? #14994
Unanswered
Cleudi
asked this question in
Questions and Help
Replies: 1 comment 2 replies
-
Can you please provide a minimal reproducible example, since it is hard to guess what is going on from just a description |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
since I am not sure if this is a bug, desired behavior or just some mistake in our code, I prefer to ask before opening a bug:
The flow:
Details:
within()
, then queries for the errorwait(1000)
before calling the command, the error message is recognized by cypress. Basically this means that we get the server response before we call the command.In cypress docs I found the following information: assertions are not retried in within. Is this the root cause for our issue? And if yes: is this expected behavior? Are there recommended strategies how to deal with that, eg.
cy.intercept
(listening for the response) before calling the custom command or an alternative pattern without using within?Thanks for ideas 😄
----------------- Pseudocode ---------------
No
wait
, nowithin
-> workswait
,within
-> worksNo
wait
,within
-> does not workBeta Was this translation helpful? Give feedback.
All reactions