mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
[bugfix] AddressList: should hide radio when unswitchable (#2886)
This commit is contained in:
28
packages/address-list/test/index.spec.js
Normal file
28
packages/address-list/test/index.spec.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { mount } from '../../../test/utils';
|
||||
import AddressList from '..';
|
||||
|
||||
const list = [
|
||||
{
|
||||
id: '1',
|
||||
name: '张三',
|
||||
tel: '13000000000',
|
||||
address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '李四',
|
||||
tel: '1310000000',
|
||||
address: '浙江省杭州市拱墅区莫干山路 50 号'
|
||||
}
|
||||
];
|
||||
|
||||
test('unswitchable', () => {
|
||||
const wrapper = mount(AddressList, {
|
||||
propsData: {
|
||||
list,
|
||||
switchable: false
|
||||
}
|
||||
});
|
||||
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
Reference in New Issue
Block a user