mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Use keycode constants from jQuery UI and improve message in test.
This commit is contained in:
parent
6e7cd60cb5
commit
fce51827e0
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user