Commit 3428650c authored by Florie Guibert's avatar Florie Guibert

Fix undefined epic issue path in epic tree

parent b67aa714
......@@ -88,6 +88,9 @@ export default {
itemId() {
return this.itemReference.split(this.item.pathIdSeparator).pop();
},
itemPath() {
return this.itemReference.split(this.item.pathIdSeparator)[0];
},
itemHierarchy() {
return this.itemPath + this.item.pathIdSeparator + this.itemId;
},
......
......@@ -237,6 +237,12 @@ describe('RelatedItemsTree', () => {
});
});
describe('itemPath', () => {
it('returns string containing item path', () => {
expect(wrapper.vm.itemPath).toBe('gitlab-org/gitlab-shell');
});
});
describe('computedPath', () => {
it('returns value of `itemWebPath` when it is defined', () => {
expect(wrapper.vm.computedPath).toBe(mockItem.webPath);
......@@ -313,6 +319,7 @@ describe('RelatedItemsTree', () => {
const path = itemPath + mockItem.pathIdSeparator + itemId;
expect(stateTooltip.props('path')).toBe(path);
expect(path).toContain('gitlab-org/gitlab-shell');
});
it('renders confidential icon when `item.confidential` is true', () => {
......
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