gitlab-org--gitlab-foss/spec/features/dashboard/shortcuts_spec.rb
Rémy Coutable 8615138706
Move Dashboard shortcuts specs from Spinah to RSpec
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-31 11:05:50 +01:00

29 lines
663 B
Ruby

require 'spec_helper'
feature 'Dashboard shortcuts', feature: true, js: true do
before do
login_as :user
visit dashboard_projects_path
end
scenario 'Navigate to tabs' do
find('body').native.send_key('g')
find('body').native.send_key('p')
ensure_active_main_tab('Projects')
find('body').native.send_key('g')
find('body').native.send_key('i')
ensure_active_main_tab('Issues')
find('body').native.send_key('g')
find('body').native.send_key('m')
ensure_active_main_tab('Merge Requests')
end
def ensure_active_main_tab(content)
expect(find('.nav-sidebar li.active')).to have_content(content)
end
end