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
hasStyle: incorrect child components check in case of nested CSS #25
Comments
Hi @matrunchyk , hasStyle uses the same values as css, so you use This should work: expect(temp1.hasStyle('z-index', '9999').to.equal(true) |
Ok, so I figured out the problem.
As you can see, that But here you move an element (div in this case) to the body. So now it's impossible to check the real style of the I'd suggest to not moving that only particular |
Thanks, I'll look into this tonight. |
Ok, I've got a failing test. I'll try and figure out a workaround in the next couple days |
@eddyerburgh Created a small repo with a component and a test. |
Alright, thank you! |
Hi, so I've got a workaround. #26 means we can pass an option to attach the component to the DOM when mount is called. When a component has been mounted to the DOM, hasStyle will check the node without having to attach it to the DOM. The change to hasStyle hasn't been committed yet, but I'll update you when it's released. Should be by Saturday at the latest. |
wow looks great! Thank you for all you guys do here! |
Hi, this is fixed in 1.11.1. |
Beautiful, thank you! :) |
UPD. The real description of the problem is here.
Hi guys, I've just noticed that
zIndex
doesn't work withhasStyle
.I tried also
.hasStyle('z-index', '9999')
. Stillfalse
.What am I doing wrong? Thanks.
The text was updated successfully, but these errors were encountered: