On 08/04/11 - 04:05:25PM, Matt Wagner wrote:
2.) I think there's a bug in haml[3][4]. Throughout the app,
we're
seeing double delete buttons. We had suspected that rack-restful_submit
was to blame, but it's not. (At least, not for the double inclusion.)
Instead, what's happening is that capture_haml is printing the captured
HAML on the page when it's called!
This is actually causing two separate problems. One is the
double-display of the delete, the first of which doesn't actually work.
The second problem is that its first inclusion is causing tests to
fail[5] in multiple places. It has a duplicate ID ('delete_button'), but
the first occurs outside of the <form> tag, so capybara refuses to click
it since it's not a valid button. The second button *is* in the form
(that's the whole reason for using capture_haml, in fact), but capybara
isn't seeing it. If we can un-break capture_html, I think these tests
will start passing.
I'm not entirely sure what we're to do here. There's a pull request (in
[4]), but unless we're going to try to fork and carry it (or
monkey-patch it), it's not helpful for us. I'm hoping to devise a
workaround, but I'm not sure how to go about it.
This shouldn't be a huge problem. We absolutely do *not* want to fork haml,
but instead we want to encourage upstream haml to accept the patch. If they
do, then we can carry that patch in our Fedora RPMs until such time as we
rebase, at which point we'll get the fix.
Can someone more familiar with this stuff try out the proposed fix to haml in
[4], and then add another comment to that thread (jay?)?
These two issues don't account for all of the test failures, but they're
the ones that I've seen in multiple places and that aren't trivially fixed.
I may send a few more fixes before the day's over, but I have no
illusions of being able to finish this today, so I'm hoping someone (or
some people) will be able to pick up where I've left off.
-- Matt
[1] Covered by
https://www.aeolusproject.org/redmine/issues/2018
[2]
http://comments.gmane.org/gmane.comp.programming.tools.cucumber/6808
[3]
https://github.com/nex3/haml/issues/370
[4]
https://github.com/nex3/haml/pull/417
[5] With the error "undefined method `node_name' for nil:NilClass
(NoMethodError)"
--
Chris Lalancette