Why Cypress could not read my CSS variables? #28106
Unanswered
alamenai
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
Uh oh!
There was an error while loading. Please reload this page.
-
I have a
Button.tsxcomponent and I want to write a test for it using Cypress framework.I have
Button.module.csswhich looks like this:My
Button.tsxlooks like:In my test, It's supposed to see a blue button based on styling:
CSS VARIABLES:
This is my test result:
This is my
Button.cy.tsxtest:BROWSER INSPECTION
When I use explicit color, it works well:
Beta Was this translation helpful? Give feedback.
All reactions