shortcuts_spec.rb 582 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
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
11
    sign_in(user)
12 13 14
    visit namespace_project_wiki_path(project.namespace, project, wiki_page)
  end

geoandri's avatar
geoandri committed
15
  scenario 'Visit edit wiki page using "e" keyboard shortcut' do
16 17 18 19 20
    find('body').native.send_key('e')

    expect(find('.wiki-page-title')).to have_content('Edit Page')
  end
end