-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* inventoryCardContext, useGetHostsInventory hook * inventoryCardHosts, move from deprecated prep * productView, allow partial product types * redux, inventoryListSelectors, redundancy * rhsmServices, types, schema, transformer for hosts
- Loading branch information
Showing
22 changed files
with
603 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/components/inventoryCard/__tests__/__snapshots__/inventoryCardHosts.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`InventoryCardHosts Component should render a basic component: basic render 1`] = ` | ||
<InventoryCard | ||
cardActions={ | ||
<CardHeaderMain> | ||
<ToolbarFieldDisplayName | ||
t={[Function]} | ||
useDispatch={[Function]} | ||
useProduct={[Function]} | ||
useProductInventoryHostsQuery={[Function]} | ||
/> | ||
</CardHeaderMain> | ||
} | ||
isDisabled={false} | ||
perPageDefault={10} | ||
t={[Function]} | ||
useGetInventory={[Function]} | ||
useOnColumnSort={[Function]} | ||
useOnPage={[Function]} | ||
useProductInventoryConfig={[Function]} | ||
useProductInventoryQuery={[Function]} | ||
useSession={[Function]} | ||
/> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/components/inventoryCard/__tests__/inventoryCardHosts.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { InventoryCardHosts } from '../inventoryCardHosts'; | ||
import { RHSM_API_QUERY_SET_TYPES } from '../../../services/rhsm/rhsmConstants'; | ||
|
||
describe('InventoryCardHosts Component', () => { | ||
it('should render a basic component', async () => { | ||
const props = { | ||
useProductInventoryConfig: () => ({ filters: [], settings: {} }), | ||
useProductInventoryQuery: () => ({ | ||
[RHSM_API_QUERY_SET_TYPES.LIMIT]: 10, | ||
[RHSM_API_QUERY_SET_TYPES.OFFSET]: 0 | ||
}) | ||
}; | ||
|
||
const component = await shallowHookComponent(<InventoryCardHosts {...props} />); | ||
expect(component).toMatchSnapshot('basic render'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.