Skip to content

Commit

Permalink
DEV testing, default limit, offset for guests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Jan 21, 2022
1 parent f86e7a5 commit 42dc288
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Array [
Array [
Array [
Object {
"offset": 0,
"type": "SET_QUERY_RHSM_GUESTS_INVENTORY_offset",
"type": "SET_QUERY_RESET_INVENTORY_GUESTS_LIST",
"viewId": "1234567890",
},
],
Expand Down Expand Up @@ -54,8 +53,6 @@ Object {

exports[`InventorySubscriptionsContext should return specific properties: specific properties 1`] = `
Object {
"DEFAULT_LIMIT": 100,
"DEFAULT_OFFSET": 0,
"useGetGuestsInventory": [Function],
"useOnScroll": [Function],
"useSelectorsGuestsInventory": [Function],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ describe('InventorySubscriptionsContext', () => {
const { unmount } = await mountHook(() => {
const onScroll = useOnScroll('1234567890', mockSuccessCallback, {
useDispatch: () => mockDispatch,
useProductInventoryQuery: () => ({ [RHSM_API_QUERY_SET_TYPES.OFFSET]: 0 }),
useProductInventoryQuery: () => ({
[RHSM_API_QUERY_SET_TYPES.OFFSET]: 0,
[RHSM_API_QUERY_SET_TYPES.LIMIT]: 100
}),
useSelectorsInventory: () => ({ pending: false, data: { meta: { count: 200 } } })
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ Object {
"id": "sla",
},
],
"inventoryGuestsQuery": Object {
"limit": 100,
"offset": 0,
},
"inventoryHostsQuery": Object {
"dir": "desc",
"limit": 100,
Expand Down Expand Up @@ -246,10 +242,6 @@ Object {
"id": "sla",
},
],
"inventoryGuestsQuery": Object {
"limit": 100,
"offset": 0,
},
"inventoryHostsQuery": Object {
"dir": "desc",
"limit": 100,
Expand Down Expand Up @@ -282,6 +274,7 @@ Object {

exports[`ProductViewContext should apply hooks for retrieving specific api queries: inventoryGuestsQuery 1`] = `
Object {
"limit": 100,
"offset": "testOffset",
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ exports[`ProductViewOpenShiftContainer Component should render a basic component
"id": "sla",
},
],
"inventoryGuestsQuery": Object {
"limit": 100,
"offset": 0,
},
"inventoryHostsQuery": Object {
"dir": "desc",
"limit": 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ Object {
"id": "sla",
},
],
"inventoryGuestsQuery": Object {
"limit": 100,
"offset": 0,
},
"inventoryHostsQuery": Object {
"dir": "desc",
"limit": 100,
Expand Down
4 changes: 0 additions & 4 deletions src/config/product.openshiftContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ const config = {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventoryGuestsQuery: {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventorySubscriptionsQuery: {
[RHSM_API_QUERY_TYPES.SORT]: RHSM_API_QUERY_SUBSCRIPTIONS_SORT_TYPES.NEXT_EVENT_DATE,
[RHSM_API_QUERY_TYPES.DIRECTION]: SORT_DIRECTION_TYPES.DESCENDING,
Expand Down
4 changes: 0 additions & 4 deletions src/config/product.rhel.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ const config = {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventoryGuestsQuery: {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventorySubscriptionsQuery: {
[RHSM_API_QUERY_TYPES.SORT]: RHSM_API_QUERY_SUBSCRIPTIONS_SORT_TYPES.NEXT_EVENT_DATE,
[RHSM_API_QUERY_TYPES.DIRECTION]: SORT_DIRECTION_TYPES.DESCENDING,
Expand Down
4 changes: 0 additions & 4 deletions src/config/product.satellite.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ const config = {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventoryGuestsQuery: {
[RHSM_API_QUERY_TYPES.LIMIT]: 100,
[RHSM_API_QUERY_TYPES.OFFSET]: 0
},
inventorySubscriptionsQuery: {
[RHSM_API_QUERY_TYPES.SORT]: RHSM_API_QUERY_SUBSCRIPTIONS_SORT_TYPES.NEXT_EVENT_DATE,
[RHSM_API_QUERY_TYPES.DIRECTION]: SORT_DIRECTION_TYPES.DESCENDING,
Expand Down

0 comments on commit 42dc288

Please sign in to comment.