Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does the is.selected assertion refer to? #114

Open
dwjohnston opened this issue Oct 4, 2022 · 2 comments
Open

What does the is.selected assertion refer to? #114

dwjohnston opened this issue Oct 4, 2022 · 2 comments

Comments

@dwjohnston
Copy link

dwjohnston commented Oct 4, 2022

You docs suggest that it uses a :selected psuedoclass selector - however, I can't see that :selected is actually a psuedoclass. https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes#input_pseudo-classes

Essentially what I'm wanting to use the is.selected assertion on, is checking that an element with the role tab has aria-selected="true"

@dwjohnston
Copy link
Author

dwjohnston commented Oct 4, 2022

For anyone who is seeing this, the assertion I use instead is:

(Cypress:)

.should("have.attr", "aria-selected", "true")

@dwjohnston
Copy link
Author

Similarly, what does the is.visible selector do? I can't see that :visible is a psuedoselector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant