diff options
Diffstat (limited to 'spec/features/projects/wiki/shortcuts_spec.rb')
-rw-r--r-- | spec/features/projects/wiki/shortcuts_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/features/projects/wiki/shortcuts_spec.rb b/spec/features/projects/wiki/shortcuts_spec.rb new file mode 100644 index 00000000000..c1f6b0cce3b --- /dev/null +++ b/spec/features/projects/wiki/shortcuts_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +feature 'Wiki shortcuts', :feature, :js do + let(:user) { create(:user) } + let(:project) { create(:empty_project, namespace: user.namespace) } + let(:wiki_page) do + WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute + end + + before do + login_as(user) + visit namespace_project_wiki_path(project.namespace, project, wiki_page) + 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 |