Commit 206375c8 authored by Jacob Schatz's avatar Jacob Schatz

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
parents 302caf59 35cea54a
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
path = page.split(':'); path = page.split(':');
shortcut_handler = null; shortcut_handler = null;
switch (page) { switch (page) {
case 'projects:boards:show':
shortcut_handler = new ShortcutsNavigation();
break;
case 'projects:issues:index': case 'projects:issues:index':
Issuable.init(); Issuable.init();
new IssuableBulkActions(); new IssuableBulkActions();
......
...@@ -572,6 +572,18 @@ describe 'Issue Boards', feature: true, js: true do ...@@ -572,6 +572,18 @@ describe 'Issue Boards', feature: true, js: true do
end end
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 context 'signed out user' do
before do before do
logout logout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment