https://cypress.io logo
cypress component testing styled components
# i-need-help
b
Currently I am testing out cypress component testing but running into some issues. As tech stack I am using vite + react + mui. The issue I am having is that a styled component renders on it's own but not when it's a child component. I have read that there needs to something implemented, but the docs only talk about general CSS. The vite server shows everything correctly but the cypress page not. Does anyone know why this happens? PS hopefully the video helps https://cdn.discordapp.com/attachments/1105184840803946636/1105184841043038318/2023-05-08_19-28-28.mp4
e
Your Box has a display none for “xs” so perhaps the screen is too small for it to display?
You’re testing in a 500x500 viewport so i think thats the problem
The xs breakpoint is <600 px by default and you’re under that
b
Thank you, chaging the viewport shows the elements now. ❤️ 😄