test(Coupon): add test cases (#8231)

This commit is contained in:
nemo-shen
2021-02-27 20:32:48 +08:00
committed by GitHub
parent 4d51c1524a
commit 0cd9052a6f
7 changed files with 666 additions and 342 deletions
@@ -0,0 +1,61 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should render CouponCell correctly 1`] = `
<div class="van-cell van-cell--clickable van-coupon-cell"
role="button"
tabindex="0"
>
<div class="van-cell__title">
<span>
Coupon
</span>
</div>
<div class="van-cell__value van-coupon-cell__value">
<span>
No coupons
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
</i>
</div>
`;
exports[`should render CouponCell correctly with zero discount 1`] = `
<div class="van-cell van-cell--clickable van-coupon-cell"
role="button"
tabindex="0"
>
<div class="van-cell__title">
<span>
Coupon
</span>
</div>
<div class="van-cell__value van-coupon-cell__value van-coupon-cell__value--selected">
<span>
-¥ 0.00
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
</i>
</div>
`;
exports[`should render CouponCell with chosenCoupon correctly 1`] = `
<div class="van-cell van-cell--clickable van-coupon-cell"
role="button"
tabindex="0"
>
<div class="van-cell__title">
<span>
Coupon
</span>
</div>
<div class="van-cell__value van-coupon-cell__value van-coupon-cell__value--selected">
<span>
-¥ 1.50
</span>
</div>
<i class="van-badge__wrapper van-icon van-icon-arrow van-cell__right-icon">
</i>
</div>
`;