Commit 260e0afc authored by Illya Klymov's avatar Illya Klymov

Merge branch '296521-leave-this-group-button-not-working' into 'master'

Missing action prop on group page

See merge request gitlab-org/gitlab!52379
parents 79202384 4e6ac836
...@@ -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