-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests for Loading components. (#13291)
- Loading branch information
Showing
8 changed files
with
192 additions
and
2 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
ui_framework/src/components/button/__snapshots__/button.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,15 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`KuiButton is rendered 1`] = ` | ||
<button | ||
aria-label="aria-label" | ||
class="kuiButton testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
> | ||
<span | ||
class="kuiButton__content" | ||
> | ||
<span /> | ||
</span> | ||
</button> | ||
`; |
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
41 changes: 41 additions & 0 deletions
41
ui_framework/src/components/loading/__snapshots__/loading_chart.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,41 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`KuiLoadingChart is rendered 1`] = ` | ||
<div | ||
aria-label="aria-label" | ||
class="kuiLoadingChart testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`KuiLoadingChart mono is rendered 1`] = ` | ||
<div | ||
class="kuiLoadingChart kuiLoadingChart--mono" | ||
> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
<div | ||
class="kuiLoadingChart__bar" | ||
/> | ||
</div> | ||
`; |
24 changes: 24 additions & 0 deletions
24
ui_framework/src/components/loading/__snapshots__/loading_kibana.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,24 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`KuiLoadingKibana is rendered 1`] = ` | ||
<div | ||
aria-label="aria-label" | ||
class="kuiLoadingKibana testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
> | ||
<div | ||
class="kuiLoadingKibana__icon" | ||
> | ||
<svg | ||
class="kuiIcon" | ||
> | ||
<title> | ||
kibana logo icon | ||
</title> | ||
<use | ||
href="#logo" | ||
/> | ||
</svg> | ||
</div> | ||
</div> | ||
`; |
9 changes: 9 additions & 0 deletions
9
ui_framework/src/components/loading/__snapshots__/loading_spinner.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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`KuiLoadingSpinner is rendered 1`] = ` | ||
<div | ||
aria-label="aria-label" | ||
class="kuiLoadingSpinner testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
/> | ||
`; |
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,25 @@ | ||
import React from 'react'; | ||
import { render } from 'enzyme'; | ||
import { requiredProps } from '../../test/required_props'; | ||
|
||
import { KuiLoadingChart } from './loading_chart'; | ||
|
||
describe('KuiLoadingChart', () => { | ||
test('is rendered', () => { | ||
const component = render( | ||
<KuiLoadingChart { ...requiredProps } /> | ||
); | ||
|
||
expect(component) | ||
.toMatchSnapshot(); | ||
}); | ||
|
||
test('mono is rendered', () => { | ||
const component = render( | ||
<KuiLoadingChart mono /> | ||
); | ||
|
||
expect(component) | ||
.toMatchSnapshot(); | ||
}); | ||
}); |
16 changes: 16 additions & 0 deletions
16
ui_framework/src/components/loading/loading_kibana.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,16 @@ | ||
import React from 'react'; | ||
import { render } from 'enzyme'; | ||
import { requiredProps } from '../../test/required_props'; | ||
|
||
import { KuiLoadingKibana } from './loading_kibana'; | ||
|
||
describe('KuiLoadingKibana', () => { | ||
test('is rendered', () => { | ||
const component = render( | ||
<KuiLoadingKibana { ...requiredProps } /> | ||
); | ||
|
||
expect(component) | ||
.toMatchSnapshot(); | ||
}); | ||
}); |
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