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-12-21 00:08:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-21 00:08:00 +0300
commitbe59dd1d43332496def276c8d3e78fc82e94273a (patch)
tree19c25e5a7e7f88a0ac4bd797bf70ac48603656cc /spec/views
parent855bf0533bc5d5df2821e9a5951fae4f153f7492 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/issues/show.html.haml_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/views/projects/issues/show.html.haml_spec.rb b/spec/views/projects/issues/show.html.haml_spec.rb
index d34b1735445..add4b44e9b6 100644
--- a/spec/views/projects/issues/show.html.haml_spec.rb
+++ b/spec/views/projects/issues/show.html.haml_spec.rb
@@ -130,4 +130,26 @@ describe 'projects/issues/show' do
expect(rendered).to have_selector('.status-box-open:not(.hidden)', text: 'Open')
end
end
+
+ context 'when the issue is related to a sentry error' do
+ it 'renders a stack trace' do
+ sentry_issue = double(:sentry_issue, sentry_issue_identifier: '1066622')
+ allow(issue).to receive(:sentry_issue).and_return(sentry_issue)
+ render
+
+ expect(rendered).to have_selector(
+ "#js-sentry-error-stack-trace"\
+ "[data-issue-stack-trace-path="\
+ "\"/#{project.full_path}/-/error_tracking/1066622/stack_trace.json\"]"
+ )
+ end
+ end
+
+ context 'when the issue is not related to a sentry error' do
+ it 'does not render a stack trace' do
+ render
+
+ expect(rendered).not_to have_selector('#js-sentry-error-stack-trace')
+ end
+ end
end