test: update auto-complete test
parent
ed2a8d6cef
commit
1a18238d97
|
@ -1 +1 @@
|
|||
Subproject commit 62f1a9dd2be9db1635b8b773c33fd445103fc725
|
||||
Subproject commit da9df8ad1ca2592994b34b5cecdc813dff94bc77
|
|
@ -1,55 +1,5 @@
|
|||
import { cloneElement } from '../_util/vnode';
|
||||
import { flattenChildren } from '../_util/props-util';
|
||||
// function chaining(...fns) {
|
||||
// return function(...args) {
|
||||
// // eslint-disable-line
|
||||
// // eslint-disable-line
|
||||
// for (let i = 0; i < fns.length; i++) {
|
||||
// if (fns[i] && typeof fns[i] === 'function') {
|
||||
// fns[i].apply(this, args);
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
// export default {
|
||||
// name: 'InputElement',
|
||||
// inheritAttrs: false,
|
||||
// props: {
|
||||
// value: PropTypes.any,
|
||||
// disabled: PropTypes.bool,
|
||||
// placeholder: PropTypes.string,
|
||||
// },
|
||||
// render() {
|
||||
// const { $slots = {}, $attrs = {}, placeholder } = this;
|
||||
// const listeners = getListeners(this);
|
||||
// const props = getOptionProps(this);
|
||||
// const value = props.value === undefined ? '' : props.value;
|
||||
// const children = getSlot(this)[0];
|
||||
// const { componentOptions = {} } = $slots.default[0];
|
||||
// const { listeners: events = {} } = componentOptions;
|
||||
// const newEvent = { ...events };
|
||||
|
||||
// for (const [eventName, event] of Object.entries(listeners)) {
|
||||
// newEvent[eventName] = chaining(event, events[eventName]);
|
||||
// }
|
||||
// const attrs = { ...$attrs, value };
|
||||
// // https://github.com/vueComponent/ant-design-vue/issues/1761
|
||||
// delete props.placeholder;
|
||||
// if (placeholder) {
|
||||
// props.placeholder = placeholder;
|
||||
// attrs.placeholder = placeholder;
|
||||
// }
|
||||
// return cloneElement(children, {
|
||||
// domProps: {
|
||||
// value,
|
||||
// },
|
||||
// props,
|
||||
// on: newEvent,
|
||||
// attrs,
|
||||
// ref: 'ele',
|
||||
// });
|
||||
// },
|
||||
// };
|
||||
|
||||
const InputElement = (_, { attrs, slots }) => {
|
||||
const children = flattenChildren(slots.default?.())[0];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import AutoComplete from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
|
@ -26,18 +26,8 @@ describe('AutoComplete with Custom Input Element Render', () => {
|
|||
input.element.value = '123';
|
||||
input.trigger('input');
|
||||
Vue.nextTick(() => {
|
||||
mount(
|
||||
{
|
||||
render() {
|
||||
return wrapper.find({ name: 'Trigger' }).vm.getComponent();
|
||||
},
|
||||
},
|
||||
{ sync: false },
|
||||
);
|
||||
Vue.nextTick(() => {
|
||||
expect($$('.ant-select-dropdown-menu-item').length).toBe(3);
|
||||
done();
|
||||
});
|
||||
expect($$('.ant-select-dropdown-menu-item').length).toBe(3);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import Layout from '..';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import moment from 'moment';
|
||||
import MockDate from 'mockdate';
|
||||
import { sleep } from '../../../tests/utils';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import Mentions from '..';
|
||||
import focusTest from '../../../tests/shared/focusTest';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import createStore from '../createStore';
|
||||
import SelectionBox from '../SelectionBox';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import Table from '..';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Table from '..';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
|
||||
describe('Table.pagination', () => {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import Table from '..';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { shallowMount as shallow, mount } from '@vue/test-utils';
|
||||
import Table from '..';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
|
||||
const { Column, ColumnGroup } = Table;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Table from '..';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
|
||||
const columns = [
|
||||
{ title: 'Column 1', dataIndex: 'address', key: '1' },
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import { renderToString } from '@vue/server-test-utils';
|
||||
import Transfer from '..';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import { asyncExpect } from '@/tests/utils';
|
||||
import mountTest from '../../../tests/shared/mountTest';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Vue from 'vue';
|
||||
import * as Vue from 'vue';
|
||||
import Upload from '..';
|
||||
import { errorRequest, successRequest } from './requests';
|
||||
import PropsTypes from '../../_util/vue-types';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { inject, provide } from 'vue';
|
||||
import antRef from '../_util/ant-ref';
|
||||
import PropTypes from '../_util/vue-types';
|
||||
import contains from '../vc-util/Dom/contains';
|
||||
import {
|
||||
|
@ -40,7 +39,6 @@ const ALL_HANDLERS = [
|
|||
|
||||
export default {
|
||||
name: 'Trigger',
|
||||
directives: { 'ant-ref': antRef },
|
||||
mixins: [BaseMixin],
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
|
|
Loading…
Reference in New Issue