Added some tests for name(), id() and title()
This commit is contained in:
parent
c12bce2046
commit
51a07a6a5f
11
src/jquery/jquery.js
vendored
11
src/jquery/jquery.js
vendored
|
@ -2673,6 +2673,10 @@ jQuery.macros = {
|
||||||
* @before <input type="text" id="test" value="some text"/>
|
* @before <input type="text" id="test" value="some text"/>
|
||||||
* @result "test"
|
* @result "test"
|
||||||
*
|
*
|
||||||
|
* @test ok( $(document.getElementById('main')).id() == "main", "Check for id" );
|
||||||
|
* @test ok( $("#foo").id() == "foo", "Check for id" );
|
||||||
|
* @test ok( !$("head").id(), "Check for id" );
|
||||||
|
*
|
||||||
* @name id
|
* @name id
|
||||||
* @type String
|
* @type String
|
||||||
* @cat DOM/Attributes
|
* @cat DOM/Attributes
|
||||||
|
@ -2699,6 +2703,9 @@ jQuery.macros = {
|
||||||
* @before <img src="test.jpg" title="my image"/>
|
* @before <img src="test.jpg" title="my image"/>
|
||||||
* @result "my image"
|
* @result "my image"
|
||||||
*
|
*
|
||||||
|
* @test ok( $(document.getElementById('google')).title() == "Google!", "Check for title" );
|
||||||
|
* @test ok( !$("#yahoo").title(), "Check for title" );
|
||||||
|
*
|
||||||
* @name title
|
* @name title
|
||||||
* @type String
|
* @type String
|
||||||
* @cat DOM/Attributes
|
* @cat DOM/Attributes
|
||||||
|
@ -2725,6 +2732,10 @@ jQuery.macros = {
|
||||||
* @before <input type="text" name="username"/>
|
* @before <input type="text" name="username"/>
|
||||||
* @result "username"
|
* @result "username"
|
||||||
*
|
*
|
||||||
|
* @test ok( $(document.getElementById('text1')).name() == "action", "Check for name" );
|
||||||
|
* @test ok( $("#hidden1").name() == "hidden", "Check for name" );
|
||||||
|
* @test ok( !$("#area1").name(), "Check for name" );
|
||||||
|
*
|
||||||
* @name name
|
* @name name
|
||||||
* @type String
|
* @type String
|
||||||
* @cat DOM/Attributes
|
* @cat DOM/Attributes
|
||||||
|
|
Loading…
Reference in a new issue