mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02: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 () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/hosts/:id/groups">
|
||||||
path="/hosts/:id/groups"
|
<HostGroupsList host={host} />
|
||||||
component={() => <HostGroupsList host={host} />}
|
</Route>,
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
|
|||||||
@@ -43,12 +43,9 @@ describe('<InventoryGroup />', () => {
|
|||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/groups">
|
||||||
path="/inventories/inventory/:id/groups"
|
<InventoryGroup setBreadcrumb={() => {}} inventory={inventory} />
|
||||||
component={() => (
|
</Route>,
|
||||||
<InventoryGroup setBreadcrumb={() => {}} inventory={inventory} />
|
|
||||||
)}
|
|
||||||
/>,
|
|
||||||
{ context: { router: { history } } }
|
{ context: { router: { history } } }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ describe('<InventoryGroupAdd />', () => {
|
|||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/groups/add">
|
||||||
path="/inventories/inventory/:id/groups/add"
|
<InventoryGroupAdd />
|
||||||
component={() => <InventoryGroupAdd />}
|
</Route>,
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
|
|||||||
@@ -36,12 +36,9 @@ describe('<InventoryGroupDetail />', () => {
|
|||||||
initialEntries: ['/inventories/inventory/1/groups/1/details'],
|
initialEntries: ['/inventories/inventory/1/groups/1/details'],
|
||||||
});
|
});
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/groups/:groupId">
|
||||||
path="/inventories/inventory/:id/groups/:groupId"
|
<InventoryGroupDetail inventoryGroup={inventoryGroup} />
|
||||||
component={() => (
|
</Route>,
|
||||||
<InventoryGroupDetail inventoryGroup={inventoryGroup} />
|
|
||||||
)}
|
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: {
|
router: {
|
||||||
|
|||||||
@@ -24,10 +24,9 @@ describe('<InventoryGroupEdit />', () => {
|
|||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/groups/:groupId/edit">
|
||||||
path="/inventories/inventory/:id/groups/:groupId/edit"
|
<InventoryGroupEdit inventoryGroup={{ id: 2 }} />
|
||||||
component={() => <InventoryGroupEdit inventoryGroup={{ id: 2 }} />}
|
</Route>,
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: {
|
router: {
|
||||||
|
|||||||
@@ -73,10 +73,9 @@ describe('<InventoryGroupsList />', () => {
|
|||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/groups">
|
||||||
path="/inventories/inventory/:id/groups"
|
<InventoryGroupsList />
|
||||||
component={() => <InventoryGroupsList />}
|
</Route>,
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
|
|||||||
@@ -82,10 +82,9 @@ describe('<InventoryHostGroupsList />', () => {
|
|||||||
});
|
});
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Route
|
<Route path="/inventories/inventory/:id/hosts/:hostId/groups">
|
||||||
path="/inventories/inventory/:id/hosts/:hostId/groups"
|
<InventoryHostGroupsList />
|
||||||
component={() => <InventoryHostGroupsList />}
|
</Route>,
|
||||||
/>,
|
|
||||||
{
|
{
|
||||||
context: {
|
context: {
|
||||||
router: { history, route: { location: history.location } },
|
router: { history, route: { location: history.location } },
|
||||||
|
|||||||
Reference in New Issue
Block a user