diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2016-08-19 18:33:28 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-08-19 23:24:34 +0300 |
commit | c1e3f35f0aaf9b689ff8b8864785c8e4119dbd20 (patch) | |
tree | 0335ae0ae234d74be20c0306602eaf0abac48be0 | |
parent | 40fd2137aec39431d7ca127d9fb56cfdebd90463 (diff) |
Merge branch 'issue-boards-keyboard-shortcuts' into 'master'
Fixed keyboard shortcuts not working on issue boards
## What does this MR do?
Fixes keyboard shortcuts not working on issue boards page.
## What are the relevant issue numbers?
Closes #21071
See merge request !5890
-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 1163edd8547..cb698f596ee 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 |