Merge branch 'dev' into next

This commit is contained in:
chenjiahan
2020-09-18 22:01:02 +08:00
12 changed files with 75 additions and 63 deletions
@@ -54,6 +54,15 @@ exports[`render coupon cell with coupon 1`] = `
</div>
`;
exports[`render coupon cell with zero discount 1`] = `
<div role="button" tabindex="0" class="van-cell van-cell--clickable van-coupon-cell">
<div class="van-cell__title"><span>优惠券</span></div>
<div class="van-cell__value van-coupon-cell__value van-coupon-cell__value--selected"><span>-¥ 0.00</span></div><i class="van-icon van-icon-arrow van-cell__right-icon">
<!----></i>
</div>
`;
exports[`render coupon list 1`] = `
<div class="van-coupon-list">
<div class="van-coupon-list__exchange-bar">
+16
View File
@@ -26,6 +26,12 @@ const coupon3 = {
denominations: 123,
};
const coupon4 = {
...coupon,
startAt: 1600327871,
endAt: 1700327871,
};
const emptyCoupon = {
id: 0,
discount: 0,
@@ -162,3 +168,13 @@ test('render coupon cell with coupon', () => {
});
expect(wrapper).toMatchSnapshot();
});
test('render coupon cell with zero discount', () => {
const wrapper = mount(CouponCell, {
propsData: {
coupons: [{ ...coupon4, value: 0, denominations: 150 }],
chosenCoupon: 0,
},
});
expect(wrapper).toMatchSnapshot();
});