This repository has been archived by the owner on May 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testing env and Tabs, PageHeader, EmptyState and Table tests (#867)
- Loading branch information
1 parent
4417d2a
commit 5e52ff7
Showing
60 changed files
with
1,353 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const babelOptions = { presets: ['env'] } | ||
|
||
module.exports = require('babel-jest').createTransformer(require('../core/babel-preset')) | ||
module.exports = require('babel-jest').createTransformer(require('../../core/babel-preset')) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Enzyme from 'enzyme' | ||
import Adapter from 'enzyme-adapter-react-16' | ||
|
||
Enzyme.configure({ adapter: new Adapter() }) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
155 changes: 155 additions & 0 deletions
155
internal/test/unit/__snapshots__/empty-state.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,155 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Empty State renders properly 1`] = ` | ||
<styled.div | ||
data-cosmos-key="empty-state" | ||
> | ||
<Styled(Heading) | ||
size={1} | ||
> | ||
Some title | ||
</Styled(Heading)> | ||
<styled.div> | ||
<Icon | ||
color="blue" | ||
name="copy" | ||
size={110} | ||
/> | ||
<Text | ||
action={ | ||
Object { | ||
"handler": [Function], | ||
"icon": "copy", | ||
"label": "Something", | ||
} | ||
} | ||
helpUrl="/some-place" | ||
icon="copy" | ||
text="Some description" | ||
title="Some title" | ||
useParagraph={true} | ||
/> | ||
<styled.div> | ||
<Link | ||
href="/some-place" | ||
target="_blank" | ||
> | ||
Learn More | ||
<i> | ||
</i> | ||
</Link> | ||
</styled.div> | ||
</styled.div> | ||
<Button | ||
appearance="cta" | ||
disabled={false} | ||
icon="copy" | ||
loading={false} | ||
onClick={[Function]} | ||
size="large" | ||
success={false} | ||
> | ||
Something | ||
</Button> | ||
</styled.div> | ||
`; | ||
|
||
exports[`Empty State renders properly without help link 1`] = ` | ||
<styled.div | ||
data-cosmos-key="empty-state" | ||
> | ||
<Styled(Heading) | ||
size={1} | ||
> | ||
Some title | ||
</Styled(Heading)> | ||
<styled.div> | ||
<Icon | ||
color="blue" | ||
name="copy" | ||
size={110} | ||
/> | ||
<Text | ||
action={ | ||
Object { | ||
"handler": [Function], | ||
"icon": "copy", | ||
"label": "Something", | ||
} | ||
} | ||
helpUrl={null} | ||
icon="copy" | ||
text="Some description" | ||
title="Some title" | ||
useParagraph={true} | ||
/> | ||
</styled.div> | ||
<Button | ||
appearance="cta" | ||
disabled={false} | ||
icon="copy" | ||
loading={false} | ||
onClick={[Function]} | ||
size="large" | ||
success={false} | ||
> | ||
Something | ||
</Button> | ||
</styled.div> | ||
`; | ||
|
||
exports[`Empty State renders properly without text 1`] = ` | ||
<styled.div | ||
data-cosmos-key="empty-state" | ||
> | ||
<Styled(Heading) | ||
size={1} | ||
> | ||
Some title | ||
</Styled(Heading)> | ||
<styled.div> | ||
<Icon | ||
color="blue" | ||
name="copy" | ||
size={110} | ||
/> | ||
<Text | ||
action={ | ||
Object { | ||
"handler": [Function], | ||
"icon": "copy", | ||
"label": "Something", | ||
} | ||
} | ||
helpUrl="/some-place" | ||
icon="copy" | ||
text={null} | ||
title="Some title" | ||
useParagraph={true} | ||
/> | ||
<styled.div> | ||
<Link | ||
href="/some-place" | ||
target="_blank" | ||
> | ||
Learn More | ||
<i> | ||
</i> | ||
</Link> | ||
</styled.div> | ||
</styled.div> | ||
<Button | ||
appearance="cta" | ||
disabled={false} | ||
icon="copy" | ||
loading={false} | ||
onClick={[Function]} | ||
size="large" | ||
success={false} | ||
> | ||
Something | ||
</Button> | ||
</styled.div> | ||
`; |
Oops, something went wrong.