From c9d84e531ec8ccde80ebe99edc4902531f60b525 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Sun, 7 Apr 2013 15:15:04 -0400 Subject: [PATCH] Datepicker Tests: use simulated events for focus and blur.(cherry picked from commit ab84e037ed919015e24ac3d7e61960290a6062af) --- tests/unit/datepicker/datepicker_options.js | 2 +- tests/unit/datepicker/datepicker_test_helpers.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js index 64bbc8829..93ffc8136 100644 --- a/tests/unit/datepicker/datepicker_options.js +++ b/tests/unit/datepicker/datepicker_options.js @@ -114,7 +114,7 @@ asyncTest( "invocation", function() { step2(); }); - })[ 0 ].focus(); + }).simulate( "focus" ); } function step2() { diff --git a/tests/unit/datepicker/datepicker_test_helpers.js b/tests/unit/datepicker/datepicker_test_helpers.js index 504bcc767..884735def 100644 --- a/tests/unit/datepicker/datepicker_test_helpers.js +++ b/tests/unit/datepicker/datepicker_test_helpers.js @@ -22,8 +22,8 @@ TestHelpers.datepicker = { element.one( "blur", function(){ element.one( "focus", function(){ callback(); - })[ 0 ].focus(); - })[ 0 ].blur(); + }).simulate( "focus" ); + }).simulate( "blur" ); }, PROP_NAME: "datepicker" }; \ No newline at end of file