-
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.
refactor(table): sw-1537 migrate to pf composable table
- Loading branch information
Showing
26 changed files
with
1,940 additions
and
1,317 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
48 changes: 48 additions & 0 deletions
48
src/components/inventoryCard/__tests__/__snapshots__/_inventoryCardHelpers.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,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`_InventoryListHelpers normalizeInventorySettings should return base graph settings: basic filters 1`] = ` | ||
{ | ||
"columnCountAndWidths": { | ||
"count": 2, | ||
"widths": [ | ||
undefined, | ||
undefined, | ||
], | ||
}, | ||
"filters": [ | ||
{ | ||
"cell": [Function], | ||
"header": [Function], | ||
"lorem": "ipsum", | ||
"metric": undefined, | ||
"width": undefined, | ||
}, | ||
{ | ||
"cell": [Function], | ||
"dolor": "sit", | ||
"header": [Function], | ||
"metric": "dolorSit", | ||
"width": undefined, | ||
}, | ||
], | ||
"settings": {}, | ||
} | ||
`; | ||
|
||
exports[`_InventoryListHelpers normalizeInventorySettings should return base graph settings: no filters 1`] = ` | ||
{ | ||
"columnCountAndWidths": { | ||
"count": 0, | ||
"widths": [], | ||
}, | ||
"filters": [], | ||
"settings": {}, | ||
} | ||
`; | ||
|
||
exports[`_InventoryListHelpers should have specific functions: inventoryListHelpers 1`] = ` | ||
{ | ||
"normalizeInventorySettings": [Function], | ||
"parseInventoryResponse": [Function], | ||
} | ||
`; |
18 changes: 18 additions & 0 deletions
18
src/components/inventoryCard/__tests__/_inventoryCardHelpers.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 { inventoryCardHelpers, normalizeInventorySettings } from '../_inventoryCardHelpers'; | ||
|
||
describe('_InventoryListHelpers', () => { | ||
it('should have specific functions', () => { | ||
expect(inventoryCardHelpers).toMatchSnapshot('inventoryListHelpers'); | ||
}); | ||
|
||
it('normalizeInventorySettings should return base graph settings', () => { | ||
expect(normalizeInventorySettings()).toMatchSnapshot('no filters'); | ||
|
||
expect( | ||
normalizeInventorySettings({ | ||
filters: [{ lorem: 'ipsum' }, { metric: 'dolorSit', dolor: 'sit' }], | ||
productId: 'loremIpsumTest' | ||
}) | ||
).toMatchSnapshot('basic filters'); | ||
}); | ||
}); |
Oops, something went wrong.