diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 18:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-14 18:09:48 +0300 |
commit | 81f257d72ef398933453d215019c850f57dae252 (patch) | |
tree | e7236ae76f96afb207d3ea85164b88c429b6f43c /spec/frontend/__helpers__ | |
parent | b82c4935ecc86d1429710163287f5bd7d75bf226 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/__helpers__')
-rw-r--r-- | spec/frontend/__helpers__/mock_user_callout_dismisser.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/__helpers__/mock_user_callout_dismisser.js b/spec/frontend/__helpers__/mock_user_callout_dismisser.js new file mode 100644 index 00000000000..652f36028dc --- /dev/null +++ b/spec/frontend/__helpers__/mock_user_callout_dismisser.js @@ -0,0 +1,16 @@ +/** + * 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, +} = {}) => ({ + render() { + return this.$scopedSlots.default({ + dismiss, + shouldShowCallout, + }); + }, +}); |