2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
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) }
|
2020-05-24 23:13:21 +05:30
|
|
|
let(:wiki_page) { create(:wiki_page, wiki: project.wiki, 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
|