-
Notifications
You must be signed in to change notification settings - Fork 948
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
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import '@testing-library/jest-dom'; | ||
import { Skeleton } from './Skeleton'; | ||
|
||
import { snapshot } from '../../test'; | ||
|
||
describe('Skeleton', () => { | ||
snapshot(<Skeleton />, 'default'); | ||
snapshot(<Skeleton shape="circle" />, 'shape circle'); | ||
snapshot(<Skeleton shape="rectangle" />, 'shape rectangle'); | ||
snapshot(<Skeleton animation="none" />, 'animation none'); | ||
snapshot(<Skeleton animation="wave" />, 'animation wave'); | ||
snapshot(<Skeleton borderRadius="16px" />, 'border radius'); | ||
snapshot(<Skeleton borderRadius="16px" />, 'border radius'); | ||
snapshot(<Skeleton width="100%" height="2rem" />, 'size width and height'); | ||
snapshot(<Skeleton size="50px" />, 'size in pixels'); | ||
}); |
82 changes: 82 additions & 0 deletions
82
components/lib/skeleton/__snapshots__/Skeleton.spec.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,82 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Skeleton animation none 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component p-skeleton-none" | ||
style="width: 100%; height: 1rem;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton animation wave 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 1rem;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton border radius 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 1rem; border-radius: 16px;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton border radius 2`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 1rem; border-radius: 16px;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton default 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 1rem;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton shape circle 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component p-skeleton-circle" | ||
style="width: 100%; height: 1rem;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton shape rectangle 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 1rem;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton size in pixels 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 50px; height: 50px;" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`Skeleton size width and height 1`] = ` | ||
<div> | ||
<div | ||
class="p-skeleton p-component" | ||
style="width: 100%; height: 2rem;" | ||
/> | ||
</div> | ||
`; |