How to change state variable of functionComponent in cypress? #25656
Unanswered
vikasm98
asked this question in
Component Testing
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
I have a state variable declared from useState() hook, as
const [showComponent, setShowComponent] = useState(false);
Here I would like to change showComponent to true using setShowComponent(true) in cypress spec file before running assertions in cypress component testing.
Please help!
Beta Was this translation helpful? Give feedback.
All reactions