Use global apollo provider in specs

parent 484280c5
...@@ -19,6 +19,7 @@ describe('EE - DastSiteProfileList', () => { ...@@ -19,6 +19,7 @@ describe('EE - DastSiteProfileList', () => {
let localVue; let localVue;
let wrapper; let wrapper;
let requestHandlers; let requestHandlers;
let apolloProvider;
const defaultProps = { const defaultProps = {
profiles: [], profiles: [],
...@@ -40,7 +41,7 @@ describe('EE - DastSiteProfileList', () => { ...@@ -40,7 +41,7 @@ describe('EE - DastSiteProfileList', () => {
const wrapperFactory = (mountFn = shallowMount) => (options = {}, handlers) => { const wrapperFactory = (mountFn = shallowMount) => (options = {}, handlers) => {
localVue = createLocalVue(); localVue = createLocalVue();
const apolloProvider = handlers && createMockApolloProvider(handlers); apolloProvider = handlers && createMockApolloProvider(handlers);
wrapper = mountFn( wrapper = mountFn(
Component, Component,
merge( merge(
...@@ -72,6 +73,7 @@ describe('EE - DastSiteProfileList', () => { ...@@ -72,6 +73,7 @@ describe('EE - DastSiteProfileList', () => {
afterEach(() => { afterEach(() => {
wrapper.destroy(); wrapper.destroy();
apolloProvider = null;
}); });
it('renders profile list properly', () => { it('renders profile list properly', () => {
...@@ -174,7 +176,7 @@ describe('EE - DastSiteProfileList', () => { ...@@ -174,7 +176,7 @@ describe('EE - DastSiteProfileList', () => {
fullPath: defaultProps.fullPath, fullPath: defaultProps.fullPath,
normalizedTargetUrl, normalizedTargetUrl,
status, status,
store: wrapper.vm.$apollo.getClient(), store: apolloProvider.defaultClient,
}); });
}, },
); );
......
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