Commit debe45db authored by Daniel Ziegenberg's avatar Daniel Ziegenberg Committed by Simon Knox

Don't show due date in red on epic related issues if issue is closed

Issues shown in the epic related items tree have a due shown in red
even when the issue is closed. This is because the closed state was
not provided to the item-due-date component.

Changelog: changed
parent 3c16ef99
......@@ -254,6 +254,7 @@ export default {
<item-due-date
v-if="item.dueDate"
:date="item.dueDate"
:closed="Boolean(item.closedAt)"
tooltip-placement="top"
css-class="item-due-date gl-display-flex gl-align-items-center gl-mr-5!"
/>
......
......@@ -361,6 +361,19 @@ describe('RelatedItemsTree', () => {
expect(dueDate.isVisible()).toBe(true);
});
it('does not render red icon for overdue issue that is closed', async () => {
wrapper.setProps({
item: {
...mockItem,
closedAt: '2018-12-01T00:00:00.00Z',
},
});
await wrapper.vm.$nextTick();
expect(wrapper.find(ItemDueDate).props('closed')).toBe(true);
});
it('renders item weight when it has weight', () => {
const weight = wrapper.find(ItemWeight);
......
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