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