forked from didi/mand-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ruler): add ruler jest test (didi#395)
* fix(ActivityIndicator): fix wrong roller-success background-color * feat(ruler): add new component Ruler * feat(ruler): update for ruler * feat(ruler): finish ruler * code-style(activity-indicator): change color * feat(ruler): remove mouse event and add throttle * test(jest): add jest-canvas-mock
- Loading branch information
1 parent
5687d4f
commit 86cd506
Showing
9 changed files
with
388 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Radio Basic 1`] = ` | ||
<div class="md-example-child md-example-child-single-component"> | ||
<p>当前值:1000</p> | ||
<div class="container"> | ||
<div class="md-ruler"><canvas class="md-ruler-canvas"></canvas> | ||
<div class="md-ruler-cursor"></div> | ||
<div class="md-ruler-arrow"></div> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Radio List 1`] = ` | ||
<div class="md-example-child md-example-child-single-component"> | ||
<p>当前值:1300</p> | ||
<div class="container"> | ||
<div class="md-ruler"><canvas class="md-ruler-canvas"></canvas> | ||
<div class="md-ruler-cursor"></div> | ||
<div class="md-ruler-arrow"></div> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`Radio With Field 1`] = ` | ||
<div class="md-example-child md-example-child-single-component"> | ||
<p>当前值:1305</p> | ||
<div class="container"> | ||
<div class="md-ruler"><canvas class="md-ruler-canvas"></canvas> | ||
<div class="md-ruler-cursor"></div> | ||
<div class="md-ruler-arrow"></div> | ||
</div> | ||
</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
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,16 @@ | ||
import Demo0 from './cases/demo0' | ||
import Demo1 from './cases/demo1' | ||
import Demo2 from './cases/demo2' | ||
import {renderToString} from '@vue/server-test-utils' | ||
|
||
describe('Radio', () => { | ||
test(`Basic`, () => { | ||
expect(renderToString(Demo0)).toMatchSnapshot() | ||
}) | ||
test(`With Field`, () => { | ||
expect(renderToString(Demo1)).toMatchSnapshot() | ||
}) | ||
test(`List`, () => { | ||
expect(renderToString(Demo2)).toMatchSnapshot() | ||
}) | ||
}) |
Oops, something went wrong.