Permalink
Browse files

Use keycode constants from jQuery UI and improve message in test.

  • Loading branch information...
1 parent c904ba7 commit 5f2b2ebb1f4dafc29d68a99fe4f97f07fe921c9f @dwyde committed Apr 3, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 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();

0 comments on commit 5f2b2eb

Please sign in to comment.