Merge branch 'fix-shortcuts_spec-explore-page-transient-failure' into 'master'

Find the nothing-here-block before asserting page content when on explore page of shortcuts_spec.rb

See merge request !11250
This commit is contained in:
Douwe Maan 2017-05-11 01:07:16 +00:00
commit 1ccf101eef
1 changed files with 17 additions and 14 deletions

View File

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Dashboard shortcuts', feature: true, js: true do feature 'Dashboard shortcuts', :feature, :js do
context 'logged in' do context 'logged in' do
before do before do
login_as :user login_as :user
@ -8,21 +8,21 @@ feature 'Dashboard shortcuts', feature: true, js: true do
end end
scenario 'Navigate to tabs' do scenario 'Navigate to tabs' do
find('body').native.send_keys([:shift, 'P']) find('body').send_keys([:shift, 'I'])
check_page_title('Projects')
find('body').native.send_key([:shift, 'I'])
check_page_title('Issues') check_page_title('Issues')
find('body').native.send_key([:shift, 'M']) find('body').send_keys([:shift, 'M'])
check_page_title('Merge Requests') check_page_title('Merge Requests')
find('body').native.send_keys([:shift, 'T']) find('body').send_keys([:shift, 'T'])
check_page_title('Todos') check_page_title('Todos')
find('body').send_keys([:shift, 'P'])
check_page_title('Projects')
end end
end end
@ -32,17 +32,20 @@ feature 'Dashboard shortcuts', feature: true, js: true do
end end
scenario 'Navigate to tabs' do scenario 'Navigate to tabs' do
find('body').native.send_keys([:shift, 'P']) find('body').send_keys([:shift, 'G'])
expect(page).to have_content('No projects found')
find('body').native.send_keys([:shift, 'G'])
find('.nothing-here-block')
expect(page).to have_content('No public groups') 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') 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
end end