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

21 lines
537 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
feature 'Wiki shortcuts', :js do
2017-08-17 22:00:37 +05:30
let(:user) { create(:user) }
2017-09-10 17:25:29 +05:30
let(:project) { create(:project, namespace: user.namespace) }
2017-08-17 22:00:37 +05:30
let(:wiki_page) do
WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute
end
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
scenario 'Visit edit wiki page using "e" keyboard shortcut' do
find('body').native.send_key('e')
expect(find('.wiki-page-title')).to have_content('Edit Page')
end
end