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

24 lines
487 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2016-09-29 09:46:39 +05:30
require 'spec_helper'
2018-03-17 18:26:18 +05:30
describe 'GFM autocomplete loading', :js do
2017-09-10 17:25:29 +05:30
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