import React from 'react';
import ConfigProvider from '..';
import Cascader from '../../cascader';
import DatePicker from '../../date-picker';
import Drawer from '../../drawer';
import Slider from '../../slider';
import { render, fireEvent } from '../../../tests/utils';
describe('ConfigProvider.GetPopupContainer', () => {
it('Datepicker', () => {
const getPopupContainer = jest.fn((node) => node.parentNode);
render(
,
);
expect(getPopupContainer).toHaveBeenCalled();
});
it('Slider', () => {
const getPopupContainer = jest.fn((node) => node.parentNode);
const wrapper = render(
,
);
fireEvent.mouseEnter(wrapper.container.querySelector('.ant-slider-handle')!);
expect(getPopupContainer).toHaveBeenCalled();
});
it('Drawer', () => {
const getPopupContainer = jest.fn((node) => node.parentNode);
const Demo: React.FC<{ open?: boolean }> = ({ open }) => (
);
render();
expect(getPopupContainer).toHaveBeenCalled();
});
it('Cascader', () => {
const getPopupContainer = jest.fn((node) => node.parentNode);
render();
expect(getPopupContainer).toHaveBeenCalled();
});
});