Skip to content

should not exist does not work with findByRole #265

Description

@tam-R
  • cypress-testing-library version: 10.0.1
  • node version: 18.0.1
  • npm (or yarn) version: 10.2.0

Relevant code or config

cy.findByRole('tab', {name: 'ForDeleteRegularRole'}).should('not.exist')

Problem description:

It seems that the should not exist assertion does not properly work for findByRole.
It retried the assertion and returned an AssertionError in the end due to the element not being found.

Timed out retrying after 120000ms: Unable to find an accessible element with the role "tab" and name "ForDeleteRegularRole"

image
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions