Expected element was missing for test #951

Closed
wants to merge 2 commits into
from

2 participants

@jonathansampson

Test expects input elements having name='id', name='name', and name='target'. Additionally, these should have id='id', id='name', and id='target' respectively. No element was provided with id='id' or name='id', but rather one element had two name attributes (illegal) with the values 'id' and 'name' respectively.

@jonathansampson jonathansampson Providing Expected Input Elements
Test expects input elements having name='id', name='name', and name='target'. Additionally, these should have id='id', id='name', and id='target' respectively. No element was provided with id='id' or name='id', but rather one element had two name attributes (illegal) with the values 'id' and 'name' respectively.
e1b92af
@rwaldron rwaldron and 2 others commented on an outdated diff Oct 11, 2012
test/unit/attributes.js
@@ -64,7 +64,7 @@ test("attr(String)", function() {
equal( jQuery("#foo").attr("height"), undefined, "Non existent height attribute should return undefined" );
// [7472] & [3113] (form contains an input with name="action" or name="id")
- var extras = jQuery("<input name='id' name='name' /><input id='target' name='target' />").appendTo("#testForm");
+ var extras = jQuery("<input id='id' name='id' /><input name='name' name='name' /><input id='target' name='target' />").appendTo("#testForm");
@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 11, 2012

Why?

name='name' name='name'?

@scottgonzalez
jQuery Foundation member
scottgonzalez added a line comment Oct 11, 2012

It's just following the pattern from the target element.

@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 11, 2012

No it's not. It's duplicating the name attribute, with the same value. If it was copying the target element it would do this: id='name' name='name'

@scottgonzalez
jQuery Foundation member
scottgonzalez added a line comment Oct 11, 2012

Oh, heh, looks like a bug fixing the bug :-P Sorry, I misread your comment.

@rwaldron
jQuery Foundation member
rwaldron added a line comment Oct 11, 2012

💛

@jonathansampson
jonathansampson added a line comment Oct 11, 2012

Oops. It was a bug fixing the bug. Fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dmethvin dmethvin added a commit that closed this pull request Oct 20, 2012
@jonathansampson jonathansampson Fix attribute names in aliased form property test. Close gh-951.
Test expects input elements having name='id', name='name', and name='target'. Additionally, these should have id='id', id='name', and id='target' respectively. No element was provided with id='id' or name='id', but rather one element had two name attributes (illegal) with the values 'id' and 'name' respectively.
144b8bf
@dmethvin dmethvin closed this in 144b8bf Oct 20, 2012
@dmethvin
jQuery Foundation member

Jonathan, you'll want to reset your master. To prevent future sorrow, always checkout -b to create a branch for each patch. That way your master stays in sync.

@mescoda mescoda pushed a commit to mescoda/jquery that referenced this pull request Nov 4, 2014
@jonathansampson jonathansampson Fix attribute names in aliased form property test. Close gh-951.
Test expects input elements having name='id', name='name', and name='target'. Additionally, these should have id='id', id='name', and id='target' respectively. No element was provided with id='id' or name='id', but rather one element had two name attributes (illegal) with the values 'id' and 'name' respectively.
55f895d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment