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

24 lines
498 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'
2020-06-23 00:09:42 +05:30
RSpec.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
2022-04-04 11:22:00 +05:30
sign_in(project.first_owner)
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