-
-
Notifications
You must be signed in to change notification settings - Fork 48.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix invalid progress like <Progress precent={120} />
- Loading branch information
Showing
3 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
components/progress/__tests__/__snapshots__/index.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,85 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Progress render negetive progress 1`] = ` | ||
<div | ||
class="ant-progress ant-progress-line ant-progress-status-normal ant-progress-show-info ant-progress-default" | ||
> | ||
<div> | ||
<div | ||
class="ant-progress-outer" | ||
> | ||
<div | ||
class="ant-progress-inner" | ||
> | ||
<div | ||
class="ant-progress-bg" | ||
style="width: 0%; height: 8px;" | ||
/> | ||
</div> | ||
</div> | ||
<span | ||
class="ant-progress-text" | ||
> | ||
-20% | ||
</span> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Progress render negetive successPercent 1`] = ` | ||
<div | ||
class="ant-progress ant-progress-line ant-progress-status-normal ant-progress-show-info ant-progress-default" | ||
> | ||
<div> | ||
<div | ||
class="ant-progress-outer" | ||
> | ||
<div | ||
class="ant-progress-inner" | ||
> | ||
<div | ||
class="ant-progress-bg" | ||
style="width: 50%; height: 8px;" | ||
/> | ||
<div | ||
class="ant-progress-success-bg" | ||
style="width: 0%; height: 8px;" | ||
/> | ||
</div> | ||
</div> | ||
<span | ||
class="ant-progress-text" | ||
> | ||
50% | ||
</span> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Progress render out-of-range progress 1`] = ` | ||
<div | ||
class="ant-progress ant-progress-line ant-progress-status-success ant-progress-show-info ant-progress-default" | ||
> | ||
<div> | ||
<div | ||
class="ant-progress-outer" | ||
> | ||
<div | ||
class="ant-progress-inner" | ||
> | ||
<div | ||
class="ant-progress-bg" | ||
style="width: 100%; height: 8px;" | ||
/> | ||
</div> | ||
</div> | ||
<span | ||
class="ant-progress-text" | ||
> | ||
<i | ||
class="anticon anticon-check-circle" | ||
/> | ||
</span> | ||
</div> | ||
</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
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