-
-
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
Attribute selector doesn't work on attributes that have numbers in them #693
Labels
Comments
@raduanastases it'd be great if you could file a PR with a test case! |
(also, please note that attributes that start with numbers are invalid) |
sure, I'll get to it as soon as possible. |
jsmey
pushed a commit
to jsmey/enzyme
that referenced
this issue
Nov 23, 2016
I made this change and added a test. PR #700 |
jsmey
pushed a commit
to jsmey/enzyme
that referenced
this issue
Nov 29, 2016
Throw when attribute selector is invalid include the selector in the error message
jsmey
pushed a commit
to jsmey/enzyme
that referenced
this issue
Nov 29, 2016
jsmey
pushed a commit
to jsmey/enzyme
that referenced
this issue
Nov 30, 2016
Allow numbers in attribute selectors and validate selector refactored split
4 tasks
Closed in #1086 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In ShallowTraversal.js the selector for the attribute doesn't work on attributes that have numbers in them.
const propKey = selector.split(/\[([a-zA-Z-]*?)(=|])/)[1];
Instead, it should be:
const propKey = selector.split(/\[([a-zA-Z-0-9-]*?)(=|])/)[1];
The text was updated successfully, but these errors were encountered: