test: update legacy test cases

This commit is contained in:
chenjiahan
2020-12-31 16:06:49 +08:00
parent 559710f945
commit b03341792e
15 changed files with 88 additions and 88 deletions

View File

@@ -25,16 +25,16 @@ test('radio-group change', () => {
const icons = wrapper.findAll('.van-radio__icon');
const labels = wrapper.findAll('.van-radio__label');
icons.at(2).trigger('click');
icons[2].trigger('click');
expect(wrapper.vm.result).toEqual('c');
expect(wrapper.emitted('change')[0][0]).toEqual('c');
labels.at(1).trigger('click');
labels[1].trigger('click');
expect(wrapper.vm.result).toEqual('b');
expect(wrapper.emitted('change')[1][0]).toEqual('b');
icons.at(3).trigger('click');
labels.at(3).trigger('click');
icons[3].trigger('click');
labels[3].trigger('click');
expect(wrapper.vm.result).toEqual('b');
});
@@ -60,7 +60,7 @@ test('radio group disabled', () => {
});
const icons = wrapper.findAll('.van-radio__icon');
icons.at(2).trigger('click');
icons[2].trigger('click');
expect(wrapper.emitted('change')).toBeFalsy();
});