summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJacob Schatz <jschatz@gitlab.com>2017-04-06 23:46:14 +0000
committerJacob Schatz <jschatz@gitlab.com>2017-04-06 23:46:14 +0000
commit496208c9bdfcdad685183afa36ad2173357c18da (patch)
tree2f231660590a30ba5b4c84cba0d7de2b32e5ba00 /spec
parent8a574030eadd1794294543639a5dd471741d8c6e (diff)
parent518203d5e181d9f5fdf5c4fd40635b076babbe57 (diff)
downloadgitlab-ce-496208c9bdfcdad685183afa36ad2173357c18da.tar.gz
Merge branch 'menu-shortcut' into 'master'
Add keyboard shortcuts to main menu. Closes #30036 See merge request !10243
Diffstat (limited to 'spec')
-rw-r--r--spec/features/boards/keyboard_shortcut_spec.rb2
-rw-r--r--spec/features/dashboard/shortcuts_spec.rb14
2 files changed, 6 insertions, 10 deletions
diff --git a/spec/features/boards/keyboard_shortcut_spec.rb b/spec/features/boards/keyboard_shortcut_spec.rb
index a5fc766401f..a9cc6c49f8e 100644
--- a/spec/features/boards/keyboard_shortcut_spec.rb
+++ b/spec/features/boards/keyboard_shortcut_spec.rb
@@ -14,7 +14,7 @@ describe 'Issue Boards shortcut', feature: true, js: true do
end
it 'takes user to issue board index' do
- find('body').native.send_keys('gl')
+ find('body').native.send_keys('gb')
expect(page).to have_selector('.boards-list')
wait_for_vue_resource
diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb
index 3642c0bfb5b..fa5524e18d8 100644
--- a/spec/features/dashboard/shortcuts_spec.rb
+++ b/spec/features/dashboard/shortcuts_spec.rb
@@ -3,27 +3,23 @@ require 'spec_helper'
feature 'Dashboard shortcuts', feature: true, js: true do
before do
login_as :user
- visit dashboard_projects_path
+ visit root_dashboard_path
end
scenario 'Navigate to tabs' do
- find('body').native.send_key('g')
- find('body').native.send_key('p')
+ find('body').native.send_keys([:shift, 'P'])
check_page_title('Projects')
- find('body').native.send_key('g')
- find('body').native.send_key('i')
+ find('body').native.send_key([:shift, 'I'])
check_page_title('Issues')
- find('body').native.send_key('g')
- find('body').native.send_key('m')
+ find('body').native.send_key([:shift, 'M'])
check_page_title('Merge Requests')
- find('body').native.send_key('g')
- find('body').native.send_key('t')
+ find('body').native.send_keys([:shift, 'T'])
check_page_title('Todos')
end