diff --git a/components/_util/transition.tsx b/components/_util/transition.tsx
index f65451b58..5b840fe9f 100644
--- a/components/_util/transition.tsx
+++ b/components/_util/transition.tsx
@@ -5,14 +5,7 @@ import type {
TransitionGroupProps,
TransitionProps,
} from 'vue';
-import {
- onUpdated,
- getCurrentInstance,
- defineComponent,
- nextTick,
- Transition as T,
- TransitionGroup as TG,
-} from 'vue';
+import { nextTick, Transition as T, TransitionGroup as TG } from 'vue';
import { tuple } from './type';
const SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
@@ -26,9 +19,6 @@ const getTransitionDirection = (placement: SelectCommonPlacement | undefined) =>
};
export const getTransitionProps = (transitionName: string, opt: TransitionProps = {}) => {
- if (process.env.NODE_ENV === 'test') {
- return opt;
- }
const transitionProps: TransitionProps = transitionName
? {
name: transitionName,
@@ -71,54 +61,6 @@ export const getTransitionGroupProps = (transitionName: string, opt: TransitionP
let Transition = T;
let TransitionGroup = TG;
-if (process.env.NODE_ENV === 'test') {
- let warn = true;
- Transition = defineComponent({
- name: 'TransitionForTest',
- inheritAttrs: false,
- setup(_props, { slots, attrs }) {
- const instance = getCurrentInstance();
- if (warn) {
- console.warn('application runing at test env, you should build use production env');
- warn = false;
- }
- onUpdated(() => {
- const child = instance.subTree.children[0];
- if (child && child.dirs && child.dirs[0]) {
- const value = child.dirs[0].value;
- const oldValue = child.dirs[0].oldValue;
- if (!value && value !== oldValue) {
- nextTick(() => {
- if (attrs.onAfterLeave) {
- (attrs as any).onAfterLeave(instance.vnode.el);
- }
- });
- }
- }
- });
- return () => {
- return slots.default?.();
- };
- },
- }) as any;
- TransitionGroup = defineComponent({
- name: 'TransitionGroupForTest',
- inheritAttrs: false,
- props: ['tag', 'class'],
- setup(props, { slots }) {
- return () => {
- const { tag: Tag, ...rest } = props;
- const children = slots.default?.() || [];
- if (Tag) {
- return {children};
- } else {
- return children;
- }
- };
- },
- });
-}
-
export declare type MotionEvent = (TransitionEvent | AnimationEvent) & {
deadline?: boolean;
};
diff --git a/components/date-picker/__tests__/__snapshots__/QuarterPicker.test.js.snap b/components/date-picker/__tests__/__snapshots__/QuarterPicker.test.js.snap
index 54d8136f6..b4f468637 100644
--- a/components/date-picker/__tests__/__snapshots__/QuarterPicker.test.js.snap
+++ b/components/date-picker/__tests__/__snapshots__/QuarterPicker.test.js.snap
@@ -7,7 +7,7 @@ exports[`QuarterPicker reset select item when popup close 1`] = `
-
+
diff --git a/components/date-picker/__tests__/__snapshots__/RangePicker.test.js.snap b/components/date-picker/__tests__/__snapshots__/RangePicker.test.js.snap
index a96c64154..e4fc4f591 100644
--- a/components/date-picker/__tests__/__snapshots__/RangePicker.test.js.snap
+++ b/components/date-picker/__tests__/__snapshots__/RangePicker.test.js.snap
@@ -9,7 +9,7 @@ exports[`RangePicker customize separator 1`] = `
-
+
diff --git a/components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap b/components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap
index 5e4a0d9fd..3e6a5f940 100644
--- a/components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap
+++ b/components/date-picker/__tests__/__snapshots__/WeekPicker.test.js.snap
@@ -7,7 +7,7 @@ exports[`WeekPicker should support style prop 1`] = `
-
+
diff --git a/components/date-picker/__tests__/__snapshots__/other.test.js.snap b/components/date-picker/__tests__/__snapshots__/other.test.js.snap
index 7a4694e5c..2c5b62eb5 100644
--- a/components/date-picker/__tests__/__snapshots__/other.test.js.snap
+++ b/components/date-picker/__tests__/__snapshots__/other.test.js.snap
@@ -9,7 +9,7 @@ exports[`Picker format by locale date 1`] = `
-
+
@@ -188,7 +188,7 @@ exports[`Picker format by locale dateTime 1`] = `
-
+
@@ -824,7 +824,7 @@ exports[`Picker format by locale month 1`] = `
-
+
@@ -898,7 +898,7 @@ exports[`Picker format by locale week 1`] = `
-
+
diff --git a/components/modal/__tests__/__snapshots__/Modal.test.js.snap b/components/modal/__tests__/__snapshots__/Modal.test.js.snap
index 6e1898ffd..e9c13d02d 100644
--- a/components/modal/__tests__/__snapshots__/Modal.test.js.snap
+++ b/components/modal/__tests__/__snapshots__/Modal.test.js.snap
@@ -4,9 +4,9 @@ exports[`Modal render correctly 1`] = `
-
+
-
+
@@ -28,9 +28,9 @@ exports[`Modal render correctly 2`] = `
-
+
-
+
@@ -52,9 +52,9 @@ exports[`Modal render without footer 1`] = `
-
+
-
+
@@ -70,9 +70,9 @@ exports[`Modal render without footer 1`] = `
exports[`Modal should work with getContainer=false 1`] = `
-
+
-
+
diff --git a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap
index 392d7f744..6c73f89e7 100644
--- a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap
+++ b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap
@@ -106,13 +106,13 @@ exports[`Table.rowSelection fix selection column on the left 1`] = `
exports[`Table.rowSelection render with default selection correctly 1`] = `