gitlab-org--gitlab-foss/spec/features/boards/keyboard_shortcut_spec.rb
Ash McKenzie 19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00

40 lines
847 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Issue Boards shortcut', :js do
context 'issues are enabled' do
let(:project) { create(:project) }
before do
create(:board, project: project)
sign_in(create(:admin))
visit project_path(project)
end
it 'takes user to issue board index' do
find('body').native.send_keys('gb')
expect(page).to have_selector('.boards-list')
wait_for_requests
end
end
context 'issues are not enabled' do
let(:project) { create(:project, :issues_disabled) }
before do
sign_in(create(:admin))
visit project_path(project)
end
it 'does not take user to the issue board index' do
find('body').native.send_keys('gb')
expect(page).to have_selector("body[data-page='projects:show']")
end
end
end