From ce30594b30094be74ba8746f28a5980c400ad0e8 Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Mon, 6 Apr 2020 15:05:11 -0400 Subject: [PATCH] update inventory and host routes to being child-based instead of render prop based --- .../src/screens/Host/HostGroups/HostGroupsList.test.jsx | 7 +++---- .../Inventory/InventoryGroup/InventoryGroup.test.jsx | 9 +++------ .../InventoryGroupAdd/InventoryGroupAdd.test.jsx | 7 +++---- .../InventoryGroupDetail/InventoryGroupDetail.test.jsx | 9 +++------ .../InventoryGroupEdit/InventoryGroupEdit.test.jsx | 7 +++---- .../InventoryGroups/InventoryGroupsList.test.jsx | 7 +++---- .../InventoryHostGroups/InventoryHostGroupsList.test.jsx | 7 +++---- 7 files changed, 21 insertions(+), 32 deletions(-) diff --git a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx index 4bb2a89b7a..82f3bf61ab 100644 --- a/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Host/HostGroups/HostGroupsList.test.jsx @@ -90,10 +90,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - } - />, + + + , { context: { router: { history, route: { location: history.location } }, diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx index dc1dd9d57f..af9182d936 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroup/InventoryGroup.test.jsx @@ -43,12 +43,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - ( - {}} inventory={inventory} /> - )} - />, + + {}} inventory={inventory} /> + , { context: { router: { history } } } ); }); diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx index ccbbdb8bfb..f5ad16dabf 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupAdd/InventoryGroupAdd.test.jsx @@ -19,10 +19,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - } - />, + + + , { context: { router: { history, route: { location: history.location } }, diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx index cf1d2cca45..427a30522f 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupDetail/InventoryGroupDetail.test.jsx @@ -36,12 +36,9 @@ describe('', () => { initialEntries: ['/inventories/inventory/1/groups/1/details'], }); wrapper = mountWithContexts( - ( - - )} - />, + + + , { context: { router: { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx index fe9c678a23..4e0056d095 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroupEdit/InventoryGroupEdit.test.jsx @@ -24,10 +24,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - } - />, + + + , { context: { router: { diff --git a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx index b0f4521c30..a10cd22160 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryGroups/InventoryGroupsList.test.jsx @@ -73,10 +73,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - } - />, + + + , { context: { router: { history, route: { location: history.location } }, diff --git a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx index 8347494c2d..c20be91121 100644 --- a/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx +++ b/awx/ui_next/src/screens/Inventory/InventoryHostGroups/InventoryHostGroupsList.test.jsx @@ -82,10 +82,9 @@ describe('', () => { }); await act(async () => { wrapper = mountWithContexts( - } - />, + + + , { context: { router: { history, route: { location: history.location } },