-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
289 additions
and
47 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
176 changes: 176 additions & 0 deletions
176
components/lib/button/__snapshots__/Button.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,176 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Button when aria-label prop is not exist aria-label prop should be equal to label prop 1`] = ` | ||
<div> | ||
<button | ||
aria-label="test" | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
test | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when badge is null it renders Button without badge 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when badge is true it renders Button with badge 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
<span | ||
class="p-badge" | ||
> | ||
test | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when click the button if loading is false it renders Button without loading icon 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when click the button if loading is true it renders Button with loading icon 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component p-button-icon-only p-disabled p-button-loading" | ||
disabled="" | ||
> | ||
<span | ||
class="p-button-icon p-c p-button-loading-icon pi pi-spinner pi-spin" | ||
/> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when iconPos is bottom Button is vertical 1`] = ` | ||
<div> | ||
<button | ||
aria-label="test" | ||
class="p-button p-component p-button-vertical" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
test | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when label is empty it returns empty button 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when label is true it renders Button with default aria label 1`] = ` | ||
<div> | ||
<button | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when label prop is not exist label prop should be equal to aria-label prop 1`] = ` | ||
<div> | ||
<button | ||
aria-label="test" | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when using badge and label the aria-label should contain both values 1`] = ` | ||
<div> | ||
<button | ||
aria-label="test lost" | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
test | ||
</span> | ||
<span | ||
class="p-badge" | ||
> | ||
lost | ||
</span> | ||
</button> | ||
</div> | ||
`; | ||
|
||
exports[`Button when visible is false Button return null 1`] = `<div />`; | ||
|
||
exports[`Button when visible is true Button render correctly 1`] = ` | ||
<div> | ||
<button | ||
aria-label="test" | ||
class="p-button p-component" | ||
> | ||
<span | ||
class="p-button-label p-c" | ||
> | ||
test | ||
</span> | ||
</button> | ||
</div> | ||
`; |
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
34 changes: 34 additions & 0 deletions
34
components/lib/inputtext/__snapshots__/InputText.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,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`InputText when input is blank it should not have filled state 1`] = ` | ||
<div> | ||
<input | ||
class="p-inputtext p-component" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`InputText when input is disabled it should render as disabled 1`] = ` | ||
<div> | ||
<input | ||
class="p-inputtext p-component p-disabled" | ||
disabled="" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`InputText when input is enabled then input accepts data entry and have filled state 1`] = ` | ||
<div> | ||
<input | ||
class="p-inputtext p-component p-filled" | ||
/> | ||
</div> | ||
`; | ||
|
||
exports[`InputText when input is is set for validation only 1`] = ` | ||
<div> | ||
<input | ||
class="p-inputtext p-component p-filled" | ||
/> | ||
</div> | ||
`; |
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
Oops, something went wrong.