Add Rspec test for "i" shortcut
This commit is contained in:
parent
f5a6ff1548
commit
6e9ce9a6cd
1 changed files with 21 additions and 0 deletions
21
spec/features/project/shortcuts_spec.rb
Normal file
21
spec/features/project/shortcuts_spec.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Project shortcuts', feature: true do
|
||||
let(:project) { create(:project) }
|
||||
let(:user) { create(:user) }
|
||||
|
||||
describe 'On a project', js: true do
|
||||
before do
|
||||
project.team << [user, :master]
|
||||
login_as user
|
||||
visit namespace_project_path(project.namespace, project)
|
||||
end
|
||||
|
||||
describe 'pressing "i"' do
|
||||
it 'redirects to new issue page' do
|
||||
find('body').native.send_key('i')
|
||||
expect(page).to have_content('New Issue')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue