Commit 882e5ff1 authored by Florie Guibert's avatar Florie Guibert

Fix subgroup epic path on epic boards

Changelog: fixed
EE: true
parent 051507de
......@@ -28,13 +28,16 @@ export default {
inheritAttrs: false,
computed: {
...mapGetters(['isSidebarOpen', 'activeBoardItem']),
...mapState(['sidebarType', 'fullPath', 'issuableType']),
...mapState(['sidebarType', 'issuableType']),
isIssuableSidebar() {
return this.sidebarType === ISSUABLE;
},
showSidebar() {
return this.isIssuableSidebar && this.isSidebarOpen;
},
fullPath() {
return this.activeBoardItem?.referencePath?.split('&')[0] || '';
},
},
methods: {
...mapActions(['toggleBoardItem', 'setActiveItemConfidential', 'setActiveItemSubscribed']),
......
......@@ -87,8 +87,11 @@ describe('EpicBoardContentSidebar', () => {
expect(wrapper.findComponent(GlDrawer).props('open')).toBe(true);
});
it('renders SidebarTodoWidget', () => {
it('renders SidebarTodoWidget passing correct epic fullPath', () => {
expect(wrapper.findComponent(SidebarTodoWidget).exists()).toBe(true);
expect(wrapper.findComponent(SidebarTodoWidget).props('fullPath')).toBe(
'gitlab-org/gitlab-subgroup',
);
});
it('renders BoardSidebarLabelsSelect', () => {
......
......@@ -246,6 +246,7 @@ export const mockFormattedBoardEpic = {
id: 41,
iid: '1',
title: 'Epic title',
referencePath: 'gitlab-org/gitlab-subgroup&41',
state: 'opened',
webUrl: '/groups/gitlab-org/-/epics/1',
group: { fullPath: 'gitlab-org' },
......
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