Commit 55a967b1 authored by Simon Knox's avatar Simon Knox

Merge branch...

Merge branch '336626-epic-boards-sidebar-queries-do-not-include-full-path-when-on-sub-group' into 'master'

Fix subgroup epic path on epic boards

See merge request gitlab-org/gitlab!66587
parents 318a0b48 882e5ff1
......@@ -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