-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
find with href attribute of full URL is rejected for being complex #283
Comments
Hmm. This is an unfortunate side effect of the shitty CSS parsing we are doing. An alternative for you right now is to do: |
also experiencing this with a selector as follows:
|
@lelandrichardson is there a long-term plan for how you guys want to approach CSS selector parsing? Maybe something that returns an AST for selectors? |
An update on this? |
@stevenmusumeche our CSS parsing is still not great, we're tracking it and hope to implement an actual CSS parser soon. Until then I'd recommend the workaround that @lelandrichardson mentioned:
|
+1 |
This will be resolved by #1086 |
Closed in #1086 |
I may have missed an explanation in #70 but I expected this selector to work:
.find('a[href='http://example.com/xyz']')
But instead it complains:
TypeError: Enzyme received a complex CSS selector ('a[href='http://example.com/xyz']') that it does not currently support
If I remove the domain name from URL and make it relative, it works:
.find('a[href='/xyz']')
It gives no error and works as expected.
The text was updated successfully, but these errors were encountered: