Replies: 2 comments 2 replies
-
Hey @fingers10 hope you are doing fine and thanks for reaching out. I would advise against testing that behaviour in the first place and there are two reasons for it.
That leaves you with one option: Asserting if a specific css class is given for your element. You can do this without any problem with bUnit, but still I would argue that testing styling is something you don't necessarily want. |
Beta Was this translation helpful? Give feedback.
-
Just to add to what @linkdotnet already said. bUnit allows you to verify the markup being presented to the browser, it does not actually convert that markup into graphics and text like the browser does. |
Beta Was this translation helpful? Give feedback.
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 having a component which renders differently on mobile device and desktop devices. I would like to test this behavior.
Here is my component code:
I'm using
tailwindcss
and so the output will appear at different place visually on small devices and medium devices.Please can you assist on how to assert this behaviour?
Do I need to have a Property to toggle css classes instead of using
md
prefix?Something like below?
SmallDevice ? "bottom-0" : "top-14 left-0 "
Beta Was this translation helpful? Give feedback.
All reactions