-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change * add jest tests generator * revert readme
- Loading branch information
Showing
44 changed files
with
1,543 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ lerna-debug.log | |
*.sublime-workspace | ||
.history | ||
.vscode | ||
.yo-rc.json | ||
|
||
# IDE - VSCode | ||
.vscode | ||
|
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
24 changes: 24 additions & 0 deletions
24
...tternfly-4/react-core/src/components/DataToolbar/__tests__/Generated/DataToolbar.test.tsx
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,24 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbar } from '../../DataToolbar'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbar should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbar | ||
clearAllFilters={() => undefined as void} | ||
clearFiltersButtonText={'string'} | ||
collapseListedFiltersBreakpoint={'md'} | ||
isExpanded={true} | ||
toggleIsExpanded={() => undefined as void} | ||
className={'string'} | ||
children={<div>ReactNode</div>} | ||
id={'string'} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
24 changes: 24 additions & 0 deletions
24
...-core/src/components/DataToolbar/__tests__/Generated/DataToolbarChipGroupContent.test.tsx
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,24 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarChipGroupContent } from '../../DataToolbarChipGroupContent'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarChipGroupContent should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarChipGroupContent | ||
className={'string'} | ||
isExpanded={true} | ||
chipGroupContentRef={{ current: document.createElement('div') }} | ||
clearAllFilters={() => undefined as void} | ||
showClearFiltersButton={true} | ||
clearFiltersButtonText={"'Clear all filters'"} | ||
numberOfFilters={42} | ||
collapseListedFiltersBreakpoint={'lg'} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
24 changes: 24 additions & 0 deletions
24
...y-4/react-core/src/components/DataToolbar/__tests__/Generated/DataToolbarContent.test.tsx
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,24 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarContent } from '../../DataToolbarContent'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarContent should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarContent | ||
className={'string'} | ||
breakpointMods={[]} | ||
children={<div>ReactNode</div>} | ||
isExpanded={false} | ||
clearAllFilters={() => undefined as void} | ||
showClearFiltersButton={false} | ||
clearFiltersButtonText={'string'} | ||
toolbarId={'string'} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
23 changes: 23 additions & 0 deletions
23
...core/src/components/DataToolbar/__tests__/Generated/DataToolbarExpandableContent.test.tsx
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,23 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarExpandableContent } from '../../DataToolbarExpandableContent'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarExpandableContent should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarExpandableContent | ||
className={'string'} | ||
isExpanded={false} | ||
expandableContentRef={{ current: document.createElement('div') }} | ||
chipContainerRef={{ current: document.createElement('div') }} | ||
clearAllFilters={() => undefined as void} | ||
clearFiltersButtonText={"'Clear all filters'"} | ||
showClearFiltersButton={true} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
28 changes: 28 additions & 0 deletions
28
...ly-4/react-core/src/components/DataToolbar/__tests__/Generated/DataToolbarFilter.test.tsx
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,28 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarFilter } from '../../DataToolbarFilter'; | ||
// any missing imports can usually be resolved by adding them here | ||
import { DataToolbarChip } from '../..'; | ||
import { DataToolbarContext } from '../../DataToolbarUtils'; | ||
|
||
it('DataToolbarFilter should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarContext.Provider | ||
value={{ | ||
updateNumberFilters: () => {} | ||
}} | ||
> | ||
<DataToolbarFilter | ||
chips={[]} | ||
deleteChip={(category: string, chip: DataToolbarChip | string) => undefined as void} | ||
children={<div>ReactNode</div>} | ||
categoryName={'string'} | ||
showToolbarItem={true} | ||
/> | ||
</DataToolbarContext.Provider> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
21 changes: 21 additions & 0 deletions
21
...fly-4/react-core/src/components/DataToolbar/__tests__/Generated/DataToolbarGroup.test.tsx
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,21 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarGroup } from '../../DataToolbarGroup'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarGroup should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarGroup | ||
className={'string'} | ||
variant={'filter-group'} | ||
breakpointMods={[]} | ||
children={<div>ReactNode</div>} | ||
innerRef={{ current: document.createElement('div') }} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
21 changes: 21 additions & 0 deletions
21
...nfly-4/react-core/src/components/DataToolbar/__tests__/Generated/DataToolbarItem.test.tsx
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,21 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarItem } from '../../DataToolbarItem'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarItem should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarItem | ||
className={'string'} | ||
variant={'separator'} | ||
breakpointMods={[]} | ||
id={'string'} | ||
children={<div>ReactNode</div>} | ||
/> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
15 changes: 15 additions & 0 deletions
15
...react-core/src/components/DataToolbar/__tests__/Generated/DataToolbarToggleGroup.test.tsx
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,15 @@ | ||
/** | ||
* This test was generated | ||
*/ | ||
import * as React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import { DataToolbarToggleGroup } from '../../DataToolbarToggleGroup'; | ||
// any missing imports can usually be resolved by adding them here | ||
import {} from '../..'; | ||
|
||
it('DataToolbarToggleGroup should match snapshot (auto-generated)', () => { | ||
const view = shallow( | ||
<DataToolbarToggleGroup toggleIcon={<div>ReactNode</div>} breakpoint={'md'} breakpointMods={[]} /> | ||
); | ||
expect(view).toMatchSnapshot(); | ||
}); |
46 changes: 46 additions & 0 deletions
46
...re/src/components/DataToolbar/__tests__/Generated/__snapshots__/DataToolbar.test.tsx.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,46 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbar should match snapshot (auto-generated) 1`] = ` | ||
<div | ||
className="pf-c-data-toolbar string" | ||
id="string" | ||
> | ||
<ContextProvider | ||
value={ | ||
Object { | ||
"chipGroupContentRef": Object { | ||
"current": null, | ||
}, | ||
"isExpanded": true, | ||
"numberOfFilters": 0, | ||
"toggleIsExpanded": [Function], | ||
"updateNumberFilters": [Function], | ||
} | ||
} | ||
> | ||
<div | ||
clearAllFilters={[Function]} | ||
clearFiltersButtonText="string" | ||
isExpanded={true} | ||
key=".0" | ||
showClearFiltersButton={false} | ||
toolbarId="string" | ||
> | ||
ReactNode | ||
</div> | ||
<DataToolbarChipGroupContent | ||
chipGroupContentRef={ | ||
Object { | ||
"current": null, | ||
} | ||
} | ||
clearAllFilters={[Function]} | ||
clearFiltersButtonText="string" | ||
collapseListedFiltersBreakpoint="md" | ||
isExpanded={true} | ||
numberOfFilters={0} | ||
showClearFiltersButton={false} | ||
/> | ||
</ContextProvider> | ||
</div> | ||
`; |
12 changes: 12 additions & 0 deletions
12
...s/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarChipGroupContent.test.tsx.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,12 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarChipGroupContent should match snapshot (auto-generated) 1`] = ` | ||
<div | ||
className="pf-c-data-toolbar__content pf-m-hidden string" | ||
hidden={true} | ||
> | ||
<ForwardRef | ||
className="" | ||
/> | ||
</div> | ||
`; |
46 changes: 46 additions & 0 deletions
46
...components/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarContent.test.tsx.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,46 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarContent should match snapshot (auto-generated) 1`] = ` | ||
<div | ||
className="pf-c-data-toolbar__content string" | ||
> | ||
<ContextProvider | ||
value={ | ||
Object { | ||
"chipContainerRef": Object { | ||
"current": null, | ||
}, | ||
"expandableContentId": "string-expandable-content-0", | ||
"expandableContentRef": Object { | ||
"current": null, | ||
}, | ||
} | ||
} | ||
> | ||
<div | ||
className="pf-c-data-toolbar__content-section" | ||
> | ||
<div> | ||
ReactNode | ||
</div> | ||
</div> | ||
<DataToolbarExpandableContent | ||
chipContainerRef={ | ||
Object { | ||
"current": null, | ||
} | ||
} | ||
clearAllFilters={[Function]} | ||
clearFiltersButtonText="string" | ||
expandableContentRef={ | ||
Object { | ||
"current": null, | ||
} | ||
} | ||
id="string-expandable-content-0" | ||
isExpanded={false} | ||
showClearFiltersButton={false} | ||
/> | ||
</ContextProvider> | ||
</div> | ||
`; |
9 changes: 9 additions & 0 deletions
9
.../DataToolbar/__tests__/Generated/__snapshots__/DataToolbarExpandableContent.test.tsx.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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarExpandableContent should match snapshot (auto-generated) 1`] = ` | ||
<div | ||
className="pf-c-data-toolbar__expandable-content string" | ||
> | ||
<ForwardRef /> | ||
</div> | ||
`; |
14 changes: 14 additions & 0 deletions
14
.../components/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarFilter.test.tsx.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,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarFilter should match snapshot (auto-generated) 1`] = ` | ||
<DataToolbarFilter | ||
categoryName="string" | ||
chips={Array []} | ||
deleteChip={[Function]} | ||
showToolbarItem={true} | ||
> | ||
<div> | ||
ReactNode | ||
</div> | ||
</DataToolbarFilter> | ||
`; |
14 changes: 14 additions & 0 deletions
14
...c/components/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarGroup.test.tsx.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,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarGroup should match snapshot (auto-generated) 1`] = ` | ||
<DataToolbarGroupWithRef | ||
breakpointMods={Array []} | ||
className="string" | ||
innerRef={null} | ||
variant="filter-group" | ||
> | ||
<div> | ||
ReactNode | ||
</div> | ||
</DataToolbarGroupWithRef> | ||
`; |
12 changes: 12 additions & 0 deletions
12
...rc/components/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarItem.test.tsx.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,12 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarItem should match snapshot (auto-generated) 1`] = ` | ||
<div | ||
className="pf-c-data-toolbar__item pf-m-separator string" | ||
id="string" | ||
> | ||
<div> | ||
ReactNode | ||
</div> | ||
</div> | ||
`; |
7 changes: 7 additions & 0 deletions
7
...onents/DataToolbar/__tests__/Generated/__snapshots__/DataToolbarToggleGroup.test.tsx.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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DataToolbarToggleGroup should match snapshot (auto-generated) 1`] = ` | ||
<ContextConsumer> | ||
<Component /> | ||
</ContextConsumer> | ||
`; |
Oops, something went wrong.