Cypress shows hidden elements as visible #21180
Unanswered
lyz-code
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm writing my first Cypress test
( ᐛ )و
, I'm testing a webpage that contains a list of 3 Vue elements, where only one meets the criteria ofv-show
and it's the only one displayed in the browser.The
PreviewArticle
component has an element with thedata-cy='author'
tagI'm trying to assert that the author element matches a string with:
But the assertion is failing with the error:
The workaround I've found is to instead search for the parent component (
PreviewArticle
), which is the one that has theshow
attribute and filter by it:Why does Cypress mark as visible elements that have the
show
attribute set tofalse
, or what am I doing wrong?Beta Was this translation helpful? Give feedback.
All reactions