diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-10 15:09:36 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-05-10 15:09:36 +0000 |
commit | ca9033bd5dcf8c3abc9fe17c2a23da495d6e60d4 (patch) | |
tree | 8342f60527b1fdb9dd8432930fe4010d468469dd /spec/features | |
parent | 9b03ed0a182c9ad96957085826cc85f8f229569c (diff) | |
download | gitlab-ce-ca9033bd5dcf8c3abc9fe17c2a23da495d6e60d4.tar.gz |
Find the nothing-here-block before asserting page content when on explore page of shortcuts_spec.rb
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/dashboard/shortcuts_spec.rb | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/spec/features/dashboard/shortcuts_spec.rb b/spec/features/dashboard/shortcuts_spec.rb index 4c9adcabe34..af7ef55a57e 100644 --- a/spec/features/dashboard/shortcuts_spec.rb +++ b/spec/features/dashboard/shortcuts_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Dashboard shortcuts', feature: true, js: true do +feature 'Dashboard shortcuts', :feature, :js do context 'logged in' do before do login_as :user @@ -8,21 +8,21 @@ feature 'Dashboard shortcuts', feature: true, js: true do end scenario 'Navigate to tabs' do - find('body').native.send_keys([:shift, 'P']) - - check_page_title('Projects') - - find('body').native.send_key([:shift, 'I']) + find('body').send_key([:shift, 'I']) check_page_title('Issues') - find('body').native.send_key([:shift, 'M']) + find('body').send_key([:shift, 'M']) check_page_title('Merge Requests') - find('body').native.send_keys([:shift, 'T']) + find('body').send_keys([:shift, 'T']) check_page_title('Todos') + + find('body').send_keys([:shift, 'P']) + + check_page_title('Projects') end end @@ -32,21 +32,24 @@ feature 'Dashboard shortcuts', feature: true, js: true do end scenario 'Navigate to tabs' do - find('body').native.send_keys([:shift, 'P']) - - expect(page).to have_content('No projects found') - - find('body').native.send_keys([:shift, 'G']) + find('body').send_keys([:shift, 'G']) + find('.nothing-here-block') expect(page).to have_content('No public groups') - find('body').native.send_keys([:shift, 'S']) + find('body').send_keys([:shift, 'S']) + find('.nothing-here-block') expect(page).to have_selector('.snippets-list-holder') + + find('body').send_keys([:shift, 'P']) + + find('.nothing-here-block') + expect(page).to have_content('No projects found') end end def check_page_title(title) expect(find('.header-content .title')).to have_content(title) end -end +end
\ No newline at end of file |