mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test(ContactList): add default-tag-text test
This commit is contained in:
parent
2aea635652
commit
44c97003ec
@ -13,6 +13,11 @@ exports[`should render ContactList correctly 1`] = `
|
|||||||
</i>
|
</i>
|
||||||
<div class="van-cell__value van-cell__value--alone van-contact-list__item-value">
|
<div class="van-cell__value van-cell__value--alone van-contact-list__item-value">
|
||||||
jack,12345678
|
jack,12345678
|
||||||
|
<transition-stub class="van-contact-list__item-tag">
|
||||||
|
<span class="van-tag van-tag--round van-tag--danger">
|
||||||
|
默认
|
||||||
|
</span>
|
||||||
|
</transition-stub>
|
||||||
</div>
|
</div>
|
||||||
<div role="radio"
|
<div role="radio"
|
||||||
class="van-radio van-contact-list__radio"
|
class="van-radio van-contact-list__radio"
|
||||||
|
@ -4,12 +4,14 @@ import { mount } from '../../../test';
|
|||||||
const contactInfo = {
|
const contactInfo = {
|
||||||
name: 'jack',
|
name: 'jack',
|
||||||
tel: '12345678',
|
tel: '12345678',
|
||||||
|
isDefault: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
test('should render ContactList correctly', () => {
|
test('should render ContactList correctly', () => {
|
||||||
const wrapper = mount(ContactList, {
|
const wrapper = mount(ContactList, {
|
||||||
props: {
|
props: {
|
||||||
list: [contactInfo],
|
list: [contactInfo],
|
||||||
|
defaultTagText: '默认',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
expect(wrapper.html()).toMatchSnapshot();
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user