Closed MRavimoF closed 1 year ago
function bar() { return cy.wrap("testing") .if() .then(() => cy.wrap("got it")) .else() .then(() => cy.wrap("else do")) } bar().then(it => { cy.log(`result: ${it}`) })
Will print
wrap: testing wrap: got it
I would have expected to see
wrap: testing wrap: got it log: result: got it
I get the expected output if I comment out the else branch
function bar() { return cy.wrap("testing") .if() .then(() => cy.wrap("got it")) // .else() // .then(() => cy.wrap("else do")) }
I am a beginner with Cypress and cypress-if, wondering what's up with this behaviour.
"cypress-if": "^1.10.2", "cypress": "10.11.0", "cypress-fail-fast": "^3.4.1",
:tada: This issue has been resolved in version 1.10.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Will print
I would have expected to see
I get the expected output if I comment out the else branch
I am a beginner with Cypress and cypress-if, wondering what's up with this behaviour.