Commit 4e6ac836 authored by Donald Cook's avatar Donald Cook Committed by Illya Klymov

Missing action prop on group page

parent bbf4dfea
...@@ -179,7 +179,12 @@ export default { ...@@ -179,7 +179,12 @@ export default {
<div <div
class="metadata align-items-md-center d-flex flex-grow-1 flex-shrink-0 flex-wrap justify-content-md-between" class="metadata align-items-md-center d-flex flex-grow-1 flex-shrink-0 flex-wrap justify-content-md-between"
> >
<item-actions v-if="isGroup" :group="group" :parent-group="parentGroup" /> <item-actions
v-if="isGroup"
:group="group"
:parent-group="parentGroup"
:action="action"
/>
<item-stats :item="group" class="group-stats gl-mt-2 d-none d-md-flex" /> <item-stats :item="group" class="group-stats gl-mt-2 d-none d-md-flex" />
</div> </div>
</div> </div>
......
---
title: Missing action prop on group page
merge_request: 52379
author:
type: fixed
...@@ -66,6 +66,22 @@ describe('ItemActions', () => { ...@@ -66,6 +66,22 @@ describe('ItemActions', () => {
}); });
}); });
it('emits `showLeaveGroupModal` event with the correct prefix if `action` prop is passed', () => {
const group = {
...mockParentGroupItem,
canEdit: true,
canLeave: true,
};
createComponent({
group,
action: 'test',
});
jest.spyOn(eventHub, '$emit');
findLeaveGroupBtn().vm.$emit('click', { stopPropagation: () => {} });
expect(eventHub.$emit).toHaveBeenCalledWith('testshowLeaveGroupModal', group, parentGroup);
});
it('does not render leave button if group can not be left', () => { it('does not render leave button if group can not be left', () => {
createComponent({ createComponent({
group: { group: {
......
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