forked from RedHatInsights/curiosity-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(inventoryCard): ent-4572 class, function conversion (RedHatI…
…nsights#857) * locale, disabled tab string * guestsList, class to func, deprecated guests * guestsListContext, hooks for selectors, action * inventoryCard, class to func * inventoryCardContext, hooks for selectors, action * inventorySubscriptions, class to func, alias inventoryCard * inventorySubscriptionsContext, hooks for selectors, action * productViews, component prop drill, config clean up * productViewContext, activate guests config * useReactRedux, expand base redux hooks * viewReducer, guests query and types * selectors, remove unused instances, subscriptions * rhsmConstants, expand for guests, number_of_guests * rhsmSchemas, guests, subscriptions added * rhsmTransformers, instances number_of_guests added
- Loading branch information
Showing
64 changed files
with
2,998 additions
and
2,942 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
267 changes: 267 additions & 0 deletions
267
src/components/guestsList/__tests__/__snapshots__/guestsList.deprecated.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,267 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`GuestsList Component should handle multiple display states: fulfilled 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<div | ||
className="curiosity-table-scroll" | ||
style={ | ||
Object { | ||
"height": "84px", | ||
} | ||
} | ||
> | ||
<div | ||
className="curiosity-table-scroll-list__no-scroll" | ||
onScroll={[Function]} | ||
> | ||
<Table | ||
ariaLabel={null} | ||
borders={false} | ||
className="curiosity-guests-list" | ||
columnHeaders={ | ||
Array [ | ||
"t(curiosity-inventory.header, {\\"context\\":\\"lorem\\"})", | ||
"t(curiosity-inventory.header, {\\"context\\":\\"dolor\\"})", | ||
] | ||
} | ||
isHeader={true} | ||
rows={ | ||
Array [ | ||
Object { | ||
"cells": Array [ | ||
"ipsum", | ||
"sit", | ||
], | ||
}, | ||
] | ||
} | ||
summary={null} | ||
t={[Function]} | ||
variant="compact" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`GuestsList Component should handle multiple display states: initial pending 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<Loader | ||
skeletonProps={ | ||
Object { | ||
"size": "sm", | ||
} | ||
} | ||
tableProps={ | ||
Object { | ||
"borders": false, | ||
"className": "curiosity-guests-list", | ||
"colCount": 1, | ||
"colWidth": Array [], | ||
"rowCount": 1, | ||
"variant": "compact", | ||
} | ||
} | ||
variant="table" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`GuestsList Component should handle multiple display states: paged pending 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<div | ||
className="curiosity-table-scroll" | ||
style={ | ||
Object { | ||
"height": "84px", | ||
} | ||
} | ||
> | ||
<div | ||
className="curiosity-table-scroll-list__no-scroll" | ||
onScroll={[Function]} | ||
> | ||
<div | ||
className="curiosity-table-scroll-loader__custom" | ||
> | ||
<Loader | ||
skeletonProps={ | ||
Object { | ||
"size": "sm", | ||
} | ||
} | ||
tableProps={ | ||
Object { | ||
"borders": false, | ||
"colCount": 1, | ||
"colWidth": Array [], | ||
"rowCount": 0, | ||
"variant": "compact", | ||
} | ||
} | ||
variant="table" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`GuestsList Component should handle updating paging state: state 1`] = ` | ||
Object { | ||
"initialState": Object { | ||
"currentPage": 0, | ||
"limit": 100, | ||
"previousData": Array [], | ||
}, | ||
"scrollComplete": Object { | ||
"currentPage": 1, | ||
"limit": 100, | ||
"previousData": Array [ | ||
Object { | ||
"dolor": "sit", | ||
"lorem": "ipsum", | ||
}, | ||
], | ||
}, | ||
"scrollProgress": Object { | ||
"currentPage": 0, | ||
"limit": 100, | ||
"previousData": Array [], | ||
}, | ||
} | ||
`; | ||
|
||
exports[`GuestsList Component should handle variations in data: filtered data 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<div | ||
className="curiosity-table-scroll" | ||
style={ | ||
Object { | ||
"height": "126px", | ||
} | ||
} | ||
> | ||
<div | ||
className="curiosity-table-scroll-list__no-scroll" | ||
onScroll={[Function]} | ||
> | ||
<Table | ||
ariaLabel={null} | ||
borders={false} | ||
className="curiosity-guests-list" | ||
columnHeaders={ | ||
Array [ | ||
Object { | ||
"title": "t(curiosity-inventory.header, {\\"context\\":\\"lorem\\"})", | ||
"transforms": Array [], | ||
}, | ||
] | ||
} | ||
isHeader={true} | ||
rows={ | ||
Array [ | ||
Object { | ||
"cells": Array [ | ||
Object { | ||
"title": "ipsum", | ||
}, | ||
], | ||
}, | ||
Object { | ||
"cells": Array [ | ||
Object { | ||
"title": "amet", | ||
}, | ||
], | ||
}, | ||
] | ||
} | ||
summary={null} | ||
t={[Function]} | ||
variant="compact" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`GuestsList Component should handle variations in data: variable data 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<div | ||
className="curiosity-table-scroll" | ||
style={ | ||
Object { | ||
"height": "126px", | ||
} | ||
} | ||
> | ||
<div | ||
className="curiosity-table-scroll-list__no-scroll" | ||
onScroll={[Function]} | ||
> | ||
<Table | ||
ariaLabel={null} | ||
borders={false} | ||
className="curiosity-guests-list" | ||
columnHeaders={ | ||
Array [ | ||
"t(curiosity-inventory.header, {\\"context\\":\\"lorem\\"})", | ||
"t(curiosity-inventory.header, {\\"context\\":\\"dolor\\"})", | ||
] | ||
} | ||
isHeader={true} | ||
rows={ | ||
Array [ | ||
Object { | ||
"cells": Array [ | ||
"ipsum", | ||
"sit", | ||
], | ||
}, | ||
Object { | ||
"cells": Array [ | ||
"amet", | ||
"amet", | ||
], | ||
}, | ||
] | ||
} | ||
summary={null} | ||
t={[Function]} | ||
variant="compact" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`GuestsList Component should render a non-connected component: non-connected 1`] = ` | ||
<div | ||
className="fadein " | ||
> | ||
<div | ||
className="curiosity-table-scroll" | ||
style={ | ||
Object { | ||
"height": "42px", | ||
} | ||
} | ||
> | ||
<div | ||
className="curiosity-table-scroll-list__no-scroll" | ||
onScroll={[Function]} | ||
/> | ||
</div> | ||
</div> | ||
`; |
Oops, something went wrong.