Commit b7242382 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '218477-update-epic-issue-closed-icons' into 'master'

Use closed icons for issue and epics

See merge request gitlab-org/gitlab!47176
parents 10e72ff5 acc25ab8
......@@ -80,7 +80,10 @@ export default {
return this.isOpen ? __('Opened') : __('Closed');
},
stateIconName() {
return this.item.type === ChildType.Epic ? 'epic' : 'issues';
if (this.item.type === ChildType.Epic) {
return this.isOpen ? 'epic' : 'epic-closed';
}
return this.isOpen ? 'issues' : 'issue-closed';
},
stateIconClass() {
return this.isOpen
......
......@@ -30,7 +30,7 @@
}
&.item-closed {
background-color: $gray-10;
background-color: $white;
}
}
......
---
title: Use closed icons for issues and epics when closed
merge_request: 47176
author:
type: changed
......@@ -242,10 +242,10 @@ describe('RelatedItemsTree', () => {
});
describe.each`
createItem | itemType | isEpic | stateIconName
${createEpicItem} | ${'epic'} | ${true} | ${'epic'}
${createIssueItem} | ${'issue'} | ${false} | ${'issues'}
`(`when dependent on item type`, ({ createItem, isEpic, stateIconName, itemType }) => {
createItem | itemType | isEpic
${createEpicItem} | ${'epic'} | ${true}
${createIssueItem} | ${'issue'} | ${false}
`(`when dependent on item type`, ({ createItem, isEpic, itemType }) => {
beforeEach(() => {
mockItem = createItem();
wrapper = createComponent();
......@@ -256,9 +256,25 @@ describe('RelatedItemsTree', () => {
expect(wrapper.vm.isEpic).toBe(isEpic);
});
});
});
describe.each`
createItem | testDesc | stateIconName
${createEpicItem(mockOpenEpic)} | ${'epic is `open`'} | ${'epic'}
${createEpicItem(mockClosedEpic)} | ${'epic is `closed`'} | ${'epic-closed'}
${createIssueItem(mockIssue1)} | ${'issue is `open`'} | ${'issues'}
${createIssueItem(mockClosedIssue)} | ${'issue is `closed`'} | ${'issue-closed'}
`(`when dependent on item type and state`, ({ createItem, testDesc, stateIconName }) => {
beforeEach(() => {
mockItem = createItem;
});
describe('stateIconName', () => {
it(`returns string ${stateIconName}`, async () => {
it(`returns string \`${stateIconName}\` when ${testDesc}`, async () => {
wrapper.setProps({
item: mockItem,
});
await wrapper.vm.$nextTick();
expect(wrapper.vm.stateIconName).toBe(stateIconName);
......
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