diff options
author | Scott González <scott.gonzalez@gmail.com> | 2016-07-06 16:39:05 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-07-07 09:16:52 -0400 |
commit | 92451b44c1ccdb4aa30f3c5418206abc1f0ff5de (patch) | |
tree | 7f5f1639ec66b33a4cd0ce785b15d6651182390d /tests/unit/tooltip | |
parent | dc8b1c8bb93bc213962dc5e2ba583ddf56395b08 (diff) | |
download | jquery-ui-92451b44c1ccdb4aa30f3c5418206abc1f0ff5de.tar.gz jquery-ui-92451b44c1ccdb4aa30f3c5418206abc1f0ff5de.zip |
Tooltip: Allow tracking tooltips to be off by a fraciton of a pixel
Closes gh-1718
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/options.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/unit/tooltip/options.js b/tests/unit/tooltip/options.js index 6dec36a6c..4354d89b3 100644 --- a/tests/unit/tooltip/options.js +++ b/tests/unit/tooltip/options.js @@ -203,8 +203,16 @@ QUnit.test( "track + show delay", function( assert ) { event.pageY = topVal; element.trigger( event ); - assert.equal( $( ".ui-tooltip" ).css( "left" ), leftVal + offsetVal + "px" ); - assert.equal( $( ".ui-tooltip" ).css( "top" ), topVal + offsetVal + "px" ); + assert.close( + parseFloat( $( ".ui-tooltip" ).css( "left" ) ), + leftVal + offsetVal, 0.5, + "left position" + ); + assert.close( + parseFloat( $( ".ui-tooltip" ).css( "top" ) ), + topVal + offsetVal, 0.5, + "top position" + ); } ); QUnit.test( "track and programmatic focus", function( assert ) { |