test(ImagePreview): update test cases

This commit is contained in:
chenjiahan
2020-11-14 08:38:44 +08:00
parent e06ba480a9
commit cfb16668ca
4 changed files with 92 additions and 75 deletions
@@ -0,0 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render cover slot correctly 1`] = `
<transition-stub class="van-image-preview__overlay">
<div class="van-overlay">
<!---->
</div>
</transition-stub>
<transition-stub>
<div class="van-popup van-popup--center van-image-preview">
<!---->
<div class="van-swipe van-image-preview__swipe">
<div style="width: 0px; transition-duration: 500ms; transform: translateX(0px);" class="van-swipe__track"></div>
<!---->
</div>
<div class="van-image-preview__index">1 / 0</div>
<div class="van-image-preview__cover">Custom Cover</div>
<!---->
</div>
</transition-stub>
`;
exports[`should render index slot correctly 1`] = `<div class="van-image-preview__index">Custom Index</div>`;
exports[`should swipe to currect index after calling the swipeTo method 1`] = `<div class="van-image-preview__index">3 / 3</div>`;