Skip to content
代码片段 群组 项目
未验证 提交 b0325650 编辑于 作者: Ezekiel Kigbo's avatar Ezekiel Kigbo 提交者: GitLab
浏览文件

Merge branch '432440-make-createHandRaiseLeadPath-optional-injected-pararm' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
GlSprintf, GlSprintf,
}, },
apolloProvider, apolloProvider,
inject: ['createHandRaiseLeadPath'], inject: { createHandRaiseLeadPath: { default: null } },
}; };
</script> </script>
<template> <template>
......
...@@ -9,10 +9,12 @@ describe('Code Suggestions Intro', () => { ...@@ -9,10 +9,12 @@ describe('Code Suggestions Intro', () => {
const emptyState = () => wrapper.findComponent(GlEmptyState); const emptyState = () => wrapper.findComponent(GlEmptyState);
const handRaiseLeadButton = () => wrapper.findComponent(HandRaiseLeadButton); const handRaiseLeadButton = () => wrapper.findComponent(HandRaiseLeadButton);
const createComponent = (createHandRaiseLeadPath) => { const createComponent = (provideProps = {}) => {
wrapper = shallowMount(CodeSuggestionsIntro, { wrapper = shallowMount(CodeSuggestionsIntro, {
mocks: { GlEmptyState }, mocks: { GlEmptyState },
provide: { createHandRaiseLeadPath }, provide: {
...provideProps,
},
}); });
}; };
...@@ -32,7 +34,7 @@ describe('Code Suggestions Intro', () => { ...@@ -32,7 +34,7 @@ describe('Code Suggestions Intro', () => {
describe('when showing hand raise lead button', () => { describe('when showing hand raise lead button', () => {
beforeEach(() => { beforeEach(() => {
return createComponent('some-path'); return createComponent({ createHandRaiseLeadPath: 'some-path' });
}); });
it('renders gl-empty-state component without default button, but with hand raise lead button', () => { it('renders gl-empty-state component without default button, but with hand raise lead button', () => {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册