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

Don't show due dates in red if issue is closed

parent 74da7a21
...@@ -146,6 +146,7 @@ export default { ...@@ -146,6 +146,7 @@ export default {
<span v-if="dueDate" class="order-md-1"> <span v-if="dueDate" class="order-md-1">
<issue-due-date <issue-due-date
:date="dueDate" :date="dueDate"
:closed="Boolean(closedAt)"
tooltip-placement="top" tooltip-placement="top"
css-class="item-due-date gl-display-flex gl-align-items-center" css-class="item-due-date gl-display-flex gl-align-items-center"
/> />
......
title: Don't show due dates in red if the issue is closed
merge_request: 57647
author: Daniel Ziegenberg <daniel@ziegenberg.at>
type: fixed
...@@ -132,6 +132,35 @@ describe('RelatedIssuableItem', () => { ...@@ -132,6 +132,35 @@ describe('RelatedIssuableItem', () => {
it('renders due date component with correct due date', () => { it('renders due date component with correct due date', () => {
expect(wrapper.find(IssueDueDate).props('date')).toBe(props.dueDate); expect(wrapper.find(IssueDueDate).props('date')).toBe(props.dueDate);
}); });
it('does not render red icon for overdue issue that is closed', async () => {
mountComponent({
props: {
...props,
closedAt: '2018-12-01T00:00:00.00Z',
},
});
await wrapper.vm.$nextTick();
expect(wrapper.find(IssueDueDate).props('closed')).toBe(true);
});
it('should not contain the `.text-danger` css class for overdue issue that is closed', async () => {
mountComponent({
props: {
...props,
closedAt: '2018-12-01T00:00:00.00Z',
},
});
await wrapper.vm.$nextTick();
expect(wrapper.find(IssueDueDate).find('.board-card-info-icon').classes('text-danger')).toBe(
false,
);
expect(wrapper.find(IssueDueDate).find('.board-card-info-text').classes('text-danger')).toBe(
false,
);
});
}); });
describe('token assignees', () => { describe('token assignees', () => {
......
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