test(ImagePreview): update test cases

This commit is contained in:
chenjiahan
2020-11-14 14:45:09 +08:00
parent a1aed76a48
commit 9bd38cf446
4 changed files with 80 additions and 59 deletions
@@ -1,5 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should change close icon position when using close-icon-position prop 1`] = `
<i class="van-badge__wrapper van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-left" role="button">
<!---->
<!---->
<!----></i>
`;
exports[`should change close icon when using close-icon prop 1`] = `
<i class="van-badge__wrapper van-icon van-icon-success van-image-preview__close-icon van-image-preview__close-icon--top-right" role="button">
<!---->
<!---->
<!----></i>
`;
exports[`should render cover slot correctly 1`] = `
<transition-stub class="van-image-preview__overlay">
<div class="van-overlay">
@@ -20,6 +34,6 @@ exports[`should render cover slot correctly 1`] = `
</transition-stub>
`;
exports[`should render index slot correctly 1`] = `<div class="van-image-preview__index">Custom Index</div>`;
exports[`should render index slot correctly 1`] = `<div class="van-image-preview__index">Custom Index: 0</div>`;
exports[`should swipe to currect index after calling the swipeTo method 1`] = `<div class="van-image-preview__index">3 / 3</div>`;