[bugfix] CouponList: incorrectly render when disabled list empty (#2845)
This commit is contained in:
@@ -75,6 +75,7 @@ test('render disabled coupon', () => {
|
||||
disabled: true
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -90,6 +91,17 @@ test('render coupon list', async () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('render empty coupon list', () => {
|
||||
const wrapper = mount(CouponList, {
|
||||
propsData: {
|
||||
coupons: [],
|
||||
disabledCoupons: []
|
||||
}
|
||||
});
|
||||
wrapper.findAll('.van-tab').at(1).trigger('click');
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('exchange coupon', () => {
|
||||
const wrapper = mount(CouponList);
|
||||
const exchange = wrapper.find('.van-coupon-list__exchange');
|
||||
|
||||
Reference in New Issue
Block a user