From fce51827e06e932c25769a87e8ccf8cb262c9113 Mon Sep 17 00:00:00 2001 From: David Wyde Date: Wed, 3 Apr 2013 10:16:01 -0500 Subject: [PATCH] Use keycode constants from jQuery UI and improve message in test. --- .../tests/casperjs/test_cases/empty_nb_arrow_keys.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/tests/casperjs/test_cases/empty_nb_arrow_keys.js b/IPython/frontend/html/notebook/tests/casperjs/test_cases/empty_nb_arrow_keys.js index 4cb592236..3f0f0a300 100644 --- a/IPython/frontend/html/notebook/tests/casperjs/test_cases/empty_nb_arrow_keys.js +++ b/IPython/frontend/html/notebook/tests/casperjs/test_cases/empty_nb_arrow_keys.js @@ -14,13 +14,13 @@ casper.then(function () { } // Simulate the "up arrow" and "down arrow" keys. - var up_press = jQuery.Event("keydown", {which: 38}); + var up_press = $.Event('keydown', {which: $.ui.keyCode.UP}); $(document).trigger(up_press); - var down_press = jQuery.Event("keydown", {which: 40}); + var down_press = $.Event('keydown', {which: $.ui.keyCode.DOWN}); $(document).trigger(down_press); return true; }); - casper.test.assertTrue(result, 'Trivial assertion to check for JS errors'); + casper.test.assertTrue(result, 'Up/down arrow okay in empty notebook.'); }); casper.deleteCurrentNotebook();