Commit 5dbe9801 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch '195712-empty-stacktrace-on-error-details-page' into 'master'

Communicate empty stack trace on error details page

See merge request gitlab-org/gitlab!34517
parents d3c5b084 7d3220ac
......@@ -106,6 +106,7 @@ export default {
errorPollTimeout: 0,
issueCreationInProgress: false,
isAlertVisible: false,
isStacktraceEmptyAlertVisible: true,
closedIssueId: null,
};
},
......@@ -167,6 +168,9 @@ export default {
resolveBtnLabel() {
return this.errorStatus !== errorStatus.RESOLVED ? __('Resolve') : __('Unresolve');
},
showEmptyStacktraceAlert() {
return !this.loadingStacktrace && !this.showStacktrace && this.isStacktraceEmptyAlertVisible;
},
},
watch: {
error(val) {
......@@ -254,6 +258,10 @@ export default {
</gl-sprintf>
</gl-alert>
<gl-alert v-if="showEmptyStacktraceAlert" @dismiss="isStacktraceEmptyAlertVisible = false">
{{ __('No stack trace for this error') }}
</gl-alert>
<div class="error-details-header d-flex py-2 justify-content-between">
<div
v-if="!loadingStacktrace && stacktrace"
......
---
title: Show notification about empty stacktrace
merge_request: 34517
author:
type: added
......@@ -15071,6 +15071,9 @@ msgstr ""
msgid "No schedules"
msgstr ""
msgid "No stack trace for this error"
msgstr ""
msgid "No starrers matched your search"
msgstr ""
......
......@@ -48,6 +48,7 @@ describe('ErrorDetails', () => {
const findUpdateResolveStatusButton = () =>
wrapper.find('[data-testid="update-resolve-status-btn"]');
const findExternalUrl = () => wrapper.find('[data-testid="external-url-link"]');
const findAlert = () => wrapper.find(GlAlert);
function mountComponent() {
wrapper = shallowMount(ErrorDetails, {
......@@ -278,15 +279,17 @@ describe('ErrorDetails', () => {
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlLoadingIcon).exists()).toBe(false);
expect(wrapper.find(Stacktrace).exists()).toBe(true);
expect(findAlert().exists()).toBe(false);
});
});
it('should NOT show stacktrace if no entries', () => {
it('should NOT show stacktrace if no entries and show Alert message', () => {
store.state.details.loadingStacktrace = false;
store.getters = { 'details/sentryUrl': () => 'sentry.io', 'details/stacktrace': () => [] };
return wrapper.vm.$nextTick().then(() => {
expect(wrapper.find(GlLoadingIcon).exists()).toBe(false);
expect(wrapper.find(Stacktrace).exists()).toBe(false);
expect(findAlert().text()).toBe('No stack trace for this error');
});
});
});
......@@ -404,7 +407,6 @@ describe('ErrorDetails', () => {
});
it('should show alert with closed issueId', () => {
const findAlert = () => wrapper.find(GlAlert);
const closedIssueId = 123;
wrapper.setData({
isAlertVisible: true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment