Hello 👋 I need someone to wrap my head around how...
# help
f
Hello 👋 I need someone to wrap my head around how wrap() works. I use it to chain commands but it does not work as I expect. When I use wrap() to chain my custom command, sometimes test fails and does not continue to execute the commands after the wrap() especially on CI. If I use just native Cypress commands, then it works. Can anyone help me understand what is happening here? Take a look at the snapshot. The first command fails on CI and second passes.
b
The custom command steps looks fine. However, the
{ prevSubject: 'element' }
only accepts
false
,
true
, or
optional
. https://docs.cypress.io/api/cypress-api/custom-commands#Arguments