mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
PayOrder: improve test coverage
This commit is contained in:
parent
0eed2d35d8
commit
ccc4fc3861
@ -2,7 +2,7 @@
|
||||
<div class="van-pay-order">
|
||||
<div class="van-pay-order__tip" v-show="tip">{{ tip }}</div>
|
||||
<div class="van-pay-order__bar">
|
||||
<div class="van-pay-order__price">
|
||||
<div class="van-pay-order__price" v-if="typeof price === 'number'">
|
||||
<span class="van-pay-order__price-text">合计:</span>
|
||||
<span class="van-pay-order__price-interger">¥{{ priceInterger }}.</span>
|
||||
<span class="van-pay-order__price-decimal">{{ priceDecimal }}</span>
|
||||
@ -26,19 +26,13 @@ export default {
|
||||
|
||||
props: {
|
||||
tip: String,
|
||||
disabled: Boolean,
|
||||
type: Number,
|
||||
loading: Boolean,
|
||||
buttonText: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
disabled: Boolean,
|
||||
buttonText: String,
|
||||
buttonType: {
|
||||
type: String,
|
||||
default: 'danger'
|
||||
},
|
||||
price: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -33,7 +33,8 @@ describe('PayOrder', () => {
|
||||
wrapper = mount(PayOrder, {
|
||||
propsData: {
|
||||
price: 3005,
|
||||
buttonText: '提交订单'
|
||||
buttonText: '提交订单',
|
||||
buttonType: 'normal'
|
||||
}
|
||||
});
|
||||
|
||||
@ -66,7 +67,6 @@ describe('PayOrder', () => {
|
||||
it('can not submit when disabled', () => {
|
||||
wrapper = mount(PayOrder, {
|
||||
propsData: {
|
||||
price: 3005,
|
||||
disabled: true,
|
||||
buttonText: '提交订单'
|
||||
}
|
||||
@ -83,7 +83,6 @@ describe('PayOrder', () => {
|
||||
it('can not submit when loading', () => {
|
||||
wrapper = mount(PayOrder, {
|
||||
propsData: {
|
||||
price: 3005,
|
||||
loading: true,
|
||||
buttonText: '提交订单'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user