Merge pull request #8628 from nixocio/ui_issue_7681

Hide sync icon for smart inventory rows in Inventory List

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-11-27 21:21:30 +00:00 committed by GitHub
commit ff3f5fd529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,9 @@ function InventoryListItem({
<DataListItemCells
dataListCells={[
<DataListCell key="sync-status" isIcon>
<SyncStatusIndicator status={syncStatus} />
{inventory.kind !== 'smart' && (
<SyncStatusIndicator status={syncStatus} />
)}
</DataListCell>,
<DataListCell key="name">
{inventory.pending_deletion ? (

View File

@ -36,6 +36,7 @@ describe('<InventoryListItem />', () => {
inventory={{
id: 1,
name: 'Inventory',
kind: '',
summary_fields: {
organization: {
id: 1,
@ -51,6 +52,7 @@ describe('<InventoryListItem />', () => {
onSelect={() => {}}
/>
);
expect(wrapper.find('SyncStatusIndicator').length).toBe(1);
expect(
wrapper
.find('DataListCell')