diff options
author | Phil Hughes <me@iamphill.com> | 2017-04-07 09:46:31 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-10 12:20:25 +0100 |
commit | 195c058c1191fa4058176f511f1b6c52d0d7031f (patch) | |
tree | beb610290ee6c2326f4067fbfbd9957bbbdec382 /spec | |
parent | ce6a48cbd0b297bf955206f6acb1da86c1fa4529 (diff) | |
download | gitlab-ce-195c058c1191fa4058176f511f1b6c52d0d7031f.tar.gz |
Added keyboard shortcuts to signed out menusigned-out-menu-shortcuts
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/dashboard/shortcuts_spec.rb | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb index fa5524e18d8..4c9adcabe34 100644 --- a/spec/features/dashboard/shortcuts_spec.rb +++ b/spec/features/dashboard/shortcuts_spec.rb @@ -1,27 +1,49 @@ require 'spec_helper' feature 'Dashboard shortcuts', feature: true, js: true do - before do - login_as :user - visit root_dashboard_path - end + context 'logged in' do + before do + login_as :user + visit root_dashboard_path + end + + scenario 'Navigate to tabs' do + find('body').native.send_keys([:shift, 'P']) + + check_page_title('Projects') + + find('body').native.send_key([:shift, 'I']) + + check_page_title('Issues') - scenario 'Navigate to tabs' do - find('body').native.send_keys([:shift, 'P']) + find('body').native.send_key([:shift, 'M']) + + check_page_title('Merge Requests') + + find('body').native.send_keys([:shift, 'T']) + + check_page_title('Todos') + end + end - check_page_title('Projects') + context 'logged out' do + before do + visit explore_root_path + end - find('body').native.send_key([:shift, 'I']) + scenario 'Navigate to tabs' do + find('body').native.send_keys([:shift, 'P']) - check_page_title('Issues') + expect(page).to have_content('No projects found') - find('body').native.send_key([:shift, 'M']) + find('body').native.send_keys([:shift, 'G']) - check_page_title('Merge Requests') + expect(page).to have_content('No public groups') - find('body').native.send_keys([:shift, 'T']) + find('body').native.send_keys([:shift, 'S']) - check_page_title('Todos') + expect(page).to have_selector('.snippets-list-holder') + end end def check_page_title(title) |