diff options
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 3 | ||||
-rw-r--r-- | spec/features/boards/boards_spec.rb | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 74c4ab563f9..32e3aa62358 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -20,6 +20,9 @@ path = page.split(':'); shortcut_handler = null; switch (page) { + case 'projects:boards:show': + shortcut_handler = new ShortcutsNavigation(); + break; case 'projects:issues:index': Issuable.init(); new IssuableBulkActions(); diff --git a/spec/features/boards/boards_spec.rb b/spec/features/boards/boards_spec.rb index 8910c50c294..5d777895542 100644 --- a/spec/features/boards/boards_spec.rb +++ b/spec/features/boards/boards_spec.rb @@ -572,6 +572,18 @@ describe 'Issue Boards', feature: true, js: true do end end + context 'keyboard shortcuts' do + before do + visit namespace_project_board_path(project.namespace, project) + wait_for_vue_resource + end + + it 'allows user to use keyboard shortcuts' do + find('.boards-list').native.send_keys('i') + expect(page).to have_content('New Issue') + end + end + context 'signed out user' do before do logout |