diff options
author | Phil Hughes <me@iamphill.com> | 2016-08-19 10:21:09 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-08-19 10:21:09 +0100 |
commit | 35cea54a52acbdf619783c76dbce1852a048ff7a (patch) | |
tree | 62846af1d8e4b771e7ff9863c5460041dd2a941f | |
parent | 12fe6a6fd733110acc72aa0f5bdaec2b1fa1f358 (diff) | |
download | gitlab-ce-issue-boards-keyboard-shortcuts.tar.gz |
Fixed keyboard shortcuts not working on issue boardsissue-boards-keyboard-shortcuts
Closes #21071
-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 |