fix labels showing up with no title
This commit is contained in:
parent
3571b97eff
commit
11a9389c4f
|
@ -426,7 +426,7 @@ export default class LabelsSelect {
|
|||
const tpl = _.template([
|
||||
'<% _.each(labels, function(label){ %>',
|
||||
'<a href="<%- issueUpdateURL.slice(0, issueUpdateURL.lastIndexOf("/")) %>?label_name[]=<%- encodeURIComponent(label.title) %>">',
|
||||
'<span class="label has-tooltip color-label" title="<%- label.description %>" style="background-color: <%- label.color %>; color: <%- label.text_color %>;">',
|
||||
'<span class="badge label has-tooltip color-label" title="<%- label.description %>" style="background-color: <%- label.color %>; color: <%- label.text_color %>;">',
|
||||
'<%- label.title %>',
|
||||
'</span>',
|
||||
'</a>',
|
||||
|
|
|
@ -40,5 +40,9 @@ describe('LabelsSelect', () => {
|
|||
it('generated label item template has correct label styles', () => {
|
||||
expect($labelEl.find('span.label').attr('style')).toBe(`background-color: ${label.color}; color: ${label.text_color};`);
|
||||
});
|
||||
|
||||
it('generated label item has a badge class', () => {
|
||||
expect($labelEl.find('span').hasClass('badge')).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue