-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot test style rule of a referenced component #327
Comments
So... I had similar issue and I have already pointed out the problem in this comment In short the algorithm is built so that you HAVE TO have the I have already proposed to fix it, but as I am not sure how the procedure work I won't start any correction before I get a green light to do so. |
should be fixed with #313 |
@vxcamiloxv I'm trying to understand how this would solve my problem. Are you saying I should be able to test the pseudo element's updated style after being changed by a referenced component? |
I have a toggle switch where my styled input component references my styled label component
When the
Check
component is checked theKnob
component has some of its styles updated.I want to test the styles of the pseudo-element before and after the checkbox is clicked.
I am able to successfully test styles before
After I click the checkbox I am still able to test the background of the
Knob
component usingtoHaveStyle
rather thantoHaveStyleRule
as this is not part of the pseudo-element :after.However I am not able to test any of the changes on the pseudo-element.
The above does not work and tells me that the expected margin is still 3px. What I believe I need to do is use
toHaveStyle
and attach the&::after
modifier, but I have had no success with this yet.The text was updated successfully, but these errors were encountered: