mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
update inventory and host routes to being child-based instead of render prop based
This commit is contained in:
@@ -90,10 +90,9 @@ describe('<HostGroupsList />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/hosts/:id/groups"
|
||||
component={() => <HostGroupsList host={host} />}
|
||||
/>,
|
||||
<Route path="/hosts/:id/groups">
|
||||
<HostGroupsList host={host} />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: { history, route: { location: history.location } },
|
||||
|
||||
@@ -43,12 +43,9 @@ describe('<InventoryGroup />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/groups"
|
||||
component={() => (
|
||||
<InventoryGroup setBreadcrumb={() => {}} inventory={inventory} />
|
||||
)}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/groups">
|
||||
<InventoryGroup setBreadcrumb={() => {}} inventory={inventory} />
|
||||
</Route>,
|
||||
{ context: { router: { history } } }
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,10 +19,9 @@ describe('<InventoryGroupAdd />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/groups/add"
|
||||
component={() => <InventoryGroupAdd />}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/groups/add">
|
||||
<InventoryGroupAdd />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: { history, route: { location: history.location } },
|
||||
|
||||
@@ -36,12 +36,9 @@ describe('<InventoryGroupDetail />', () => {
|
||||
initialEntries: ['/inventories/inventory/1/groups/1/details'],
|
||||
});
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/groups/:groupId"
|
||||
component={() => (
|
||||
<InventoryGroupDetail inventoryGroup={inventoryGroup} />
|
||||
)}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/groups/:groupId">
|
||||
<InventoryGroupDetail inventoryGroup={inventoryGroup} />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: {
|
||||
|
||||
@@ -24,10 +24,9 @@ describe('<InventoryGroupEdit />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/groups/:groupId/edit"
|
||||
component={() => <InventoryGroupEdit inventoryGroup={{ id: 2 }} />}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/groups/:groupId/edit">
|
||||
<InventoryGroupEdit inventoryGroup={{ id: 2 }} />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: {
|
||||
|
||||
@@ -73,10 +73,9 @@ describe('<InventoryGroupsList />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/groups"
|
||||
component={() => <InventoryGroupsList />}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/groups">
|
||||
<InventoryGroupsList />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: { history, route: { location: history.location } },
|
||||
|
||||
@@ -82,10 +82,9 @@ describe('<InventoryHostGroupsList />', () => {
|
||||
});
|
||||
await act(async () => {
|
||||
wrapper = mountWithContexts(
|
||||
<Route
|
||||
path="/inventories/inventory/:id/hosts/:hostId/groups"
|
||||
component={() => <InventoryHostGroupsList />}
|
||||
/>,
|
||||
<Route path="/inventories/inventory/:id/hosts/:hostId/groups">
|
||||
<InventoryHostGroupsList />
|
||||
</Route>,
|
||||
{
|
||||
context: {
|
||||
router: { history, route: { location: history.location } },
|
||||
|
||||
Reference in New Issue
Block a user