debian-mirror-gitlab/spec/features/projects/wiki/shortcuts_spec.rb

19 lines
533 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2018-11-08 19:23:39 +05:30
describe 'Wiki shortcuts', :js do
2017-08-17 22:00:37 +05:30
let(:user) { create(:user) }
2018-10-15 14:42:47 +05:30
let(:project) { create(:project, :wiki_repo, namespace: user.namespace) }
2018-03-17 18:26:18 +05:30
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'home', content: 'Home page' }) }
2017-08-17 22:00:37 +05:30
before do
2017-09-10 17:25:29 +05:30
sign_in(user)
visit project_wiki_path(project, wiki_page)
2017-08-17 22:00:37 +05:30
end
2018-11-08 19:23:39 +05:30
it 'Visit edit wiki page using "e" keyboard shortcut' do
2017-08-17 22:00:37 +05:30
find('body').native.send_key('e')
expect(find('.wiki-page-title')).to have_content('Edit Page')
end
end