import type { TriggerProps } from '@rc-component/trigger';
import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';
import React from 'react';
import ConfigProvider from '..';
import { render } from '../../../tests/utils';
import Cascader from '../../cascader';
import Select from '../../select';
import TreeSelect from '../../tree-select';
dayjs.extend(customParseFormat);
jest.mock('rc-util/lib/Portal');
function triggerProps(): TriggerProps {
return (global as any).triggerProps;
}
jest.mock('@rc-component/trigger', () => {
const R = jest.requireActual('react');
const Trigger = jest.requireActual('@rc-component/trigger').default;
return R.forwardRef((props: any, ref: any) => {
(global as any).triggerProps = props;
return ;
});
});
describe('ConfigProvider.Popup', () => {
beforeEach(() => {
(global as any).triggerProps = null;
});
const selectLikeNodes = (
<>