Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-06 00:07:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-06 00:07:46 +0300
commit82cef8dd1f48ffbc7aaa1ff7374cdb859137e01e (patch)
tree0ebdac2f1880dd1dd3f73a956082759314e0994f /spec/features/sentry_js_spec.rb
parent2baa63e740214382387abe77eeea6c0b1759e621 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/sentry_js_spec.rb')
-rw-r--r--spec/features/sentry_js_spec.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/sentry_js_spec.rb b/spec/features/sentry_js_spec.rb
new file mode 100644
index 00000000000..b39c4f0a0ae
--- /dev/null
+++ b/spec/features/sentry_js_spec.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+describe 'Sentry' do
+ let(:sentry_path) { '/sentry.chunk.js' }
+
+ it 'does not load sentry if sentry is disabled' do
+ allow(Gitlab.config.sentry).to receive(:enabled).and_return(false)
+ visit new_user_session_path
+
+ expect(has_requested_sentry).to eq(false)
+ end
+
+ it 'loads sentry if sentry is enabled' do
+ stub_sentry_settings
+
+ visit new_user_session_path
+
+ expect(has_requested_sentry).to eq(true)
+ end
+
+ def has_requested_sentry
+ page.all('script', visible: false).one? do |elm|
+ elm[:src] =~ /#{sentry_path}$/
+ end
+ end
+end