Commit 6cf1bd0b authored by lauraMon's avatar lauraMon

Moves state setup to beforeEach

parent 7fea5e9f
...@@ -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