Only display assignee in change list if assigned

Without this fix, unassigned changes will have an empty grey circle
in the assignee column.

Change-Id: I11d54da5ed60145cf722ddf031d2254eaa0b91e1
(cherry picked from commit 0f108b0890)
This commit is contained in:
Logan Hanks
2017-10-02 05:43:48 -07:00
committed by Paladox none
parent 730da693cc
commit 738eb640cd
2 changed files with 14 additions and 1 deletions

View File

@@ -139,7 +139,9 @@ limitations under the License.
</td>
<td class="cell assignee"
hidden$="[[isColumnHidden('Assignee', visibleChangeTableColumns)]]">
<gr-account-link account="[[change.assignee]]"></gr-account-link>
<template is="dom-if" if="[[change.assignee]]">
<gr-account-link account="[[change.assignee]]"></gr-account-link>
</template>
</td>
<td class="cell project"
hidden$="[[isColumnHidden('Project', visibleChangeTableColumns)]]">

View File

@@ -186,5 +186,16 @@ limitations under the License.
const elementClass = '.bad';
assert.isNotOk(element.$$(elementClass));
});
test('assignee only displayed if there is one', () => {
assert.isNotOk(element.$$('.assignee gr-account-link'));
element.change = {
assignee: {
name: 'test',
},
};
flushAsynchronousOperations();
assert.isOk(element.$$('.assignee gr-account-link'));
});
});
</script>