bahmutov / cypress-if

Easy conditional if-else logic for your Cypress tests when there is no other way
https://cypress.tips/courses/cypress-plugins
99 stars 12 forks source link

Seems not.exist assertion does not work correctly #45

Closed bahmutov closed 2 years ago

bahmutov commented 2 years ago

In the example below, it should take the IF path

it('checks an element that does not exists using not.exist', () => {
  cy.get('#not-found').should('not.exist')
  cy.get('#not-found')
    .if('not.exist')
    .then(cy.spy().as('if'))
    .else()
    .then(cy.spy().as('else'))
  cy.get('@if').should('have.been.calledOnce')
  cy.get('@else').should('not.have.been.called')
})
github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.10.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.10.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: