Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-11-06 16:28:43 +08:00
3 changed files with 65 additions and 5 deletions
+27
View File
@@ -145,3 +145,30 @@ test('should move to next option when default option is disabled', () => {
expect(wrapper).toMatchSnapshot();
});
test('should move to first option when all options are disabled', () => {
const wrapper = mount(Picker, {
propsData: {
columns: [
{
text: 'A1',
disabled: true,
children: [
{ text: 'B1', disabled: true },
{ text: 'B2', disabled: true },
],
},
{
text: 'A2',
disabled: true,
children: [
{ text: 'B3', disabled: true },
{ text: 'B4', disabled: true },
],
},
],
},
});
expect(wrapper).toMatchSnapshot();
});