-
Notifications
You must be signed in to change notification settings - Fork 26
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
Names with multiple brackets are truncated #36
Comments
Hey @marosluuce! This strikes me as very believable, as it was thanks to a PR quite some time ago to even add support for a single pair of brackets in an attribute. This is most commonly necessary when you're testing some JS that's going to interact with a form generated by Rails using nested form fields, right? |
That's exactly correct. |
That said, I'm working around the problem by wrapping affix in a function to set the names I want to use. |
In cases like this I would recommend some indirection between your JavaScript and the names that you don't control (e.g. Rails 5 could theoretically change to stop using That said if you do take the time to add a failing test and fix the regex, that'd be great, since, you know, I'd love jasmine-fixture to actually work. |
Yeah, unfortunately decisions I can't control necessitate the use of the name of the element. It's going to be tricky to add a failing test because the actual and expected values match. If I do get around to it, I'll submit a pull request. |
Ran into a situation where doing
affix('input[name="some[thing][foo]"]')
gets turned into<input name="some[thing][foo"></input>
. None of the tests fail when I add it as a test case though. It seems like it might be a problem with the regular expressions only expecting one set of brackets inside a name. I haven't been able to track down the specific problem yet though.The text was updated successfully, but these errors were encountered: