2016-09-05 15:38:19 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-06-29 04:13:10 +00:00
|
|
|
describe 'GFM autocomplete loading', js: true do
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { create(:project) }
|
2016-09-05 15:38:19 +00:00
|
|
|
|
|
|
|
before do
|
2017-06-21 23:44:10 +00:00
|
|
|
sign_in(create(:admin))
|
2016-09-05 15:38:19 +00:00
|
|
|
|
2017-07-06 16:20:50 +00:00
|
|
|
visit project_path(project)
|
2016-09-05 15:38:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'does not load on project#show' do
|
2017-05-16 18:42:06 +00:00
|
|
|
expect(evaluate_script('gl.GfmAutoComplete')).to eq(nil)
|
2016-09-05 15:38:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'loads on new issue page' do
|
2017-07-06 16:20:50 +00:00
|
|
|
visit new_project_issue_path(project)
|
2016-09-05 15:38:19 +00:00
|
|
|
|
2016-10-13 03:33:09 +00:00
|
|
|
expect(evaluate_script('gl.GfmAutoComplete.dataSources')).not_to eq({})
|
2016-09-05 15:38:19 +00:00
|
|
|
end
|
|
|
|
end
|