Commit 1011dec1 authored by Phil Hughes's avatar Phil Hughes

Merge branch...

Merge branch '119346-follow-up-from-add-stack-trace-component-below-details-when-issue-is-created-from-sentry' into 'master'

Refactor test for sentry error stack trace component

See merge request gitlab-org/gitlab!22495
parents 9b0ad368 6cf1bd0b
...@@ -69,15 +69,17 @@ describe('Sentry Error Stack Trace', () => { ...@@ -69,15 +69,17 @@ describe('Sentry Error Stack Trace', () => {
}); });
describe('Stack trace', () => { describe('Stack trace', () => {
it('should show stacktrace', () => { beforeEach(() => {
store.state.details.loadingStacktrace = false; store.state.details.loadingStacktrace = false;
});
it('should show stacktrace', () => {
mountComponent({ stubs: {} }); mountComponent({ stubs: {} });
expect(wrapper.find(GlLoadingIcon).exists()).toBe(false); expect(wrapper.find(GlLoadingIcon).exists()).toBe(false);
expect(wrapper.find(Stacktrace).exists()).toBe(true); expect(wrapper.find(Stacktrace).exists()).toBe(true);
}); });
it('should not show stacktrace if it does not exist', () => { it('should not show stacktrace if it does not exist', () => {
store.state.details.loadingStacktrace = false;
expect(wrapper.find(GlLoadingIcon).exists()).toBe(false); expect(wrapper.find(GlLoadingIcon).exists()).toBe(false);
expect(wrapper.find(Stacktrace).exists()).toBe(false); expect(wrapper.find(Stacktrace).exists()).toBe(false);
}); });
......
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