forked from youzan/vant
-
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(DatePicker): migrate legacy test cases (youzan#11123)
- Loading branch information
1 parent
baa9c33
commit 9c6b416
Showing
4 changed files
with
298 additions
and
287 deletions.
There are no files selected for viewing
219 changes: 219 additions & 0 deletions
219
packages/vant/src/date-picker/test/__snapshots__/index.spec.ts.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,219 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should filter options when using filter prop 1`] = ` | ||
<div class="van-picker"> | ||
<div class="van-picker__toolbar"> | ||
<button type="button" | ||
class="van-picker__cancel van-haptics-feedback" | ||
> | ||
Cancel | ||
</button> | ||
<button type="button" | ||
class="van-picker__confirm van-haptics-feedback" | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
<div class="van-picker__columns" | ||
style="height: 264px;" | ||
> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
2000 | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
2010 | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
10 | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
10 | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
20 | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
30 | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker__mask" | ||
style="background-size: 100% 110px;" | ||
> | ||
</div> | ||
<div class="van-hairline-unset--top-bottom van-picker__frame" | ||
style="height: 44px;" | ||
> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`should format options correctly when using formatter prop 1`] = ` | ||
<div class="van-picker"> | ||
<div class="van-picker__toolbar"> | ||
<button type="button" | ||
class="van-picker__cancel van-haptics-feedback" | ||
> | ||
Cancel | ||
</button> | ||
<button type="button" | ||
class="van-picker__confirm van-haptics-feedback" | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
<div class="van-picker__columns" | ||
style="height: 264px;" | ||
> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
2000 year | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
2010 year | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
10 month | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker-column"> | ||
<ul style="transform: translate3d(0, 110px, 0); transition-duration: 0ms; transition-property: none;" | ||
class="van-picker-column__wrapper" | ||
> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item van-picker-column__item--selected" | ||
> | ||
<div class="van-ellipsis"> | ||
10 day | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
20 day | ||
</div> | ||
</li> | ||
<li role="button" | ||
style="height: 44px;" | ||
tabindex="0" | ||
class="van-picker-column__item" | ||
> | ||
<div class="van-ellipsis"> | ||
30 day | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="van-picker__mask" | ||
style="background-size: 100% 110px;" | ||
> | ||
</div> | ||
<div class="van-hairline-unset--top-bottom van-picker__frame" | ||
style="height: 44px;" | ||
> | ||
</div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`should render title slot correctly 1`] = ` | ||
<div class="van-picker__toolbar"> | ||
<button type="button" | ||
class="van-picker__cancel van-haptics-feedback" | ||
> | ||
Cancel | ||
</button> | ||
Custom title | ||
<button type="button" | ||
class="van-picker__confirm van-haptics-feedback" | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
`; |
171 changes: 0 additions & 171 deletions
171
packages/vant/src/date-picker/test/date-picker.legacy.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.