Merge branch 'dev' into next
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user