|
|
|
import { createLocalVue, shallowMount } from '@vue/test-utils';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
import { GlLoadingIcon, GlLink } from '@gitlab/ui';
|
|
|
|
import { GlButton, GlLoadingIcon, GlLink } from '@gitlab/ui';
|
|
|
|
import Stacktrace from '~/error_tracking/components/stacktrace.vue';
|
|
|
|
import ErrorDetails from '~/error_tracking/components/error_details.vue';
|
|
|
|
|
| ... | ... | @@ -20,6 +20,7 @@ describe('ErrorDetails', () => { |
|
|
|
propsData: {
|
|
|
|
issueDetailsPath: '/123/details',
|
|
|
|
issueStackTracePath: '/stacktrace',
|
|
|
|
issueProjectPath: '/test-project/issues/new',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
| ... | ... | @@ -82,6 +83,15 @@ describe('ErrorDetails', () => { |
|
|
|
expect(wrapper.find(Stacktrace).exists()).toBe(false);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should allow a blank issue to be created', () => {
|
|
|
|
store.state.details.loading = false;
|
|
|
|
store.state.details.error.id = 1;
|
|
|
|
mountComponent();
|
|
|
|
const button = wrapper.find(GlButton);
|
|
|
|
expect(button.exists()).toBe(true);
|
|
|
|
expect(button.attributes().href).toBe(wrapper.props().issueProjectPath);
|
|
|
|
});
|
|
|
|
|
|
|
|
describe('Stacktrace', () => {
|
|
|
|
it('should show stacktrace', () => {
|
|
|
|
store.state.details.loading = false;
|
| ... | ... | |
| ... | ... | |