gitlab-org--gitlab-foss/spec/features/projects/wiki/shortcuts_spec.rb

19 lines
533 B
Ruby
Raw Normal View History

2017-03-26 16:16:55 -04:00
require 'spec_helper'
2018-07-05 02:32:05 -04:00
describe 'Wiki shortcuts', :js do
2017-03-26 16:16:55 -04:00
let(:user) { create(:user) }
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'home', content: 'Home page' }) }
2017-03-26 16:16:55 -04:00
before do
sign_in(user)
visit project_wiki_path(project, wiki_page)
2017-03-26 16:16:55 -04:00
end
2018-07-05 02:32:05 -04:00
it 'Visit edit wiki page using "e" keyboard shortcut' do
2017-03-26 16:16:55 -04:00
find('body').native.send_key('e')
expect(find('.wiki-page-title')).to have_content('Edit Page')
end
end