From 9141e789aaee3718c98dd454d560b66774479b22 Mon Sep 17 00:00:00 2001 From: nixocio Date: Wed, 18 Nov 2020 15:47:25 -0500 Subject: [PATCH] Hide sync icon for smart inventory rows in Inventory List Hide sync icon for smart inventory rows in Inventory List See: https://github.com/ansible/awx/issues/7681 --- .../src/screens/Inventory/InventoryList/InventoryListItem.jsx | 4 +++- .../Inventory/InventoryList/InventoryListItem.test.jsx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx index 7e3feaec33..45408f88a2 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.jsx @@ -101,7 +101,9 @@ function InventoryListItem({ - + {inventory.kind !== 'smart' && ( + + )} , {inventory.pending_deletion ? ( diff --git a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx index b23878a651..61c3fe572d 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryList/InventoryListItem.test.jsx @@ -36,6 +36,7 @@ describe('', () => { inventory={{ id: 1, name: 'Inventory', + kind: '', summary_fields: { organization: { id: 1, @@ -51,6 +52,7 @@ describe('', () => { onSelect={() => {}} /> ); + expect(wrapper.find('SyncStatusIndicator').length).toBe(1); expect( wrapper .find('DataListCell')