feat(Field): add autocomplate prop #7877

This commit is contained in:
chenjiahan
2021-01-10 13:28:38 +08:00
parent 1eb9a80436
commit 4c4d303363
4 changed files with 15 additions and 0 deletions
+11
View File
@@ -419,3 +419,14 @@ test('should format value after mounted if initial modelValue is null', () => {
expect(wrapper.find('input').element.value).toEqual('');
expect(wrapper.emitted('update:modelValue')[0][0]).toEqual('');
});
test('should allow to set autocomplete attribute', () => {
const wrapper = mount(Field, {
props: {
autocomplete: 'on',
},
});
expect(wrapper.find('input').element.getAttribute('autocomplete')).toEqual(
'on'
);
});