
Fields outside the current scope can still be found
Reported by Kyle Hargraves | January 19th, 2009 @ 12:00 PM
I was upgrading a project to 0.4 and had some failures due to my invalid markup. I have a page with both a form.edit and a form.new, which had identical dom IDs for the fields. When using within('form.new'), the fields from the form.edit (which comes first in the DOM) are being filled in.
Obviously, I fixed this by producing valid markup, but it's still a bug. The attached patch (also at the tip of my fork) is a failing test for this, but I couldn't find a clear way to pass it.
Comments and changes to this ticket
-
Kyle Hargraves January 19th, 2009 @ 02:54 PM
Attaching a new patch which passes the spec by making Label only find fields within the session's current DOM (which honors the scope). Also updated on github.
Form#dom has similar code; is its behaviour correct?
-
Kyle Hargraves January 19th, 2009 @ 02:58 PM
- Tag set to bug, patch, scope
Just noticed ticket #119 that brings this up for Form#dom.
-
Bryan Helmkamp January 19th, 2009 @ 08:07 PM
- State changed from new to resolved
Thanks for the patch, Kyle. Merged and pushed.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.