debian-mirror-gitlab/spec/features/projects/gfm_autocomplete_load_spec.rb

22 lines
461 B
Ruby
Raw Normal View History

2016-09-29 09:46:39 +05:30
require 'spec_helper'
2017-09-10 17:25:29 +05:30
describe 'GFM autocomplete loading', js: true do
let(:project) { create(:project) }
2016-09-29 09:46:39 +05:30
before do
2017-09-10 17:25:29 +05:30
sign_in(create(:admin))
2016-09-29 09:46:39 +05:30
2017-09-10 17:25:29 +05:30
visit project_path(project)
2016-09-29 09:46:39 +05:30
end
it 'does not load on project#show' do
2017-09-10 17:25:29 +05:30
expect(evaluate_script('gl.GfmAutoComplete')).to eq(nil)
2016-09-29 09:46:39 +05:30
end
it 'loads on new issue page' do
2017-09-10 17:25:29 +05:30
visit new_project_issue_path(project)
2016-09-29 09:46:39 +05:30
2017-08-17 22:00:37 +05:30
expect(evaluate_script('gl.GfmAutoComplete.dataSources')).not_to eq({})
2016-09-29 09:46:39 +05:30
end
end