1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue';
/**
* Mock factory for the UserCalloutDismisser component.
* @param {slotProps} The slot props to pass to the default slot content.
* @returns {VueComponent}
*/
export const makeMockUserCalloutDismisser = ({
dismiss = () => {},
shouldShowCallout = true,
isLoadingQuery = false,
} = {}) => ({
props: UserCalloutDismisser.props,
data() {
return {
isLoadingQuery,
shouldShowCallout,
dismiss,
};
},
mounted() {
this.$emit('queryResult', { shouldShowCallout });
},
render() {
return this.$scopedSlots.default({
dismiss,
shouldShowCallout,
isLoadingQuery,
});
},
});
|