Configurable shortcuts in the Debugger. Fixes #2901

This commit is contained in:
Murtuza Zabuawala
2018-02-09 12:43:27 +00:00
committed by Dave Page
parent 258b064963
commit 942ac733a4
8 changed files with 341 additions and 59 deletions

View File

@@ -16,7 +16,14 @@ describe('the keyboard shortcuts', () => {
RIGHT_ARROW_KEY = 39,
MOVE_NEXT = 'right';
let debuggerElementSpy, event;
let debuggerElementSpy, event, debuggerUserShortcutSpy;
debuggerUserShortcutSpy = jasmine.createSpyObj(
'userDefinedShortcuts', [
{ 'edit_grid_keys': null },
{ 'next_panel_keys': null },
{ 'previous_panel_keys': null }
]
);
beforeEach(() => {
event = {
shift: false,
@@ -31,7 +38,9 @@ describe('the keyboard shortcuts', () => {
describe('when the key is not handled by the function', function () {
beforeEach(() => {
event.which = F1_KEY;
keyboardShortcuts.processEventDebugger(debuggerElementSpy, event);
keyboardShortcuts.processEventDebugger(
debuggerElementSpy, event, debuggerUserShortcutSpy
);
});
it('should allow event to propagate', () => {