[Improvement] optimize find parent mixin (#781)
This commit is contained in:
@@ -14,7 +14,6 @@ describe('ActionSheet', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.hasClass('van-actionsheet')).to.be.true;
|
||||
expect(wrapper.contains('.van-actionsheet__list')).to.be.true;
|
||||
expect(wrapper.instance().actions.length).to.equal(0);
|
||||
expect(wrapper.instance().overlay).to.be.true;
|
||||
expect(wrapper.instance().closeOnClickOverlay).to.be.true;
|
||||
|
||||
@@ -229,7 +229,7 @@ describe('ContactEdit', () => {
|
||||
|
||||
const deleteButton = wrapper.find('.van-button')[1];
|
||||
deleteButton.trigger('click');
|
||||
wrapper.vm.onDeleteContact();
|
||||
wrapper.vm.onDelete();
|
||||
|
||||
setTimeout(() => {
|
||||
wrapper.vm.isDeleting = false;
|
||||
|
||||
@@ -69,6 +69,7 @@ describe('Field', () => {
|
||||
|
||||
it('create a autosize textarea field', (done) => {
|
||||
wrapper = mount(Field, {
|
||||
attachToDocument: true,
|
||||
propsData: {
|
||||
type: 'textarea',
|
||||
autosize: {}
|
||||
@@ -88,7 +89,6 @@ describe('Field', () => {
|
||||
textareaElement.value = longText;
|
||||
textarea.trigger('input');
|
||||
|
||||
wrapper.update();
|
||||
setTimeout(() => {
|
||||
expect(wrapper.find('.van-field__control')[0].element.value).to.equal(longText);
|
||||
expect(textareaElement.style.height).to.equal((textareaElement.scrollHeight - textAreaDiff) + 'px');
|
||||
|
||||
Reference in New Issue
Block a user