-
Notifications
You must be signed in to change notification settings - Fork 355
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
Rewrite tests to work on Rails 4.0, 4.1, 4.2, and 5.0 #273
Comments
Rails 5 no longer outputs tag attributes in alphabetical order, so I think we need some kind of dynamic html matching (using nokogiri?). Also, additional tags are rendered in Rails 5, like an empty hidden input preceding a file input. |
I like the idea of using a HTML parser for matching expected output. Perhaps we could use rails-dom-testing, or nokogiri directly, as you mentioned. |
rails-dom-testing seems suitable :) |
The first paragraph of the rails-dom-testing README at https://github.com/rails/rails-dom-testing says that it only works on Rails 4.2 and above. The title of this issue includes Rails 4.0 and 4.1. Does that mean rails-dom-testing is out as an option? |
@lcreid Yes, I would prefer to keep 4.0 compatibility if possible, so I guess that means rails-dom-testing is out. |
I forked this project to https://github.com/lcreid/rails-bootstrap-forms. I used Nokogiri and equivalent-xml, and all the tests run green for Rails 4.0. It was way too easy, so I fear that I'm doing something wrong. Nevertheless, I'm willing to run with this for a while and see if you like what I'm doing, if you want to assign this issue to me. I'll push what I've done so far to the |
I think equivalent-xml might be a good candidate. I've added it to #278, which tests with multi versions of rails already. |
OK. I'm just trying to get an idea of how best I can help. I'll take a look
at your PR later today and see where we're at. Let me know if there are
specific tasks you'd like me to work on.
I haven't done any sort of testing of what I did to make sure the tests go
red when they should. That would be the next thing I would work on, if no
one else is actively working on either #273 or #278.
…On Fri, Dec 9, 2016 at 6:48 AM, Koen Punt ***@***.***> wrote:
#273 <#273>
is the issue, #278
<#278> is a
pull request which I started like 5 months ago. And now that you suggested
to use equivalent-xml I added your commit to that branch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#273 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABigMM1Hknq3LZBIX0wA1D_KCuZEDsYpks5rGWosgaJpZM4JEirJ>
.
--
*Larry Reid*
Principal Consultant, Jade Systems Inc
Mobile: +1 604.376.8884
technopragmatica.blogspot.com | jadesystems.ca |
tecnopragmatica.blogspot.com
|
Right now the tests for bootstrap_form are hardcoded to work with Rails 4.0.0. As mentioned in #229, the tests break if one upgrades the Gemfile.lock to Rails 4.1 or newer. I think improving our testing is extremely important and should be our top priority before pursuing other features (e.g. Bootstrap 4 support).
Ideally our tests should pass on all supported versions of Rails, meaning 4.0, 4.1, 4.2, and 5.0.
Does anyone have suggestions for how we can accomplish this?
I will gladly accept a PR if you want to take a shot. Please make a proposal in this thread first before submitting a PR.
The text was updated successfully, but these errors were encountered: