-
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
* inventoryReducer, hostsGuests rename, test snapshot * inventoryListSelectors, initial selector, memoize/cache * guestListSelectors, initial selector, memoize/cache * reduxHelpers, annotation * rhsmActions, hostsGuests test * rhsmServices, mock data, delay, annotations
- Loading branch information
Showing
12 changed files
with
1,083 additions
and
13 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
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
152 changes: 152 additions & 0 deletions
152
src/redux/selectors/__tests__/__snapshots__/guestListSelectors.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,152 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`GuestsListSelectors should handle pending state on a product ID: pending 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": false, | ||
"listData": Array [], | ||
"pending": true, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should map a fulfilled product ID response to an aggregated output: fulfilled 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": "db.lorem.com", | ||
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3", | ||
"lastSeen": "17 days ago", | ||
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d", | ||
}, | ||
Object { | ||
"displayName": "db.ipsum.com", | ||
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852", | ||
"lastSeen": "in a month", | ||
"subscriptionManagerId": "b101a72f-1859-4489-acb8-d6d31c2578c4", | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should pass minimal data on a product ID without a product ID provided: no product id error 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": false, | ||
"listData": Array [], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should pass minimal data on missing a reducer response: missing reducer error 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": false, | ||
"listData": Array [], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should populate data from the in memory cache: cached data: ERROR, query mismatch 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": "db.ipsum.com", | ||
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852", | ||
"lastSeen": "in a month", | ||
"subscriptionManagerId": "b101a72f-1859-4489-acb8-d6d31c2578c4", | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should populate data from the in memory cache: cached data: cache used and pending 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": "db.lorem.com", | ||
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3", | ||
"lastSeen": "17 days ago", | ||
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d", | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should populate data from the in memory cache: cached data: initial fulfilled 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": "db.lorem.com", | ||
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3", | ||
"lastSeen": "17 days ago", | ||
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d", | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should populate data from the in memory cache: cached data: updated and fulfilled 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": "db.ipsum.com", | ||
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852", | ||
"lastSeen": "in a month", | ||
"subscriptionManagerId": "b101a72f-1859-4489-acb8-d6d31c2578c4", | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should populate data on a product ID when the api response is missing expected properties: data populated, missing properties 1`] = ` | ||
Object { | ||
"error": false, | ||
"fulfilled": true, | ||
"listData": Array [ | ||
Object { | ||
"displayName": null, | ||
"insightsId": "d6214a0b-b344-4778-831c-d53dcacb2da3", | ||
"lastSeen": "in a year", | ||
"subscriptionManagerId": "adafd9d5-5b00-42fa-a6c9-75801d45cc6d", | ||
}, | ||
Object { | ||
"displayName": "db.example.com", | ||
"insightsId": "9358e312-1c9f-42f4-8910-dcef6e970852", | ||
"lastSeen": "in a month", | ||
"subscriptionManagerId": null, | ||
}, | ||
], | ||
"pending": false, | ||
"status": undefined, | ||
} | ||
`; | ||
|
||
exports[`GuestsListSelectors should return specific selectors: selectors 1`] = ` | ||
Object { | ||
"guestsList": [Function], | ||
"makeGuestsList": [Function], | ||
} | ||
`; |
Oops, something went wrong.