diff --git a/packages/mui-core/src/AutocompleteUnstyled/useAutocomplete.test.js b/packages/mui-core/src/AutocompleteUnstyled/useAutocomplete.test.js index 2039083cd70686..92aa4f194144ca 100644 --- a/packages/mui-core/src/AutocompleteUnstyled/useAutocomplete.test.js +++ b/packages/mui-core/src/AutocompleteUnstyled/useAutocomplete.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, screen, ErrorBoundary, act, fireEvent } from 'test/utils'; +import { createRenderer, screen, ErrorBoundary, act, fireEvent } from 'test/utils'; import { useAutocomplete, createFilterOptions } from '@mui/core/AutocompleteUnstyled'; describe('useAutocomplete', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should preserve DOM nodes of options when re-ordering', () => { const Test = (props) => { diff --git a/packages/mui-core/src/BackdropUnstyled/BackdropUnstyled.test.js b/packages/mui-core/src/BackdropUnstyled/BackdropUnstyled.test.js index 1f1695a9534b8f..1ee586a2d8c25b 100644 --- a/packages/mui-core/src/BackdropUnstyled/BackdropUnstyled.test.js +++ b/packages/mui-core/src/BackdropUnstyled/BackdropUnstyled.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import BackdropUnstyled, { backdropUnstyledClasses as classes } from '@mui/core/BackdropUnstyled'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-core/src/BadgeUnstyled/BadgeUnstyled.test.js b/packages/mui-core/src/BadgeUnstyled/BadgeUnstyled.test.js index 83d4b2a56b7236..5a004f2e9660b1 100644 --- a/packages/mui-core/src/BadgeUnstyled/BadgeUnstyled.test.js +++ b/packages/mui-core/src/BadgeUnstyled/BadgeUnstyled.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import BadgeUnstyled, { badgeUnstyledClasses as classes } from '@mui/core/BadgeUnstyled'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-core/src/ButtonUnstyled/ButtonUnstyled.test.tsx b/packages/mui-core/src/ButtonUnstyled/ButtonUnstyled.test.tsx index f2f25b4a64709e..c212fe9db50dba 100644 --- a/packages/mui-core/src/ButtonUnstyled/ButtonUnstyled.test.tsx +++ b/packages/mui-core/src/ButtonUnstyled/ButtonUnstyled.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createMount, createClientRender, describeConformanceUnstyled } from 'test/utils'; +import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils'; import ButtonUnstyled, { buttonUnstyledClasses } from '@mui/core/ButtonUnstyled'; import { expect } from 'chai'; describe('', () => { const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformanceUnstyled(, () => ({ inheritComponent: 'button', diff --git a/packages/mui-core/src/ButtonUnstyled/useButton.test.tsx b/packages/mui-core/src/ButtonUnstyled/useButton.test.tsx index 5650d6d931a794..86e45201932589 100644 --- a/packages/mui-core/src/ButtonUnstyled/useButton.test.tsx +++ b/packages/mui-core/src/ButtonUnstyled/useButton.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { useButton } from '@mui/core/ButtonUnstyled'; -import { createClientRender, fireEvent } from 'test/utils'; +import { createRenderer, fireEvent } from 'test/utils'; import { expect } from 'chai'; import { spy } from 'sinon'; describe('useButton', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('state: active', () => { describe('when using a button element', () => { diff --git a/packages/mui-core/src/ClickAwayListener/ClickAwayListener.test.js b/packages/mui-core/src/ClickAwayListener/ClickAwayListener.test.js index ce45da4c57cba4..22371a0f77c585 100644 --- a/packages/mui-core/src/ClickAwayListener/ClickAwayListener.test.js +++ b/packages/mui-core/src/ClickAwayListener/ClickAwayListener.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, fireEvent, fireDiscreteEvent, screen } from 'test/utils'; +import { act, createRenderer, fireEvent, fireDiscreteEvent, screen } from 'test/utils'; import Portal from '@mui/core/Portal'; import ClickAwayListener from '@mui/core/ClickAwayListener'; @@ -19,7 +19,7 @@ describe('', () => { clock.restore(); }); - const clientRender = createClientRender(); + const { render: clientRender } = createRenderer(); /** * @type {typeof plainRender extends (...args: infer T) => any ? T : enver} args * diff --git a/packages/mui-core/src/FormControlUnstyled/FormControlUnstyled.test.tsx b/packages/mui-core/src/FormControlUnstyled/FormControlUnstyled.test.tsx index 784dad46666b82..9f7780ad056274 100644 --- a/packages/mui-core/src/FormControlUnstyled/FormControlUnstyled.test.tsx +++ b/packages/mui-core/src/FormControlUnstyled/FormControlUnstyled.test.tsx @@ -1,12 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { - createMount, - createClientRender, - describeConformanceUnstyled, - fireEvent, -} from 'test/utils'; +import { createMount, createRenderer, describeConformanceUnstyled, fireEvent } from 'test/utils'; import FormControlUnstyled, { formControlUnstyledClasses, useFormControlUnstyled, @@ -14,7 +9,7 @@ import FormControlUnstyled, { describe('', () => { const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformanceUnstyled(, () => ({ inheritComponent: 'div', diff --git a/packages/mui-core/src/InputUnstyled/InputUnstyled.test.tsx b/packages/mui-core/src/InputUnstyled/InputUnstyled.test.tsx index 9f6f3b427561d2..6027b56f455488 100644 --- a/packages/mui-core/src/InputUnstyled/InputUnstyled.test.tsx +++ b/packages/mui-core/src/InputUnstyled/InputUnstyled.test.tsx @@ -1,10 +1,10 @@ import * as React from 'react'; -import { createMount, createClientRender, describeConformanceUnstyled } from 'test/utils'; +import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils'; import InputUnstyled, { inputUnstyledClasses } from '@mui/core/InputUnstyled'; describe('', () => { const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformanceUnstyled(, () => ({ inheritComponent: 'div', diff --git a/packages/mui-core/src/ModalUnstyled/ModalUnstyled.test.js b/packages/mui-core/src/ModalUnstyled/ModalUnstyled.test.js index 13889dce9dfd91..99f6b3e8dc13cd 100644 --- a/packages/mui-core/src/ModalUnstyled/ModalUnstyled.test.js +++ b/packages/mui-core/src/ModalUnstyled/ModalUnstyled.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ModalUnstyled, { modalUnstyledClasses as classes } from '@mui/core/ModalUnstyled'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); let savedBodyStyle; before(() => { diff --git a/packages/mui-core/src/NoSsr/NoSsr.test.js b/packages/mui-core/src/NoSsr/NoSsr.test.js index 49a197210f3ff4..55f3e056dce285 100644 --- a/packages/mui-core/src/NoSsr/NoSsr.test.js +++ b/packages/mui-core/src/NoSsr/NoSsr.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, createServerRender } from 'test/utils'; +import { createRenderer, createServerRender } from 'test/utils'; import NoSsr from '@mui/core/NoSsr'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const serverRender = createServerRender({ expectUseLayoutEffectWarning: true }); describe('server-side rendering', () => { diff --git a/packages/mui-core/src/Popper/Popper.test.js b/packages/mui-core/src/Popper/Popper.test.js index 359d6b178751c2..49d9daa68a1dc4 100644 --- a/packages/mui-core/src/Popper/Popper.test.js +++ b/packages/mui-core/src/Popper/Popper.test.js @@ -2,14 +2,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { useFakeTimers } from 'sinon'; import PropTypes from 'prop-types'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/system'; import Grow from '@mui/material/Grow'; import Popper from '@mui/core/Popper'; describe('', () => { let rtlTheme; - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { anchorEl: () => document.createElement('svg'), children: Hello World, diff --git a/packages/mui-core/src/Portal/Portal.test.js b/packages/mui-core/src/Portal/Portal.test.js index 2a3c5fc8453fc4..bf06e56512ac02 100644 --- a/packages/mui-core/src/Portal/Portal.test.js +++ b/packages/mui-core/src/Portal/Portal.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createServerRender, createClientRender } from 'test/utils'; +import { createServerRender, createRenderer } from 'test/utils'; import Portal from './Portal'; describe('', () => { const serverRender = createServerRender({ expectUseLayoutEffectWarning: true }); - const render = createClientRender(); + const { render } = createRenderer(); describe('server-side', () => { before(function beforeHook() { diff --git a/packages/mui-core/src/SliderUnstyled/SliderUnstyled.test.js b/packages/mui-core/src/SliderUnstyled/SliderUnstyled.test.js index e52b16d8bf62df..92493d1a591383 100644 --- a/packages/mui-core/src/SliderUnstyled/SliderUnstyled.test.js +++ b/packages/mui-core/src/SliderUnstyled/SliderUnstyled.test.js @@ -2,13 +2,7 @@ import SliderUnstyled, { sliderUnstyledClasses as classes } from '@mui/core/Slid import { expect } from 'chai'; import * as React from 'react'; import { spy, stub } from 'sinon'; -import { - createClientRender, - createMount, - describeConformance, - fireEvent, - screen, -} from 'test/utils'; +import { createRenderer, createMount, describeConformance, fireEvent, screen } from 'test/utils'; describe('', () => { before(function beforeHook() { @@ -18,7 +12,7 @@ describe('', () => { }); const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-core/src/SwitchUnstyled/SwitchUnstyled.test.tsx b/packages/mui-core/src/SwitchUnstyled/SwitchUnstyled.test.tsx index dd674332ba461e..3a5c308a56816a 100644 --- a/packages/mui-core/src/SwitchUnstyled/SwitchUnstyled.test.tsx +++ b/packages/mui-core/src/SwitchUnstyled/SwitchUnstyled.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createMount, createClientRender, describeConformanceUnstyled } from 'test/utils'; +import { createMount, createRenderer, describeConformanceUnstyled } from 'test/utils'; import SwitchUnstyled, { SwitchState, switchUnstyledClasses } from '@mui/core/SwitchUnstyled'; import { expect } from 'chai'; describe('', () => { const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformanceUnstyled(, () => ({ inheritComponent: 'span', diff --git a/packages/mui-core/src/SwitchUnstyled/useSwitch.test.tsx b/packages/mui-core/src/SwitchUnstyled/useSwitch.test.tsx index bc1835af2c4e7b..51971425078b94 100644 --- a/packages/mui-core/src/SwitchUnstyled/useSwitch.test.tsx +++ b/packages/mui-core/src/SwitchUnstyled/useSwitch.test.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { spy } from 'sinon'; import { act, - createClientRender, + createRenderer, focusVisible, programmaticFocusTriggersFocusVisible, screen, @@ -12,7 +12,7 @@ import { import { useSwitch, UseSwitchProps, UseSwitchResult } from '@mui/core/SwitchUnstyled'; describe('useSwitch', () => { - const render = createClientRender(); + const { render } = createRenderer(); const invokeUseSwitch = (props: UseSwitchProps): UseSwitchResult => { const ref = React.createRef(); function TestComponent() { diff --git a/packages/mui-core/src/TextareaAutosize/TextareaAutosize.test.js b/packages/mui-core/src/TextareaAutosize/TextareaAutosize.test.js index 190e8aa4a689db..06242833003dca 100644 --- a/packages/mui-core/src/TextareaAutosize/TextareaAutosize.test.js +++ b/packages/mui-core/src/TextareaAutosize/TextareaAutosize.test.js @@ -4,14 +4,14 @@ import sinon, { spy, stub, useFakeTimers } from 'sinon'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, strictModeDoubleLoggingSupressed, } from 'test/utils'; import TextareaAutosize from '@mui/core/TextareaAutosize'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ inheritComponent: 'textarea', diff --git a/packages/mui-core/src/Unstable_TrapFocus/Unstable_TrapFocus.test.js b/packages/mui-core/src/Unstable_TrapFocus/Unstable_TrapFocus.test.js index 2b6c53a9eb3151..7f64ff9faadea1 100644 --- a/packages/mui-core/src/Unstable_TrapFocus/Unstable_TrapFocus.test.js +++ b/packages/mui-core/src/Unstable_TrapFocus/Unstable_TrapFocus.test.js @@ -2,12 +2,12 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { act, createClientRender, screen } from 'test/utils'; +import { act, createRenderer, screen } from 'test/utils'; import TrapFocus from '@mui/core/Unstable_TrapFocus'; import Portal from '@mui/core/Portal'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); let initialFocus = null; diff --git a/packages/mui-joy/src/styles/CssVarsProvider.test.tsx b/packages/mui-joy/src/styles/CssVarsProvider.test.tsx index c3dda97d7bd701..8b16f42e83c7c7 100644 --- a/packages/mui-joy/src/styles/CssVarsProvider.test.tsx +++ b/packages/mui-joy/src/styles/CssVarsProvider.test.tsx @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, screen } from 'test/utils'; +import { createRenderer, screen } from 'test/utils'; import { styled, CssVarsProvider, useTheme } from '@mui/joy/styles'; import defaultTheme from './defaultTheme'; describe('[Joy] CssVarsProvider', () => { let originalMatchmedia: typeof window.matchMedia; - const render = createClientRender(); + const { render } = createRenderer(); const storage: Record = {}; beforeEach(() => { originalMatchmedia = window.matchMedia; diff --git a/packages/mui-joy/src/styles/ThemeProvider.test.tsx b/packages/mui-joy/src/styles/ThemeProvider.test.tsx index dc452f11528cb0..e8746202695149 100644 --- a/packages/mui-joy/src/styles/ThemeProvider.test.tsx +++ b/packages/mui-joy/src/styles/ThemeProvider.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import { ThemeProvider, useTheme } from '@mui/joy/styles'; import defaultTheme from './defaultTheme'; describe('[Joy] ThemeProvider', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('can render component without ThemeProvider', () => { const Text = () => { const theme = useTheme(); diff --git a/packages/mui-joy/src/styles/styled.test.tsx b/packages/mui-joy/src/styles/styled.test.tsx index 313bb1b848684c..49cf1f3fb49f17 100644 --- a/packages/mui-joy/src/styles/styled.test.tsx +++ b/packages/mui-joy/src/styles/styled.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import { ThemeProvider, styled } from '@mui/joy/styles'; import defaultTheme from './defaultTheme'; const toPixel = (val: string | number | undefined) => (typeof val === 'number' ? `${val}px` : val); describe('[Joy] styled', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('use defaultTheme given no ThemeProvider', function test() { if (/jsdom/.test(window.navigator.userAgent)) { this.skip(); diff --git a/packages/mui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx b/packages/mui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx index cf7d0104ff87d1..608b62b726d00b 100644 --- a/packages/mui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx +++ b/packages/mui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import CalendarPickerSkeleton, { calendarPickerSkeletonClasses as classes, } from '@mui/lab/CalendarPickerSkeleton'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/LoadingButton/LoadingButton.test.js b/packages/mui-lab/src/LoadingButton/LoadingButton.test.js index 0a109419513afa..1132e7db790e87 100644 --- a/packages/mui-lab/src/LoadingButton/LoadingButton.test.js +++ b/packages/mui-lab/src/LoadingButton/LoadingButton.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformance, screen } from 'test/utils'; +import { createRenderer, describeConformance, screen } from 'test/utils'; import { expect } from 'chai'; import Button from '@mui/material/Button'; import LoadingButton, { loadingButtonClasses as classes } from '@mui/lab/LoadingButton'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance?, () => ({ classes, diff --git a/packages/mui-lab/src/Masonry/Masonry.test.js b/packages/mui-lab/src/Masonry/Masonry.test.js index bfa3354b21d9bb..af7b5bbd266972 100644 --- a/packages/mui-lab/src/Masonry/Masonry.test.js +++ b/packages/mui-lab/src/Masonry/Masonry.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Masonry, { masonryClasses as classes } from '@mui/lab/Masonry'; import { expect } from 'chai'; import { createTheme } from '@mui/material/styles'; import { getStyle, parseToNumber } from './Masonry'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-lab/src/TabList/TabList.test.js b/packages/mui-lab/src/TabList/TabList.test.js index 62c1c5d9863a57..8a99d65603c5b1 100644 --- a/packages/mui-lab/src/TabList/TabList.test.js +++ b/packages/mui-lab/src/TabList/TabList.test.js @@ -1,14 +1,14 @@ // @ts-check import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Tab from '@mui/material/Tab'; import Tabs, { tabsClasses as classes } from '@mui/material/Tabs'; import TabList from './TabList'; import TabContext from '../TabContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); // @ts-ignore mui name does not exist for this component describeConformance(, () => ({ diff --git a/packages/mui-lab/src/TabPanel/TabPanel.test.tsx b/packages/mui-lab/src/TabPanel/TabPanel.test.tsx index d0b8e09d7e95a7..47908a1d1cd14b 100644 --- a/packages/mui-lab/src/TabPanel/TabPanel.test.tsx +++ b/packages/mui-lab/src/TabPanel/TabPanel.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TabPanel, { tabPanelClasses as classes } from '@mui/lab/TabPanel'; import TabContext from '../TabContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/Timeline/Timeline.test.tsx b/packages/mui-lab/src/Timeline/Timeline.test.tsx index bec8be256ebaa5..ba44b0cecb2824 100644 --- a/packages/mui-lab/src/Timeline/Timeline.test.tsx +++ b/packages/mui-lab/src/Timeline/Timeline.test.tsx @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Timeline, { timelineClasses as classes } from '@mui/lab/Timeline'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js b/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js index a1821c7e0d407f..d6e9bf06b43172 100644 --- a/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js +++ b/packages/mui-lab/src/TimelineConnector/TimelineConnector.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TimelineConnector, { timelineConnectorClasses as classes } from '@mui/lab/TimelineConnector'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineContent/TimelineContent.test.js b/packages/mui-lab/src/TimelineContent/TimelineContent.test.js index 3a92876c5e64e5..7af431ccf15dcf 100644 --- a/packages/mui-lab/src/TimelineContent/TimelineContent.test.js +++ b/packages/mui-lab/src/TimelineContent/TimelineContent.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography from '@mui/material/Typography'; import Timeline from '@mui/lab/Timeline'; import TimelineItem from '@mui/lab/TimelineItem'; import TimelineContent, { timelineContentClasses as classes } from '@mui/lab/TimelineContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineDot/TimelineDot.test.js b/packages/mui-lab/src/TimelineDot/TimelineDot.test.js index 77c5da72c2b094..2e301df522812e 100644 --- a/packages/mui-lab/src/TimelineDot/TimelineDot.test.js +++ b/packages/mui-lab/src/TimelineDot/TimelineDot.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TimelineDot, { timelineDotClasses as classes } from '@mui/lab/TimelineDot'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineItem/TimelineItem.test.js b/packages/mui-lab/src/TimelineItem/TimelineItem.test.js index acf74ae263a927..961d96a7e285a0 100644 --- a/packages/mui-lab/src/TimelineItem/TimelineItem.test.js +++ b/packages/mui-lab/src/TimelineItem/TimelineItem.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TimelineItem, { timelineItemClasses as classes } from '@mui/lab/TimelineItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js b/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js index 76e21e96d93231..d32183fdd18e0e 100644 --- a/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js +++ b/packages/mui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography from '@mui/material/Typography'; import Timeline from '@mui/lab/Timeline'; import TimelineItem from '@mui/lab/TimelineItem'; @@ -9,7 +9,7 @@ import TimelineOppositeContent, { } from '@mui/lab/TimelineOppositeContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js b/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js index 961e58296303ab..22d69543ab8872 100644 --- a/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js +++ b/packages/mui-lab/src/TimelineSeparator/TimelineSeparator.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TimelineSeparator, { timelineSeparatorClasses as classes } from '@mui/lab/TimelineSeparator'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TreeItem/TreeItem.test.js b/packages/mui-lab/src/TreeItem/TreeItem.test.js index 595caae9e52a8b..cd0d01b7612c0f 100644 --- a/packages/mui-lab/src/TreeItem/TreeItem.test.js +++ b/packages/mui-lab/src/TreeItem/TreeItem.test.js @@ -6,7 +6,7 @@ import { describeConformance, act, createEvent, - createClientRender, + createRenderer, fireEvent, screen, } from 'test/utils'; @@ -14,7 +14,7 @@ import TreeView from '@mui/lab/TreeView'; import TreeItem, { treeItemClasses as classes } from '@mui/lab/TreeItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/TreeView/TreeView.test.js b/packages/mui-lab/src/TreeView/TreeView.test.js index 64b14d8427016b..7563a827813287 100644 --- a/packages/mui-lab/src/TreeView/TreeView.test.js +++ b/packages/mui-lab/src/TreeView/TreeView.test.js @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { spy } from 'sinon'; import { act, - createClientRender, + createRenderer, ErrorBoundary, fireEvent, screen, @@ -14,7 +14,7 @@ import TreeView, { treeViewClasses as classes } from '@mui/lab/TreeView'; import TreeItem from '@mui/lab/TreeItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-lab/src/internal/pickers/test-utils.tsx b/packages/mui-lab/src/internal/pickers/test-utils.tsx index bb85ad3445a672..0db97a1def8568 100644 --- a/packages/mui-lab/src/internal/pickers/test-utils.tsx +++ b/packages/mui-lab/src/internal/pickers/test-utils.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { parseISO } from 'date-fns'; -import { createClientRender, fireEvent, screen } from 'test/utils'; +import { createRenderer, fireEvent, screen } from 'test/utils'; import { TransitionProps } from '@mui/material/transitions'; import AdapterDateFns from '@mui/lab/AdapterDateFns'; import LocalizationProvider from '@mui/lab/LocalizationProvider'; @@ -54,7 +54,7 @@ export function createPickerRender({ locale, ...renderOptions }: PickerRenderOptions & import('test/utils').RenderOptions = {}) { - const clientRender = createClientRender(renderOptions); + const { render: clientRender } = createRenderer(renderOptions); function Wrapper({ children }: { children?: React.ReactNode }) { return ( diff --git a/packages/mui-lab/test/integration/Tabs.test.js b/packages/mui-lab/test/integration/Tabs.test.js index c58f692eabea29..14537af5e135c3 100644 --- a/packages/mui-lab/test/integration/Tabs.test.js +++ b/packages/mui-lab/test/integration/Tabs.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import Tab from '@mui/material/Tab'; import TabContext from '@mui/lab/TabContext'; import TabList from '@mui/lab/TabList'; import TabPanel from '@mui/lab/TabPanel'; describe(' integration', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('wires up aria attributes', () => { const { getAllByRole, setProps } = render( diff --git a/packages/mui-material-next/src/Button/Button.test.js b/packages/mui-material-next/src/Button/Button.test.js index b52d38b1d68236..622081a026a40b 100644 --- a/packages/mui-material-next/src/Button/Button.test.js +++ b/packages/mui-material-next/src/Button/Button.test.js @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, createServerRender, } from 'test/utils'; @@ -11,7 +11,7 @@ import Button, { buttonClasses as classes } from '@mui/material/Button'; import ButtonBase from '@mui/material/ButtonBase'; describe(', () => ({ classes, diff --git a/packages/mui-material-next/src/Button/Ripple.test.js b/packages/mui-material-next/src/Button/Ripple.test.js index 8a1ba50a2d2466..48b8c719085ec0 100644 --- a/packages/mui-material-next/src/Button/Ripple.test.js +++ b/packages/mui-material-next/src/Button/Ripple.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import Ripple from './Ripple'; import classes from './touchRippleClasses'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should have the ripple className', () => { const { container } = render( diff --git a/packages/mui-material-next/src/Button/TouchRipple.test.js b/packages/mui-material-next/src/Button/TouchRipple.test.js index 3a82f4a85374dd..8dc3ee8dd53872 100644 --- a/packages/mui-material-next/src/Button/TouchRipple.test.js +++ b/packages/mui-material-next/src/Button/TouchRipple.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import TouchRipple, { DELAY_RIPPLE } from './TouchRipple'; const cb = () => {}; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); /** * @param {object} other props to spread to TouchRipple diff --git a/packages/mui-material-next/src/Input/Input.test.js b/packages/mui-material-next/src/Input/Input.test.js index 502f1c05d4bf32..6a5ec582f078ca 100644 --- a/packages/mui-material-next/src/Input/Input.test.js +++ b/packages/mui-material-next/src/Input/Input.test.js @@ -2,11 +2,11 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import Input, { inputClasses as classes } from '@mui/material-next/Input'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Accordion/Accordion.test.js b/packages/mui-material/src/Accordion/Accordion.test.js index 9e0582836cb9ad..9f8bfb034fca19 100644 --- a/packages/mui-material/src/Accordion/Accordion.test.js +++ b/packages/mui-material/src/Accordion/Accordion.test.js @@ -2,13 +2,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createRenderer, fireEvent } from 'test/utils'; import Accordion, { accordionClasses as classes } from '@mui/material/Accordion'; import Paper from '@mui/material/Paper'; import AccordionSummary from '@mui/material/AccordionSummary'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const minimalChildren = [Header]; diff --git a/packages/mui-material/src/AccordionActions/AccordionActions.test.js b/packages/mui-material/src/AccordionActions/AccordionActions.test.js index a1ac5f4d595df6..03ab384751d557 100644 --- a/packages/mui-material/src/AccordionActions/AccordionActions.test.js +++ b/packages/mui-material/src/AccordionActions/AccordionActions.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import AccordionActions, { accordionActionsClasses as classes, } from '@mui/material/AccordionActions'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance, () => ({ classes, diff --git a/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js b/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js index 05ab21b8d30e11..08d38664921cbd 100644 --- a/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js +++ b/packages/mui-material/src/AccordionDetails/AccordionDetails.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import AccordionDetails, { accordionDetailsClasses as classes, } from '@mui/material/AccordionDetails'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance, () => ({ classes, diff --git a/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js b/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js index 8230b9961afdec..10f24117c82498 100644 --- a/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js +++ b/packages/mui-material/src/AccordionSummary/AccordionSummary.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent } from 'test/utils'; import AccordionSummary, { accordionSummaryClasses as classes, } from '@mui/material/AccordionSummary'; @@ -9,7 +9,7 @@ import Accordion from '@mui/material/Accordion'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Alert/Alert.test.js b/packages/mui-material/src/Alert/Alert.test.js index 182c4fd7592d50..08ff9e8c1ad49a 100644 --- a/packages/mui-material/src/Alert/Alert.test.js +++ b/packages/mui-material/src/Alert/Alert.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Alert, { alertClasses as classes } from '@mui/material/Alert'; import Paper from '@mui/material/Paper'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/AlertTitle/AlertTitle.test.js b/packages/mui-material/src/AlertTitle/AlertTitle.test.js index d84adb80c14b92..d4485944128773 100644 --- a/packages/mui-material/src/AlertTitle/AlertTitle.test.js +++ b/packages/mui-material/src/AlertTitle/AlertTitle.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import AlertTitle, { alertTitleClasses as classes } from '@mui/material/AlertTitle'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/AppBar/AppBar.test.js b/packages/mui-material/src/AppBar/AppBar.test.js index 923e8e7a01a097..066f137f40c5c3 100644 --- a/packages/mui-material/src/AppBar/AppBar.test.js +++ b/packages/mui-material/src/AppBar/AppBar.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance, screen } from 'test/utils'; +import { createRenderer, describeConformance, screen } from 'test/utils'; import AppBar, { appBarClasses as classes } from '@mui/material/AppBar'; import Paper from '@mui/material/Paper'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance?, () => ({ classes, diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.test.js b/packages/mui-material/src/Autocomplete/Autocomplete.test.js index 5172761048aa95..26b9f892d58016 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.test.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.test.js @@ -4,7 +4,7 @@ import { expect } from 'chai'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, screen, strictModeDoubleLoggingSupressed, @@ -34,7 +34,7 @@ function checkHighlightIs(listbox, expected) { } describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( } />, diff --git a/packages/mui-material/src/Avatar/Avatar.test.js b/packages/mui-material/src/Avatar/Avatar.test.js index 733c3ea747affb..eb00cf9630e239 100644 --- a/packages/mui-material/src/Avatar/Avatar.test.js +++ b/packages/mui-material/src/Avatar/Avatar.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, fireEvent, describeConformance } from 'test/utils'; +import { createRenderer, fireEvent, describeConformance } from 'test/utils'; import { spy } from 'sinon'; import Avatar, { avatarClasses as classes } from '@mui/material/Avatar'; import CancelIcon from '../internal/svg-icons/Cancel'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js b/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js index ee26bf0809e438..8f2a57806dc7a7 100644 --- a/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js +++ b/packages/mui-material/src/AvatarGroup/AvatarGroup.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import Avatar from '@mui/material/Avatar'; import AvatarGroup, { avatarGroupClasses as classes } from '@mui/material/AvatarGroup'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/Backdrop/Backdrop.test.js b/packages/mui-material/src/Backdrop/Backdrop.test.js index f442b5c997ec60..f4eb4f193353c1 100644 --- a/packages/mui-material/src/Backdrop/Backdrop.test.js +++ b/packages/mui-material/src/Backdrop/Backdrop.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { createClientRender, describeConformance, act } from 'test/utils'; +import { createRenderer, describeConformance, act } from 'test/utils'; import Backdrop, { backdropClasses as classes } from '@mui/material/Backdrop'; import Fade from '@mui/material/Fade'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Badge/Badge.test.js b/packages/mui-material/src/Badge/Badge.test.js index 233e9602d276a1..44f8bdcc9cbc52 100644 --- a/packages/mui-material/src/Badge/Badge.test.js +++ b/packages/mui-material/src/Badge/Badge.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { BadgeUnstyled } from '@mui/core'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Badge, { badgeClasses as classes } from '@mui/material/Badge'; function findBadge(container) { @@ -9,7 +9,7 @@ function findBadge(container) { } describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { children: ( diff --git a/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js b/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js index 4b5171301b7a17..b92cd86fab4cde 100755 --- a/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js +++ b/packages/mui-material/src/BottomNavigation/BottomNavigation.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createRenderer, fireEvent } from 'test/utils'; import BottomNavigation, { bottomNavigationClasses as classes, } from '@mui/material/BottomNavigation'; @@ -11,7 +11,7 @@ import BottomNavigationAction, { import Icon from '@mui/material/Icon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const icon = restore; const getBottomNavigation = (container) => container.firstChild; diff --git a/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js b/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js index 8e5d048112f065..70ecd2b506c3e6 100644 --- a/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js +++ b/packages/mui-material/src/BottomNavigationAction/BottomNavigationAction.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender, within } from 'test/utils'; +import { describeConformance, createRenderer, within } from 'test/utils'; import BottomNavigationAction, { bottomNavigationActionClasses as classes, } from '@mui/material/BottomNavigationAction'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Box/Box.test.js b/packages/mui-material/src/Box/Box.test.js index 69fb9fbbcc34a9..54951bcbf12463 100644 --- a/packages/mui-material/src/Box/Box.test.js +++ b/packages/mui-material/src/Box/Box.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { createTheme, ThemeProvider } from '@mui/material/styles'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Box from '@mui/material/Box'; import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/utils'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ render, diff --git a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js index 8951243cb0da98..141b323a513aa5 100644 --- a/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js +++ b/packages/mui-material/src/Breadcrumbs/BreadcrumbCollapsed.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { fireEvent, createClientRender } from 'test/utils'; +import { fireEvent, createRenderer } from 'test/utils'; import BreadcrumbCollapsed from './BreadcrumbCollapsed'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should render an icon', () => { const { container } = render(); diff --git a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js index c9363aee07c048..ddac76038b7426 100644 --- a/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js +++ b/packages/mui-material/src/Breadcrumbs/Breadcrumbs.test.js @@ -3,14 +3,14 @@ import { expect } from 'chai'; import { act, describeConformance, - createClientRender, + createRenderer, screen, strictModeDoubleLoggingSupressed, } from 'test/utils'; import Breadcrumbs, { breadcrumbsClasses as classes } from '@mui/material/Breadcrumbs'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance?, () => ({ classes, diff --git a/packages/mui-material/src/Button/Button.test.js b/packages/mui-material/src/Button/Button.test.js index b52d38b1d68236..622081a026a40b 100644 --- a/packages/mui-material/src/Button/Button.test.js +++ b/packages/mui-material/src/Button/Button.test.js @@ -3,7 +3,7 @@ import { expect } from 'chai'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, createServerRender, } from 'test/utils'; @@ -11,7 +11,7 @@ import Button, { buttonClasses as classes } from '@mui/material/Button'; import ButtonBase from '@mui/material/ButtonBase'; describe(', () => ({ classes, diff --git a/packages/mui-material/src/ButtonBase/ButtonBase.test.js b/packages/mui-material/src/ButtonBase/ButtonBase.test.js index 93fb4b5b59b9a0..f66e57d82d4abd 100644 --- a/packages/mui-material/src/ButtonBase/ButtonBase.test.js +++ b/packages/mui-material/src/ButtonBase/ButtonBase.test.js @@ -5,7 +5,7 @@ import { spy, stub } from 'sinon'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, screen, focusVisible, @@ -17,7 +17,7 @@ import { ThemeProvider, createTheme } from '@mui/material/styles'; import ButtonBase, { buttonBaseClasses as classes } from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14156632/ let canFireDragEvents = true; diff --git a/packages/mui-material/src/ButtonBase/Ripple.test.js b/packages/mui-material/src/ButtonBase/Ripple.test.js index 8a1ba50a2d2466..48b8c719085ec0 100644 --- a/packages/mui-material/src/ButtonBase/Ripple.test.js +++ b/packages/mui-material/src/ButtonBase/Ripple.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import Ripple from './Ripple'; import classes from './touchRippleClasses'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should have the ripple className', () => { const { container } = render( diff --git a/packages/mui-material/src/ButtonBase/TouchRipple.test.js b/packages/mui-material/src/ButtonBase/TouchRipple.test.js index 3a82f4a85374dd..8dc3ee8dd53872 100644 --- a/packages/mui-material/src/ButtonBase/TouchRipple.test.js +++ b/packages/mui-material/src/ButtonBase/TouchRipple.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import TouchRipple, { DELAY_RIPPLE } from './TouchRipple'; const cb = () => {}; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); /** * @param {object} other props to spread to TouchRipple diff --git a/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js b/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js index ff725c54749b36..a071e0b9353d4d 100644 --- a/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js +++ b/packages/mui-material/src/ButtonGroup/ButtonGroup.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ButtonGroup, { buttonGroupClasses as classes } from '@mui/material/ButtonGroup'; import Button from '@mui/material/Button'; import ButtonGroupContext from './ButtonGroupContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/Card/Card.test.tsx b/packages/mui-material/src/Card/Card.test.tsx index d46330e7932f32..11d7bb2a21c93a 100644 --- a/packages/mui-material/src/Card/Card.test.tsx +++ b/packages/mui-material/src/Card/Card.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Card, { cardClasses as classes } from '@mui/material/Card'; import Paper from '@mui/material/Paper'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CardActionArea/CardActionArea.test.js b/packages/mui-material/src/CardActionArea/CardActionArea.test.js index 0c538417b349b3..d3d9db7d1ce49c 100644 --- a/packages/mui-material/src/CardActionArea/CardActionArea.test.js +++ b/packages/mui-material/src/CardActionArea/CardActionArea.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import CardActionArea, { cardActionAreaClasses as classes } from '@mui/material/CardActionArea'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CardActions/CardActions.test.js b/packages/mui-material/src/CardActions/CardActions.test.js index 17eebd3bf8af98..821827d7a516ff 100644 --- a/packages/mui-material/src/CardActions/CardActions.test.js +++ b/packages/mui-material/src/CardActions/CardActions.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import CardActions, { cardActionsClasses as classes } from '@mui/material/CardActions'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CardContent/CardContent.test.js b/packages/mui-material/src/CardContent/CardContent.test.js index 4cb804307e145c..d7c92860c2f9f4 100644 --- a/packages/mui-material/src/CardContent/CardContent.test.js +++ b/packages/mui-material/src/CardContent/CardContent.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import CardContent, { cardContentClasses as classes } from '@mui/material/CardContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CardHeader/CardHeader.test.js b/packages/mui-material/src/CardHeader/CardHeader.test.js index 3d4ed04c31d92d..59de5b89f0e2fe 100644 --- a/packages/mui-material/src/CardHeader/CardHeader.test.js +++ b/packages/mui-material/src/CardHeader/CardHeader.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import { typographyClasses } from '@mui/material/Typography'; import CardHeader, { cardHeaderClasses as classes } from '@mui/material/CardHeader'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CardMedia/CardMedia.test.js b/packages/mui-material/src/CardMedia/CardMedia.test.js index c42d49cdc9312a..294346fe273fc7 100644 --- a/packages/mui-material/src/CardMedia/CardMedia.test.js +++ b/packages/mui-material/src/CardMedia/CardMedia.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { createClientRender, describeConformance, screen } from 'test/utils'; +import { createRenderer, describeConformance, screen } from 'test/utils'; import CardMedia, { cardMediaClasses as classes } from '@mui/material/CardMedia'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Checkbox/Checkbox.test.js b/packages/mui-material/src/Checkbox/Checkbox.test.js index 26a3f6ac6fc09d..c078350acb38ed 100644 --- a/packages/mui-material/src/Checkbox/Checkbox.test.js +++ b/packages/mui-material/src/Checkbox/Checkbox.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import Checkbox, { checkboxClasses as classes } from '@mui/material/Checkbox'; import FormControl from '@mui/material/FormControl'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Chip/Chip.test.js b/packages/mui-material/src/Chip/Chip.test.js index 3da08622a2da25..318e7ae702a29a 100644 --- a/packages/mui-material/src/Chip/Chip.test.js +++ b/packages/mui-material/src/Chip/Chip.test.js @@ -4,7 +4,7 @@ import { spy, stub } from 'sinon'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, focusVisible, simulatePointerDevice, @@ -16,7 +16,7 @@ import { ThemeProvider, createTheme } from '@mui/material/styles'; import CheckBox from '../internal/svg-icons/CheckBox'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/CircularProgress/CircularProgress.test.js b/packages/mui-material/src/CircularProgress/CircularProgress.test.js index ba2885d2e44f7c..9df1871fea0270 100644 --- a/packages/mui-material/src/CircularProgress/CircularProgress.test.js +++ b/packages/mui-material/src/CircularProgress/CircularProgress.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import CircularProgress, { circularProgressClasses as classes, } from '@mui/material/CircularProgress'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Collapse/Collapse.test.js b/packages/mui-material/src/Collapse/Collapse.test.js index 1f919566e00728..d8d708f124d466 100644 --- a/packages/mui-material/src/Collapse/Collapse.test.js +++ b/packages/mui-material/src/Collapse/Collapse.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createRenderer, describeConformance } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import { Transition } from 'react-transition-group'; import Collapse, { collapseClasses as classes } from '@mui/material/Collapse'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { in: true, diff --git a/packages/mui-material/src/Container/Container.test.js b/packages/mui-material/src/Container/Container.test.js index a2d5021dec9e11..fa1b005a0f2c18 100644 --- a/packages/mui-material/src/Container/Container.test.js +++ b/packages/mui-material/src/Container/Container.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import Container, { containerClasses as classes } from '@mui/material/Container'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { children:
, diff --git a/packages/mui-material/src/CssBaseline/CssBaseline.test.js b/packages/mui-material/src/CssBaseline/CssBaseline.test.js index 49deab5f4f5851..dd3490b71b940f 100644 --- a/packages/mui-material/src/CssBaseline/CssBaseline.test.js +++ b/packages/mui-material/src/CssBaseline/CssBaseline.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import CssBaseline from '@mui/material/CssBaseline'; import { ThemeProvider, createTheme } from '@mui/material/styles'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('renders its children', () => { const { container } = render( diff --git a/packages/mui-material/src/Dialog/Dialog.test.js b/packages/mui-material/src/Dialog/Dialog.test.js index 5f781c797da55a..85631bc3c3a5dc 100644 --- a/packages/mui-material/src/Dialog/Dialog.test.js +++ b/packages/mui-material/src/Dialog/Dialog.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import Modal from '@mui/material/Modal'; import Dialog, { dialogClasses as classes } from '@mui/material/Dialog'; @@ -41,7 +41,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/DialogActions/DialogActions.test.js b/packages/mui-material/src/DialogActions/DialogActions.test.js index e6e7747cc1b3aa..e852dc8669a48a 100644 --- a/packages/mui-material/src/DialogActions/DialogActions.test.js +++ b/packages/mui-material/src/DialogActions/DialogActions.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import DialogActions, { dialogActionsClasses as classes } from '@mui/material/DialogActions'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/DialogContent/DialogContent.test.js b/packages/mui-material/src/DialogContent/DialogContent.test.js index bf9568cc05f557..7c482c8f66772e 100644 --- a/packages/mui-material/src/DialogContent/DialogContent.test.js +++ b/packages/mui-material/src/DialogContent/DialogContent.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import DialogContent, { dialogContentClasses as classes } from '@mui/material/DialogContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/DialogContentText/DialogContentText.test.js b/packages/mui-material/src/DialogContentText/DialogContentText.test.js index 3a868f2e39d944..19c1b639ee40c7 100644 --- a/packages/mui-material/src/DialogContentText/DialogContentText.test.js +++ b/packages/mui-material/src/DialogContentText/DialogContentText.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography from '@mui/material/Typography'; import DialogContentText, { dialogContentTextClasses as classes, } from '@mui/material/DialogContentText'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(foo, () => ({ classes, diff --git a/packages/mui-material/src/DialogTitle/DialogTitle.test.js b/packages/mui-material/src/DialogTitle/DialogTitle.test.js index 7366b4cd20c57f..7d43695aff8dbd 100644 --- a/packages/mui-material/src/DialogTitle/DialogTitle.test.js +++ b/packages/mui-material/src/DialogTitle/DialogTitle.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import DialogTitle, { dialogTitleClasses as classes } from '@mui/material/DialogTitle'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(foo, () => ({ classes, diff --git a/packages/mui-material/src/Divider/Divider.test.js b/packages/mui-material/src/Divider/Divider.test.js index 55e77943d5a263..91280cfa6e0419 100644 --- a/packages/mui-material/src/Divider/Divider.test.js +++ b/packages/mui-material/src/Divider/Divider.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import Divider, { dividerClasses as classes } from '@mui/material/Divider'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Drawer/Drawer.test.js b/packages/mui-material/src/Drawer/Drawer.test.js index 11d11fa836ecf9..95022183be337b 100644 --- a/packages/mui-material/src/Drawer/Drawer.test.js +++ b/packages/mui-material/src/Drawer/Drawer.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { useFakeTimers, spy } from 'sinon'; -import { act, createClientRender, describeConformance, screen } from 'test/utils'; +import { act, createRenderer, describeConformance, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import Drawer, { drawerClasses as classes } from '@mui/material/Drawer'; import { getAnchor, isHorizontal } from './Drawer'; @@ -18,7 +18,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/Fab/Fab.test.js b/packages/mui-material/src/Fab/Fab.test.js index b932cd6edb651f..20976884253978 100644 --- a/packages/mui-material/src/Fab/Fab.test.js +++ b/packages/mui-material/src/Fab/Fab.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { describeConformance, - createClientRender, + createRenderer, createServerRender, act, fireEvent, @@ -12,7 +12,7 @@ import ButtonBase, { touchRippleClasses } from '@mui/material/ButtonBase'; import Icon from '@mui/material/Icon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance?, () => ({ classes, diff --git a/packages/mui-material/src/Fade/Fade.test.js b/packages/mui-material/src/Fade/Fade.test.js index ecdec9d9cca5a3..6c4e37c0f9ae63 100644 --- a/packages/mui-material/src/Fade/Fade.test.js +++ b/packages/mui-material/src/Fade/Fade.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createRenderer, describeConformance } from 'test/utils'; import { Transition } from 'react-transition-group'; import Fade from '@mui/material/Fade'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { in: true, diff --git a/packages/mui-material/src/FilledInput/FilledInput.test.js b/packages/mui-material/src/FilledInput/FilledInput.test.js index eaadc97487981a..8619f5bef0ec15 100644 --- a/packages/mui-material/src/FilledInput/FilledInput.test.js +++ b/packages/mui-material/src/FilledInput/FilledInput.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import FilledInput, { filledInputClasses as classes } from '@mui/material/FilledInput'; import InputBase from '@mui/material/InputBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/FormControl/FormControl.test.js b/packages/mui-material/src/FormControl/FormControl.test.js index 5f2d418532c8bb..f1025f2554b25d 100644 --- a/packages/mui-material/src/FormControl/FormControl.test.js +++ b/packages/mui-material/src/FormControl/FormControl.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import FormControl, { formControlClasses as classes } from '@mui/material/FormControl'; import Input from '@mui/material/Input'; import Select from '@mui/material/Select'; import useFormControl from './useFormControl'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function TestComponent(props) { const context = useFormControl(); diff --git a/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js b/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js index 20fc7aadd5292c..01484bcd8dd480 100644 --- a/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js +++ b/packages/mui-material/src/FormControlLabel/FormControlLabel.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import FormControlLabel, { formControlLabelClasses as classes, } from '@mui/material/FormControlLabel'; @@ -9,7 +9,7 @@ import FormControl from '@mui/material/FormControl'; import Typography from '@mui/material/Typography'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(} />, () => ({ classes, diff --git a/packages/mui-material/src/FormGroup/FormGroup.test.js b/packages/mui-material/src/FormGroup/FormGroup.test.js index 558e21ca00b6e5..afcc15a24dd186 100644 --- a/packages/mui-material/src/FormGroup/FormGroup.test.js +++ b/packages/mui-material/src/FormGroup/FormGroup.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import FormGroup, { formGroupClasses as classes } from '@mui/material/FormGroup'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/FormHelperText/FormHelperText.test.js b/packages/mui-material/src/FormHelperText/FormHelperText.test.js index d1ab469ec62b31..9d367aac2a5f07 100644 --- a/packages/mui-material/src/FormHelperText/FormHelperText.test.js +++ b/packages/mui-material/src/FormHelperText/FormHelperText.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import FormHelperText, { formHelperTextClasses as classes } from '@mui/material/FormHelperText'; import FormControl from '@mui/material/FormControl'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/FormLabel/FormLabel.test.js b/packages/mui-material/src/FormLabel/FormLabel.test.js index e92eae1acfae69..3fd3411cd7756a 100644 --- a/packages/mui-material/src/FormLabel/FormLabel.test.js +++ b/packages/mui-material/src/FormLabel/FormLabel.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import FormLabel, { formLabelClasses as classes } from '@mui/material/FormLabel'; import FormControl, { useFormControl } from '@mui/material/FormControl'; import { hexToRgb } from '@mui/material/styles'; import defaultTheme from '../styles/defaultTheme'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js b/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js index 5664d2722bd981..17f9fb7086a77a 100644 --- a/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js +++ b/packages/mui-material/src/GlobalStyles/GlobalStyles.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import GlobalStyles from '@mui/material/GlobalStyles'; import { ThemeProvider, createTheme } from '@mui/material//styles/'; @@ -9,7 +9,7 @@ const customTheme = createTheme({ }); describe('Global', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should provide default theme', function test() { if (/jsdom/.test(window.navigator.userAgent)) { diff --git a/packages/mui-material/src/Grid/Grid.test.js b/packages/mui-material/src/Grid/Grid.test.js index 0cf677aaba9fc7..5d83de49775141 100644 --- a/packages/mui-material/src/Grid/Grid.test.js +++ b/packages/mui-material/src/Grid/Grid.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender, screen } from 'test/utils'; +import { describeConformance, createRenderer, screen } from 'test/utils'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import defaultTheme from '@mui/material/styles/defaultTheme'; import Grid, { gridClasses as classes } from '@mui/material/Grid'; import { generateRowGap, generateColumnGap, generateDirection } from './Grid'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Grow/Grow.test.js b/packages/mui-material/src/Grow/Grow.test.js index ef0f6c351a9525..c3065874711834 100644 --- a/packages/mui-material/src/Grow/Grow.test.js +++ b/packages/mui-material/src/Grow/Grow.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createRenderer, describeConformance } from 'test/utils'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import { Transition } from 'react-transition-group'; import Grow from '@mui/material/Grow'; import useForkRef from '../utils/useForkRef'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { in: true, diff --git a/packages/mui-material/src/Hidden/Hidden.test.js b/packages/mui-material/src/Hidden/Hidden.test.js index 52dda28e0a6afd..2ab58034152857 100644 --- a/packages/mui-material/src/Hidden/Hidden.test.js +++ b/packages/mui-material/src/Hidden/Hidden.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import Hidden from '@mui/material/Hidden'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const child = Hello; describe('prop: implementation', () => { diff --git a/packages/mui-material/src/Hidden/HiddenCss.test.js b/packages/mui-material/src/Hidden/HiddenCss.test.js index 502bc2f8f6e4c9..0202625e1fd2c8 100644 --- a/packages/mui-material/src/Hidden/HiddenCss.test.js +++ b/packages/mui-material/src/Hidden/HiddenCss.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, strictModeDoubleLoggingSupressed } from 'test/utils'; +import { createRenderer, strictModeDoubleLoggingSupressed } from 'test/utils'; import HiddenCss from './HiddenCss'; import { createTheme, ThemeProvider } from '../styles'; import classes from './hiddenCssClasses'; @@ -8,7 +8,7 @@ import classes from './hiddenCssClasses'; const TestChild = () =>
bar
; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('the generated class names', () => { it('should be ok with only', () => { diff --git a/packages/mui-material/src/Hidden/HiddenJs.test.js b/packages/mui-material/src/Hidden/HiddenJs.test.js index 75993c82f4b2ef..d96dab021d81da 100644 --- a/packages/mui-material/src/Hidden/HiddenJs.test.js +++ b/packages/mui-material/src/Hidden/HiddenJs.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import HiddenJs from './HiddenJs'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function resolvePropName(upDownOnly, breakpoint) { if (upDownOnly === 'only') { diff --git a/packages/mui-material/src/Icon/Icon.test.js b/packages/mui-material/src/Icon/Icon.test.js index 79d6755fb4e1b4..e1c22af46319d5 100644 --- a/packages/mui-material/src/Icon/Icon.test.js +++ b/packages/mui-material/src/Icon/Icon.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Icon, { iconClasses as classes } from '@mui/material/Icon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(account_circle, () => ({ classes, diff --git a/packages/mui-material/src/IconButton/IconButton.test.js b/packages/mui-material/src/IconButton/IconButton.test.js index 9cf5551cf3850e..46e11cadc8a166 100644 --- a/packages/mui-material/src/IconButton/IconButton.test.js +++ b/packages/mui-material/src/IconButton/IconButton.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import IconButton, { iconButtonClasses as classes } from '@mui/material/IconButton'; import Icon from '@mui/material/Icon'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(book, () => ({ classes, diff --git a/packages/mui-material/src/ImageList/ImageList.test.js b/packages/mui-material/src/ImageList/ImageList.test.js index 7d5d4322d785ab..ff7b1fba9b41a3 100644 --- a/packages/mui-material/src/ImageList/ImageList.test.js +++ b/packages/mui-material/src/ImageList/ImageList.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ImageList, { imageListClasses as classes } from '@mui/material/ImageList'; const itemsData = [ @@ -17,7 +17,7 @@ const itemsData = [ ]; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/ImageListItem/ImageListItem.test.js b/packages/mui-material/src/ImageListItem/ImageListItem.test.js index 0bd343301a3993..d5be030ecccdde 100644 --- a/packages/mui-material/src/ImageListItem/ImageListItem.test.js +++ b/packages/mui-material/src/ImageListItem/ImageListItem.test.js @@ -1,11 +1,11 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ImageList from '@mui/material/ImageList'; import ImageListItem, { imageListItemClasses as classes } from '@mui/material/ImageListItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js index 692481341820b0..d1165a5c0595f3 100644 --- a/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js +++ b/packages/mui-material/src/ImageListItemBar/ImageListItemBar.test.js @@ -1,12 +1,12 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ImageListItemBar, { imageListItemBarClasses as classes, } from '@mui/material/ImageListItemBar'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Input/Input.test.js b/packages/mui-material/src/Input/Input.test.js index 447ed3339bbf7c..6329287a95c925 100644 --- a/packages/mui-material/src/Input/Input.test.js +++ b/packages/mui-material/src/Input/Input.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import InputBase from '@mui/material/InputBase'; import Input, { inputClasses as classes } from '@mui/material/Input'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/InputAdornment/InputAdornment.test.js b/packages/mui-material/src/InputAdornment/InputAdornment.test.js index 28df275503e852..9448bd91a17340 100644 --- a/packages/mui-material/src/InputAdornment/InputAdornment.test.js +++ b/packages/mui-material/src/InputAdornment/InputAdornment.test.js @@ -1,10 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { - createClientRender, - describeConformance, - strictModeDoubleLoggingSupressed, -} from 'test/utils'; +import { createRenderer, describeConformance, strictModeDoubleLoggingSupressed } from 'test/utils'; import { typographyClasses } from '@mui/material/Typography'; import InputAdornment, { inputAdornmentClasses as classes } from '@mui/material/InputAdornment'; import TextField from '@mui/material/TextField'; @@ -12,7 +8,7 @@ import FormControl from '@mui/material/FormControl'; import Input from '@mui/material/Input'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(foo, () => ({ classes, diff --git a/packages/mui-material/src/InputBase/InputBase.test.js b/packages/mui-material/src/InputBase/InputBase.test.js index 85933dc877a660..d355375582f890 100644 --- a/packages/mui-material/src/InputBase/InputBase.test.js +++ b/packages/mui-material/src/InputBase/InputBase.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import FormControl, { useFormControl } from '@mui/material/FormControl'; import InputAdornment from '@mui/material/InputAdornment'; import TextField from '@mui/material/TextField'; @@ -12,7 +12,7 @@ import { createTheme } from '@mui/material/styles'; import { ThemeProvider } from '@emotion/react'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/InputLabel/InputLabel.test.js b/packages/mui-material/src/InputLabel/InputLabel.test.js index c060a82161a672..c1d5264b5582c4 100644 --- a/packages/mui-material/src/InputLabel/InputLabel.test.js +++ b/packages/mui-material/src/InputLabel/InputLabel.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import FormControl from '@mui/material/FormControl'; import Input from '@mui/material/Input'; import FormLabel from '@mui/material/FormLabel'; import InputLabel, { inputLabelClasses as classes } from '@mui/material/InputLabel'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Foo, () => ({ classes, diff --git a/packages/mui-material/src/LinearProgress/LinearProgress.test.js b/packages/mui-material/src/LinearProgress/LinearProgress.test.js index df7f9270ac18b8..871b90b75351ea 100644 --- a/packages/mui-material/src/LinearProgress/LinearProgress.test.js +++ b/packages/mui-material/src/LinearProgress/LinearProgress.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { - createClientRender, + createRenderer, screen, describeConformance, strictModeDoubleLoggingSupressed, @@ -9,7 +9,7 @@ import { import LinearProgress, { linearProgressClasses as classes } from '@mui/material/LinearProgress'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Link/Link.test.js b/packages/mui-material/src/Link/Link.test.js index dd6276ce6c8980..40b7fd93e14148 100644 --- a/packages/mui-material/src/Link/Link.test.js +++ b/packages/mui-material/src/Link/Link.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, createClientRender, fireEvent, describeConformance } from 'test/utils'; +import { act, createRenderer, fireEvent, describeConformance } from 'test/utils'; import Link, { linkClasses as classes } from '@mui/material/Link'; import Typography, { typographyClasses } from '@mui/material/Typography'; @@ -14,7 +14,7 @@ function focusVisible(element) { } describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Home, () => ({ classes, diff --git a/packages/mui-material/src/List/List.test.js b/packages/mui-material/src/List/List.test.js index 5c7a5796a22b95..dbaaed4f12af2d 100644 --- a/packages/mui-material/src/List/List.test.js +++ b/packages/mui-material/src/List/List.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import ListSubheader, { listSubheaderClasses } from '@mui/material/ListSubheader'; import ListItem, { listItemClasses } from '@mui/material/ListItem'; import List, { listClasses as classes } from '@mui/material/List'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ListItem/ListItem.test.js b/packages/mui-material/src/ListItem/ListItem.test.js index 30fa927d340498..a073d0a1dfb84d 100644 --- a/packages/mui-material/src/ListItem/ListItem.test.js +++ b/packages/mui-material/src/ListItem/ListItem.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { describeConformance, act, createClientRender, fireEvent, queries } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, queries } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import ListItemText from '@mui/material/ListItemText'; import ListItemSecondaryAction from '@mui/material/ListItemSecondaryAction'; @@ -13,7 +13,7 @@ const NoContent = React.forwardRef(() => { }); describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js b/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js index 67184a9febec8d..76ddec77e5a99e 100644 --- a/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js +++ b/packages/mui-material/src/ListItemAvatar/ListItemAvatar.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ListItemAvatar, { listItemAvatarClasses as classes } from '@mui/material/ListItemAvatar'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/ListItemButton/ListItemButton.test.js b/packages/mui-material/src/ListItemButton/ListItemButton.test.js index 681f069d1f7c30..c95b097a2f4a58 100644 --- a/packages/mui-material/src/ListItemButton/ListItemButton.test.js +++ b/packages/mui-material/src/ListItemButton/ListItemButton.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent } from 'test/utils'; import ListItemButton, { listItemButtonClasses as classes } from '@mui/material/ListItemButton'; import ButtonBase from '@mui/material/ButtonBase'; import ListContext from '../List/ListContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js b/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js index 541a2d2b766279..5c8b2482458e8e 100644 --- a/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js +++ b/packages/mui-material/src/ListItemIcon/ListItemIcon.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ListItemIcon, { listItemIconClasses as classes } from '@mui/material/ListItemIcon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js b/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js index 9feb28464d1224..e2e16012d35203 100644 --- a/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js +++ b/packages/mui-material/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import ListItem from '@mui/material/ListItem'; import ListItemSecondaryAction, { listItemSecondaryActionClasses as classes, } from '@mui/material/ListItemSecondaryAction'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ListItemText/ListItemText.test.js b/packages/mui-material/src/ListItemText/ListItemText.test.js index 99af310b86957b..e97b2f148494ff 100644 --- a/packages/mui-material/src/ListItemText/ListItemText.test.js +++ b/packages/mui-material/src/ListItemText/ListItemText.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography, { typographyClasses } from '@mui/material/Typography'; import ListItemText, { listItemTextClasses as classes } from '@mui/material/ListItemText'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Conformance?, () => ({ classes, diff --git a/packages/mui-material/src/ListSubheader/ListSubheader.test.js b/packages/mui-material/src/ListSubheader/ListSubheader.test.js index 2307b2b7d09025..a22f9dcc689f64 100644 --- a/packages/mui-material/src/ListSubheader/ListSubheader.test.js +++ b/packages/mui-material/src/ListSubheader/ListSubheader.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import ListSubheader, { listSubheaderClasses as classes } from '@mui/material/ListSubheader'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Menu/Menu.test.js b/packages/mui-material/src/Menu/Menu.test.js index e9e3e9e000e3a6..0177ee7be506b8 100644 --- a/packages/mui-material/src/Menu/Menu.test.js +++ b/packages/mui-material/src/Menu/Menu.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { spy, useFakeTimers } from 'sinon'; import { expect } from 'chai'; import { - createClientRender, + createRenderer, describeConformance, screen, fireEvent, @@ -23,7 +23,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( document.createElement('div')} open />, () => ({ classes, diff --git a/packages/mui-material/src/MenuItem/MenuItem.test.js b/packages/mui-material/src/MenuItem/MenuItem.test.js index a1121ab129d1b7..4289ae49302788 100644 --- a/packages/mui-material/src/MenuItem/MenuItem.test.js +++ b/packages/mui-material/src/MenuItem/MenuItem.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeConformance, createClientRender, fireEvent, screen } from 'test/utils'; +import { act, describeConformance, createRenderer, fireEvent, screen } from 'test/utils'; import MenuItem, { menuItemClasses as classes } from '@mui/material/MenuItem'; import ButtonBase from '@mui/material/ButtonBase'; import ListContext from '../List/ListContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/MenuList/MenuList.test.js b/packages/mui-material/src/MenuList/MenuList.test.js index 2846bbb37676d1..037c82baad3663 100644 --- a/packages/mui-material/src/MenuList/MenuList.test.js +++ b/packages/mui-material/src/MenuList/MenuList.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { stub } from 'sinon'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import MenuList from '@mui/material/MenuList'; import List from '@mui/material/List'; import getScrollbarSize from '../utils/getScrollbarSize'; @@ -17,7 +17,7 @@ function setStyleWidthForJsdomOrBrowser(style, width) { } describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes: {}, diff --git a/packages/mui-material/src/MobileStepper/MobileStepper.test.js b/packages/mui-material/src/MobileStepper/MobileStepper.test.js index e58658341afd51..1e1cf73e140013 100644 --- a/packages/mui-material/src/MobileStepper/MobileStepper.test.js +++ b/packages/mui-material/src/MobileStepper/MobileStepper.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance, screen } from 'test/utils'; +import { createRenderer, describeConformance, screen } from 'test/utils'; import Paper, { paperClasses } from '@mui/material/Paper'; import Button from '@mui/material/Button'; import MobileStepper, { mobileStepperClasses as classes } from '@mui/material/MobileStepper'; @@ -8,7 +8,7 @@ import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight'; import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { steps: 2, nextButton: ( diff --git a/packages/mui-material/src/Modal/Modal.test.js b/packages/mui-material/src/Modal/Modal.test.js index 4e1c2c2c56fc03..e9944f9a0d3550 100644 --- a/packages/mui-material/src/Modal/Modal.test.js +++ b/packages/mui-material/src/Modal/Modal.test.js @@ -3,20 +3,13 @@ import * as ReactDOM from 'react-dom'; import { expect } from 'chai'; import { useFakeTimers, spy } from 'sinon'; import PropTypes from 'prop-types'; -import { - act, - createClientRender, - fireEvent, - within, - describeConformance, - screen, -} from 'test/utils'; +import { act, createRenderer, fireEvent, within, describeConformance, screen } from 'test/utils'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import Fade from '@mui/material/Fade'; import Modal, { modalClasses as classes } from '@mui/material/Modal'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); let savedBodyStyle; diff --git a/packages/mui-material/src/NativeSelect/NativeSelect.test.js b/packages/mui-material/src/NativeSelect/NativeSelect.test.js index 7c09c72fe091fa..c2a03aeea90703 100644 --- a/packages/mui-material/src/NativeSelect/NativeSelect.test.js +++ b/packages/mui-material/src/NativeSelect/NativeSelect.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { createTheme, ThemeProvider, styled } from '@mui/material/styles'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import NativeSelect, { nativeSelectClasses as classes } from '@mui/material/NativeSelect'; import Input, { inputClasses } from '@mui/material/Input'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { input: , children: [ diff --git a/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js b/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js index e01295d3b225b1..6f2e378f02e951 100644 --- a/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js +++ b/packages/mui-material/src/NativeSelect/NativeSelectInput.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createRenderer, fireEvent } from 'test/utils'; import NativeSelectInput from './NativeSelectInput'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ only: ['refForwarding'], diff --git a/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js b/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js index bbda1951b86407..fa34fa49527135 100644 --- a/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js +++ b/packages/mui-material/src/OutlinedInput/NotchedOutline.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import NotchedOutline from './NotchedOutline'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { notched: true, diff --git a/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js b/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js index a7f1bbf4e36728..6fa7d8044c5588 100644 --- a/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js +++ b/packages/mui-material/src/OutlinedInput/OutlinedInput.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import OutlinedInput, { outlinedInputClasses as classes } from '@mui/material/OutlinedInput'; import InputBase from '@mui/material/InputBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Pagination/Pagination.test.js b/packages/mui-material/src/Pagination/Pagination.test.js index 33d8f2b8c79d53..efe1ae31100c3f 100644 --- a/packages/mui-material/src/Pagination/Pagination.test.js +++ b/packages/mui-material/src/Pagination/Pagination.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import Pagination, { paginationClasses as classes } from '@mui/material/Pagination'; import { paginationItemClasses } from '@mui/material/PaginationItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/PaginationItem/PaginationItem.test.js b/packages/mui-material/src/PaginationItem/PaginationItem.test.js index 60b052f7c40a71..bb659e8e26678b 100644 --- a/packages/mui-material/src/PaginationItem/PaginationItem.test.js +++ b/packages/mui-material/src/PaginationItem/PaginationItem.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import PaginationItem, { paginationItemClasses as classes } from '@mui/material/PaginationItem'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Paper/Paper.test.js b/packages/mui-material/src/Paper/Paper.test.js index 9b2f4adb2a0777..8aed1af0c94494 100644 --- a/packages/mui-material/src/Paper/Paper.test.js +++ b/packages/mui-material/src/Paper/Paper.test.js @@ -1,16 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { - createClientRender, - describeConformance, - strictModeDoubleLoggingSupressed, -} from 'test/utils'; +import { createRenderer, describeConformance, strictModeDoubleLoggingSupressed } from 'test/utils'; import Paper, { paperClasses as classes } from '@mui/material/Paper'; import { createTheme, ThemeProvider } from '@mui/material/styles'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Popover/Popover.test.js b/packages/mui-material/src/Popover/Popover.test.js index bf2575e5ac25de..60fcfd3ed11d75 100644 --- a/packages/mui-material/src/Popover/Popover.test.js +++ b/packages/mui-material/src/Popover/Popover.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub, useFakeTimers } from 'sinon'; -import { act, createMount, createClientRender, describeConformance, screen } from 'test/utils'; +import { act, createMount, createRenderer, describeConformance, screen } from 'test/utils'; import PropTypes from 'prop-types'; import Grow from '@mui/material/Grow'; import Modal from '@mui/material/Modal'; @@ -46,7 +46,7 @@ describe('', () => { }); const mount = createMount(); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( document.createElement('div')} open />, () => ({ classes, diff --git a/packages/mui-material/src/Radio/Radio.test.js b/packages/mui-material/src/Radio/Radio.test.js index 17934bcd862e46..1baac9c16566be 100644 --- a/packages/mui-material/src/Radio/Radio.test.js +++ b/packages/mui-material/src/Radio/Radio.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import Radio, { radioClasses as classes } from '@mui/material/Radio'; import FormControl from '@mui/material/FormControl'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/RadioGroup/RadioGroup.test.js b/packages/mui-material/src/RadioGroup/RadioGroup.test.js index 96cb3761b620c4..573f4bc2f82350 100644 --- a/packages/mui-material/src/RadioGroup/RadioGroup.test.js +++ b/packages/mui-material/src/RadioGroup/RadioGroup.test.js @@ -2,13 +2,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; import PropTypes from 'prop-types'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import FormGroup from '@mui/material/FormGroup'; import Radio from '@mui/material/Radio'; import RadioGroup, { useRadioGroup } from '@mui/material/RadioGroup'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes: {}, diff --git a/packages/mui-material/src/Rating/Rating.test.js b/packages/mui-material/src/Rating/Rating.test.js index e62ec4feb1f97f..402e9903ecf2ee 100644 --- a/packages/mui-material/src/Rating/Rating.test.js +++ b/packages/mui-material/src/Rating/Rating.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; import { stub, spy } from 'sinon'; -import { act, describeConformance, createClientRender, fireEvent, screen } from 'test/utils'; +import { act, describeConformance, createRenderer, fireEvent, screen } from 'test/utils'; import Rating, { ratingClasses as classes } from '@mui/material/Rating'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js b/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js index d02241d51dd631..860223aba311d7 100644 --- a/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js +++ b/packages/mui-material/src/ScopedCssBaseline/ScopedCssBaseline.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import ScopedCssBaseline, { scopedCssBaselineClasses as classes, } from '@mui/material/ScopedCssBaseline'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Select/Select.test.js b/packages/mui-material/src/Select/Select.test.js index fc3c59ba5d4838..b33d0eaabe0497 100644 --- a/packages/mui-material/src/Select/Select.test.js +++ b/packages/mui-material/src/Select/Select.test.js @@ -5,7 +5,7 @@ import { describeConformance, ErrorBoundary, act, - createClientRender, + createRenderer, fireEvent, screen, } from 'test/utils'; @@ -30,7 +30,7 @@ describe(', () => ({ classes, diff --git a/packages/mui-material/src/Skeleton/Skeleton.test.js b/packages/mui-material/src/Skeleton/Skeleton.test.js index 0193c5a0d225ec..8ec3201c3c7ef1 100644 --- a/packages/mui-material/src/Skeleton/Skeleton.test.js +++ b/packages/mui-material/src/Skeleton/Skeleton.test.js @@ -1,10 +1,10 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Skeleton, { skeletonClasses as classes } from '@mui/material/Skeleton'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Slide/Slide.test.js b/packages/mui-material/src/Slide/Slide.test.js index e4641a05a31a12..8b23b441bdf573 100644 --- a/packages/mui-material/src/Slide/Slide.test.js +++ b/packages/mui-material/src/Slide/Slide.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createRenderer, describeConformance } from 'test/utils'; import { createTheme } from '@mui/material/styles'; import { Transition } from 'react-transition-group'; import Slide from '@mui/material/Slide'; @@ -9,7 +9,7 @@ import { setTranslateValue } from './Slide'; import { useForkRef } from '../utils'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const defaultProps = { in: true, diff --git a/packages/mui-material/src/Slider/Slider.test.js b/packages/mui-material/src/Slider/Slider.test.js index 59e73bcbd77f3b..3d48e6555c4eca 100644 --- a/packages/mui-material/src/Slider/Slider.test.js +++ b/packages/mui-material/src/Slider/Slider.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { spy, stub } from 'sinon'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@mui/material/styles'; import { SliderUnstyled } from '@mui/core'; import Slider, { sliderClasses as classes } from '@mui/material/Slider'; @@ -27,7 +27,7 @@ describe('', () => { } }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Snackbar/Snackbar.test.js b/packages/mui-material/src/Snackbar/Snackbar.test.js index 4c621efe7e3fad..a59b7787811148 100644 --- a/packages/mui-material/src/Snackbar/Snackbar.test.js +++ b/packages/mui-material/src/Snackbar/Snackbar.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent } from 'test/utils'; import Snackbar, { snackbarClasses as classes } from '@mui/material/Snackbar'; describe('', () => { @@ -17,7 +17,7 @@ describe('', () => { clock.restore(); }); - const clientRender = createClientRender(); + const { render: clientRender } = createRenderer(); /** * @type {typeof plainRender extends (...args: infer T) => any ? T : enver} args * diff --git a/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js b/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js index 5a72c5d9211448..82098f59278357 100644 --- a/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js +++ b/packages/mui-material/src/SnackbarContent/SnackbarContent.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Paper from '@mui/material/Paper'; import SnackbarContent, { snackbarContentClasses as classes } from '@mui/material/SnackbarContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/SpeedDial/SpeedDial.test.js b/packages/mui-material/src/SpeedDial/SpeedDial.test.js index 3772229e9f882a..8be27388b5830e 100644 --- a/packages/mui-material/src/SpeedDial/SpeedDial.test.js +++ b/packages/mui-material/src/SpeedDial/SpeedDial.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; import { - createClientRender, + createRenderer, act, fireEvent, fireDiscreteEvent, @@ -25,7 +25,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); const icon = font_icon; const FakeAction = () =>
; diff --git a/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js b/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js index 00e8978a89acd6..59d268d1c171f3 100644 --- a/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js +++ b/packages/mui-material/src/SpeedDialAction/SpeedDialAction.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent } from 'test/utils'; import { useFakeTimers } from 'sinon'; import Icon from '@mui/material/Icon'; import Tooltip from '@mui/material/Tooltip'; @@ -17,7 +17,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( add} tooltipTitle="placeholder" />, diff --git a/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js b/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js index b24a216a7a1c68..fd09ff38ce2d0b 100644 --- a/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js +++ b/packages/mui-material/src/SpeedDialIcon/SpeedDialIcon.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Icon from '@mui/material/Icon'; import SpeedDialIcon, { speedDialIconClasses as classes } from '@mui/material/SpeedDialIcon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); const icon = font_icon; describeConformance(, () => ({ diff --git a/packages/mui-material/src/Stack/Stack.test.js b/packages/mui-material/src/Stack/Stack.test.js index 579980838e0c13..c96e49213ebf66 100644 --- a/packages/mui-material/src/Stack/Stack.test.js +++ b/packages/mui-material/src/Stack/Stack.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Stack from '@mui/material/Stack'; import { createTheme } from '@mui/material/styles'; import defaultTheme from '@mui/material/styles/defaultTheme'; import { style } from './Stack'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ render, diff --git a/packages/mui-material/src/Step/Step.test.js b/packages/mui-material/src/Step/Step.test.js index 24b6f1e124ed08..4f652e66b0f1f3 100644 --- a/packages/mui-material/src/Step/Step.test.js +++ b/packages/mui-material/src/Step/Step.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Step, { stepClasses as classes } from '@mui/material/Step'; import Stepper from '@mui/material/Stepper'; import StepLabel, { stepLabelClasses } from '@mui/material/StepLabel'; import StepButton, { stepButtonClasses } from '@mui/material/StepButton'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/StepButton/StepButton.test.js b/packages/mui-material/src/StepButton/StepButton.test.js index 8779109e64ba27..a44057dc800091 100644 --- a/packages/mui-material/src/StepButton/StepButton.test.js +++ b/packages/mui-material/src/StepButton/StepButton.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import { fireEvent } from '@testing-library/dom'; import StepButton, { stepButtonClasses as classes } from '@mui/material/StepButton'; import Step from '@mui/material/Step'; @@ -9,7 +9,7 @@ import StepLabel, { stepLabelClasses } from '@mui/material/StepLabel'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('internals', () => { describeConformance(, () => ({ diff --git a/packages/mui-material/src/StepConnector/StepConnector.test.js b/packages/mui-material/src/StepConnector/StepConnector.test.js index 5fc925d4a018f4..eff3dadaadcb4c 100644 --- a/packages/mui-material/src/StepConnector/StepConnector.test.js +++ b/packages/mui-material/src/StepConnector/StepConnector.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepConnector, { stepConnectorClasses as classes } from '@mui/material/StepConnector'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/StepContent/StepContent.test.js b/packages/mui-material/src/StepContent/StepContent.test.js index 148c152205b619..eb2b7bbd7e5f9c 100644 --- a/packages/mui-material/src/StepContent/StepContent.test.js +++ b/packages/mui-material/src/StepContent/StepContent.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import { collapseClasses } from '@mui/material/Collapse'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; import StepContent, { stepContentClasses as classes } from '@mui/material/StepContent'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/StepIcon/StepIcon.test.js b/packages/mui-material/src/StepIcon/StepIcon.test.js index 133a7f81918785..0bc49f279d115a 100644 --- a/packages/mui-material/src/StepIcon/StepIcon.test.js +++ b/packages/mui-material/src/StepIcon/StepIcon.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import StepIcon, { stepIconClasses as classes } from '@mui/material/StepIcon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/StepLabel/StepLabel.test.js b/packages/mui-material/src/StepLabel/StepLabel.test.js index 10718feba581ea..7f7837891a7ae3 100644 --- a/packages/mui-material/src/StepLabel/StepLabel.test.js +++ b/packages/mui-material/src/StepLabel/StepLabel.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography from '@mui/material/Typography'; import Stepper from '@mui/material/Stepper'; import Step from '@mui/material/Step'; @@ -8,7 +8,7 @@ import { stepIconClasses as iconClasses } from '@mui/material/StepIcon'; import StepLabel, { stepLabelClasses as classes } from '@mui/material/StepLabel'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Stepper/Stepper.test.tsx b/packages/mui-material/src/Stepper/Stepper.test.tsx index 20c18f6b429800..d031228d6129b0 100644 --- a/packages/mui-material/src/Stepper/Stepper.test.tsx +++ b/packages/mui-material/src/Stepper/Stepper.test.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Step, { StepProps, stepClasses } from '@mui/material/Step'; import StepLabel from '@mui/material/StepLabel'; import StepConnector, { stepConnectorClasses } from '@mui/material/StepConnector'; @@ -8,7 +8,7 @@ import StepContent, { stepContentClasses } from '@mui/material/StepContent'; import Stepper, { stepperClasses as classes } from '@mui/material/Stepper'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/SvgIcon/SvgIcon.test.js b/packages/mui-material/src/SvgIcon/SvgIcon.test.js index 52b7b89acbe451..b8f649b788eda1 100644 --- a/packages/mui-material/src/SvgIcon/SvgIcon.test.js +++ b/packages/mui-material/src/SvgIcon/SvgIcon.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, createClientRender } from 'test/utils'; +import { describeConformance, createRenderer } from 'test/utils'; import SvgIcon, { svgIconClasses as classes } from '@mui/material/SvgIcon'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); let path; diff --git a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js index f508bcee0e67f2..909ddbf12a00be 100644 --- a/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js +++ b/packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { fireEvent, createClientRender, describeConformance, screen } from 'test/utils'; +import { fireEvent, createRenderer, describeConformance, screen } from 'test/utils'; import PropTypes, { checkPropTypes } from 'prop-types'; import SwipeableDrawer from '@mui/material/SwipeableDrawer'; import Drawer, { drawerClasses } from '@mui/material/Drawer'; @@ -69,7 +69,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( {}} onClose={() => {}} open />, () => ({ classes: {}, diff --git a/packages/mui-material/src/Switch/Switch.test.js b/packages/mui-material/src/Switch/Switch.test.js index 44ebd4f26c5449..1c9a99278c1f89 100644 --- a/packages/mui-material/src/Switch/Switch.test.js +++ b/packages/mui-material/src/Switch/Switch.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createRenderer, fireEvent } from 'test/utils'; import Switch, { switchClasses as classes } from '@mui/material/Switch'; import FormControl from '@mui/material/FormControl'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Tab/Tab.test.js b/packages/mui-material/src/Tab/Tab.test.js index 80ac9fb8408141..9aada780240f64 100644 --- a/packages/mui-material/src/Tab/Tab.test.js +++ b/packages/mui-material/src/Tab/Tab.test.js @@ -3,10 +3,10 @@ import Tab, { tabClasses as classes } from '@mui/material/Tab'; import { expect } from 'chai'; import * as React from 'react'; import { spy } from 'sinon'; -import { act, createClientRender, describeConformance, fireEvent } from 'test/utils'; +import { act, createRenderer, describeConformance, fireEvent } from 'test/utils'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js b/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js index c37c72ec99388b..bb1f3036843736 100644 --- a/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js +++ b/packages/mui-material/src/TabScrollButton/TabScrollButton.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TabScrollButton, { tabScrollButtonClasses as classes } from '@mui/material/TabScrollButton'; describe('', () => { @@ -8,7 +8,7 @@ describe('', () => { direction: 'left', orientation: 'horizontal', }; - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Table/Table.test.js b/packages/mui-material/src/Table/Table.test.js index 075457b6ee4cb4..243748ef7c50fc 100644 --- a/packages/mui-material/src/Table/Table.test.js +++ b/packages/mui-material/src/Table/Table.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Table, { tableClasses as classes } from '@mui/material/Table'; import TableContext from './TableContext'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(
diff --git a/packages/mui-material/src/TableBody/TableBody.test.js b/packages/mui-material/src/TableBody/TableBody.test.js index a5bc1d6781c4dc..be1e4789899b8a 100644 --- a/packages/mui-material/src/TableBody/TableBody.test.js +++ b/packages/mui-material/src/TableBody/TableBody.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableBody, { tableBodyClasses as classes } from '@mui/material/TableBody'; import Tablelvl2Context from '../Table/Tablelvl2Context'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function renderInTable(node) { return render(
{node}
); diff --git a/packages/mui-material/src/TableCell/TableCell.test.js b/packages/mui-material/src/TableCell/TableCell.test.js index c55f2eac400285..99ee30b686a351 100644 --- a/packages/mui-material/src/TableCell/TableCell.test.js +++ b/packages/mui-material/src/TableCell/TableCell.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableCell, { tableCellClasses as classes } from '@mui/material/TableCell'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function renderInTable(node) { return render( diff --git a/packages/mui-material/src/TableContainer/TableContainer.test.js b/packages/mui-material/src/TableContainer/TableContainer.test.js index 0128d2078928fe..2c2f58b42d54d3 100644 --- a/packages/mui-material/src/TableContainer/TableContainer.test.js +++ b/packages/mui-material/src/TableContainer/TableContainer.test.js @@ -1,9 +1,9 @@ import * as React from 'react'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableContainer, { tableContainerClasses as classes } from '@mui/material/TableContainer'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/TableFooter/TableFooter.test.js b/packages/mui-material/src/TableFooter/TableFooter.test.js index 80573276cc2279..7a25ee32fb8ecf 100644 --- a/packages/mui-material/src/TableFooter/TableFooter.test.js +++ b/packages/mui-material/src/TableFooter/TableFooter.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableFooter, { tableFooterClasses as classes } from '@mui/material/TableFooter'; import Tablelvl2Context from '../Table/Tablelvl2Context'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function renderInTable(node) { return render(
{node}
); diff --git a/packages/mui-material/src/TableHead/TableHead.test.js b/packages/mui-material/src/TableHead/TableHead.test.js index 4ec9cf4a03cbfc..f24289d0411003 100644 --- a/packages/mui-material/src/TableHead/TableHead.test.js +++ b/packages/mui-material/src/TableHead/TableHead.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableHead, { tableHeadClasses as classes } from '@mui/material/TableHead'; import Tablelvl2Context from '../Table/Tablelvl2Context'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function renderInTable(node) { return render({node}
); } diff --git a/packages/mui-material/src/TablePagination/TablePagination.test.js b/packages/mui-material/src/TablePagination/TablePagination.test.js index be5b2dcd7c6138..8b7162de01350e 100644 --- a/packages/mui-material/src/TablePagination/TablePagination.test.js +++ b/packages/mui-material/src/TablePagination/TablePagination.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; import PropTypes from 'prop-types'; -import { describeConformance, fireEvent, createClientRender } from 'test/utils'; +import { describeConformance, fireEvent, createRenderer } from 'test/utils'; import TableFooter from '@mui/material/TableFooter'; import TableCell from '@mui/material/TableCell'; import TableRow from '@mui/material/TableRow'; @@ -10,7 +10,7 @@ import TablePagination, { tablePaginationClasses as classes } from '@mui/materia describe('', () => { const noop = () => {}; - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( , diff --git a/packages/mui-material/src/TableRow/TableRow.test.js b/packages/mui-material/src/TableRow/TableRow.test.js index 929b2081ad5ed1..0c19fb067d1169 100644 --- a/packages/mui-material/src/TableRow/TableRow.test.js +++ b/packages/mui-material/src/TableRow/TableRow.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import TableRow, { tableRowClasses as classes } from '@mui/material/TableRow'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); function renderInTable(node) { return render( diff --git a/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js b/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js index 552b951ebf2a16..20eeb8326c71e4 100644 --- a/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js +++ b/packages/mui-material/src/TableSortLabel/TableSortLabel.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import SortIcon from '@mui/icons-material/Sort'; import TableSortLabel, { tableSortLabelClasses as classes } from '@mui/material/TableSortLabel'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Tabs/ScrollbarSize.test.js b/packages/mui-material/src/Tabs/ScrollbarSize.test.js index f3e4faf701b086..e7d2280e97b5dc 100644 --- a/packages/mui-material/src/Tabs/ScrollbarSize.test.js +++ b/packages/mui-material/src/Tabs/ScrollbarSize.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers, stub } from 'sinon'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import ScrollbarSize from './ScrollbarSize'; describe('', () => { @@ -15,7 +15,7 @@ describe('', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); describe('mount', () => { it('should call on initial load', () => { diff --git a/packages/mui-material/src/Tabs/Tabs.test.js b/packages/mui-material/src/Tabs/Tabs.test.js index 3e730f011e69e9..3639b0b17a7a9f 100644 --- a/packages/mui-material/src/Tabs/Tabs.test.js +++ b/packages/mui-material/src/Tabs/Tabs.test.js @@ -4,7 +4,7 @@ import { spy, useFakeTimers } from 'sinon'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, screen, createServerRender, @@ -43,7 +43,7 @@ describe('', () => { // tests mocking getBoundingClientRect prevent mocha to exit const isJSDOM = navigator.userAgent === 'node.js'; - const render = createClientRender(); + const { render } = createRenderer(); before(function beforeHook() { const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); diff --git a/packages/mui-material/src/TextField/TextField.test.js b/packages/mui-material/src/TextField/TextField.test.js index e855174fd767ed..b2b2755a899456 100644 --- a/packages/mui-material/src/TextField/TextField.test.js +++ b/packages/mui-material/src/TextField/TextField.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import FormControl from '@mui/material/FormControl'; import { inputBaseClasses } from '@mui/material/InputBase'; import MenuItem from '@mui/material/MenuItem'; @@ -8,7 +8,7 @@ import { outlinedInputClasses } from '@mui/material/OutlinedInput'; import TextField, { textFieldClasses as classes } from '@mui/material/TextField'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/ToggleButton/ToggleButton.test.js b/packages/mui-material/src/ToggleButton/ToggleButton.test.js index d959b30a735c42..0ad6d3ec5d5e63 100644 --- a/packages/mui-material/src/ToggleButton/ToggleButton.test.js +++ b/packages/mui-material/src/ToggleButton/ToggleButton.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createClientRender, describeConformance, createServerRender } from 'test/utils'; +import { createRenderer, describeConformance, createServerRender } from 'test/utils'; import ToggleButton, { toggleButtonClasses as classes } from '@mui/material/ToggleButton'; import ButtonBase from '@mui/material/ButtonBase'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(Hello, World!, () => ({ classes, diff --git a/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js b/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js index f6581493a0b29f..37580b0bf8f5c1 100644 --- a/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js +++ b/packages/mui-material/src/ToggleButtonGroup/ToggleButtonGroup.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, createClientRender, screen } from 'test/utils'; +import { describeConformance, createRenderer, screen } from 'test/utils'; import ToggleButtonGroup, { toggleButtonGroupClasses as classes, } from '@mui/material/ToggleButtonGroup'; import ToggleButton from '@mui/material/ToggleButton'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Toolbar/Toolbar.test.js b/packages/mui-material/src/Toolbar/Toolbar.test.js index 12b704b70c991e..e47bb096b749c6 100644 --- a/packages/mui-material/src/Toolbar/Toolbar.test.js +++ b/packages/mui-material/src/Toolbar/Toolbar.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Toolbar, { toolbarClasses as classes } from '@mui/material/Toolbar'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Tooltip/Tooltip.test.js b/packages/mui-material/src/Tooltip/Tooltip.test.js index 44056eb53289f7..14570c4188c4fc 100644 --- a/packages/mui-material/src/Tooltip/Tooltip.test.js +++ b/packages/mui-material/src/Tooltip/Tooltip.test.js @@ -4,7 +4,7 @@ import { spy, useFakeTimers } from 'sinon'; import { describeConformance, act, - createClientRender, + createRenderer, fireEvent, screen, simulatePointerDevice, @@ -44,7 +44,7 @@ describe('', () => { }); }); - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/Typography/Typography.test.js b/packages/mui-material/src/Typography/Typography.test.js index 84602328204f10..e6877e3339bb57 100644 --- a/packages/mui-material/src/Typography/Typography.test.js +++ b/packages/mui-material/src/Typography/Typography.test.js @@ -1,11 +1,11 @@ // @ts-check import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createRenderer, describeConformance } from 'test/utils'; import Typography, { typographyClasses as classes } from '@mui/material/Typography'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance(, () => ({ classes, diff --git a/packages/mui-material/src/Zoom/Zoom.test.js b/packages/mui-material/src/Zoom/Zoom.test.js index 88150491fdfa18..c08fa0f98c149a 100644 --- a/packages/mui-material/src/Zoom/Zoom.test.js +++ b/packages/mui-material/src/Zoom/Zoom.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, describeConformance, createClientRender } from 'test/utils'; +import { act, describeConformance, createRenderer } from 'test/utils'; import { Transition } from 'react-transition-group'; import Zoom from '@mui/material/Zoom'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( diff --git a/packages/mui-material/src/internal/SwitchBase.test.js b/packages/mui-material/src/internal/SwitchBase.test.js index 9f31e150513233..f197f98ab76c42 100644 --- a/packages/mui-material/src/internal/SwitchBase.test.js +++ b/packages/mui-material/src/internal/SwitchBase.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformance, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createRenderer } from 'test/utils'; import SwitchBase from './SwitchBase'; import FormControl, { useFormControl } from '../FormControl'; import ButtonBase from '../ButtonBase'; import classes from './switchBaseClasses'; describe('', () => { - const render = createClientRender(); + const { render } = createRenderer(); describeConformance( , diff --git a/packages/mui-material/src/styles/styled.test.js b/packages/mui-material/src/styles/styled.test.js index 69b037b480ba42..e01c7d85c7afd9 100644 --- a/packages/mui-material/src/styles/styled.test.js +++ b/packages/mui-material/src/styles/styled.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, screen } from 'test/utils'; +import { createRenderer, screen } from 'test/utils'; import createTheme from './createTheme'; import styled from './styled'; import ThemeProvider from './ThemeProvider'; describe('styled', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should work', () => { const Div = styled('div')` diff --git a/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js b/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js index cbc6a0caf41922..1f0646c5a264d4 100644 --- a/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js +++ b/packages/mui-material/src/useMediaQuery/useMediaQuery.test.js @@ -4,7 +4,7 @@ import { ThemeProvider } from '@mui/material/styles'; import useMediaQuery from '@mui/material/useMediaQuery'; import { act, - createClientRender, + createRenderer, createServerRender, screen, RenderCounter, @@ -40,7 +40,7 @@ function createMatchMedia(width, ref) { } describe('useMediaQuery', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('without window.matchMedia', () => { let originalMatchmedia; diff --git a/packages/mui-material/src/usePagination/usePagination.test.js b/packages/mui-material/src/usePagination/usePagination.test.js index 48651ab70e880a..d01291bd8d82b9 100644 --- a/packages/mui-material/src/usePagination/usePagination.test.js +++ b/packages/mui-material/src/usePagination/usePagination.test.js @@ -1,10 +1,10 @@ import * as React from 'react'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import { expect } from 'chai'; import usePagination from '@mui/material/usePagination'; describe('usePagination', () => { - const render = createClientRender(); + const { render } = createRenderer(); const serialize = (items) => items.map((item) => (item.type === 'page' ? item.page : item.type)); const renderHook = (useHook) => { diff --git a/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js b/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js index 16ddfb385f3ec0..c3686f560074e7 100644 --- a/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js +++ b/packages/mui-material/src/useScrollTrigger/useScrollTrigger.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { act, createClientRender, RenderCounter, screen } from 'test/utils'; +import { act, createRenderer, RenderCounter, screen } from 'test/utils'; import useScrollTrigger from '@mui/material/useScrollTrigger'; import Container from '@mui/material/Container'; import Box from '@mui/material/Box'; describe('useScrollTrigger', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('defaultTrigger', () => { it('should be false by default', () => { diff --git a/packages/mui-material/src/utils/index.test.js b/packages/mui-material/src/utils/index.test.js index 5bb59c8f170893..55298c340edbd9 100644 --- a/packages/mui-material/src/utils/index.test.js +++ b/packages/mui-material/src/utils/index.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createClientRender, screen } from 'test/utils'; +import { createRenderer, screen } from 'test/utils'; import { isMuiElement, setRef, useForkRef } from '.'; import { Input, ListItemSecondaryAction, SvgIcon } from '..'; describe('utils/index.js', () => { - const render = createClientRender(); + const { render } = createRenderer(); describe('isMuiElement', () => { it('should match static muiName property', () => { diff --git a/packages/mui-material/test/integration/DialogIntegration.test.js b/packages/mui-material/test/integration/DialogIntegration.test.js index 68b86b5e7aba17..ec3414d2537d40 100644 --- a/packages/mui-material/test/integration/DialogIntegration.test.js +++ b/packages/mui-material/test/integration/DialogIntegration.test.js @@ -2,10 +2,10 @@ import * as React from 'react'; import { expect } from 'chai'; import Dialog from '@mui/material/Dialog'; import DialogTitle from '@mui/material/DialogTitle'; -import { createClientRender, screen } from 'test/utils'; +import { createRenderer, screen } from 'test/utils'; describe(' integration', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('is automatically labelled by its DialogTitle', () => { render( diff --git a/packages/mui-material/test/integration/Menu.test.js b/packages/mui-material/test/integration/Menu.test.js index 7325d4d910a62f..5c8e3a720e71c0 100644 --- a/packages/mui-material/test/integration/Menu.test.js +++ b/packages/mui-material/test/integration/Menu.test.js @@ -5,7 +5,7 @@ import { useFakeTimers } from 'sinon'; import Button from '@mui/material/Button'; import MenuItem from '@mui/material/MenuItem'; import Menu from '@mui/material/Menu'; -import { act, createClientRender, fireEvent, screen } from 'test/utils'; +import { act, createRenderer, fireEvent, screen } from 'test/utils'; const options = [ 'Show some love to MUI', @@ -82,7 +82,7 @@ describe(' integration', () => { clock.restore(); }); - const render = createClientRender(); + const { render } = createRenderer(); it('is part of the DOM by default but hidden', () => { const { getByRole } = render(); diff --git a/packages/mui-material/test/integration/MenuList.test.js b/packages/mui-material/test/integration/MenuList.test.js index 90a6fcaca3296c..a71d58eefe65fa 100644 --- a/packages/mui-material/test/integration/MenuList.test.js +++ b/packages/mui-material/test/integration/MenuList.test.js @@ -6,14 +6,14 @@ import MenuItem from '@mui/material/MenuItem'; import Divider from '@mui/material/Divider'; import { act, - createClientRender, + createRenderer, fireEvent, screen, programmaticFocusTriggersFocusVisible, } from 'test/utils'; describe(' integration', () => { - const render = createClientRender(); + const { render } = createRenderer(); specify('the MenuItems have the `menuitem` role', () => { const { getAllByRole } = render( diff --git a/packages/mui-material/test/integration/NestedMenu.test.js b/packages/mui-material/test/integration/NestedMenu.test.js index 9fc4d197781573..f85c631d547798 100644 --- a/packages/mui-material/test/integration/NestedMenu.test.js +++ b/packages/mui-material/test/integration/NestedMenu.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, within } from 'test/utils'; +import { createRenderer, within } from 'test/utils'; import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; @@ -47,7 +47,7 @@ function NestedMenu(props) { } describe(' integration', () => { - const render = createClientRender(); + const { render } = createRenderer(); it('should not be open', () => { const { queryAllByRole } = render(); diff --git a/packages/mui-material/test/integration/PopperChildrenLayout.test.js b/packages/mui-material/test/integration/PopperChildrenLayout.test.js index ffc58e4c813570..9dca88ea85f718 100644 --- a/packages/mui-material/test/integration/PopperChildrenLayout.test.js +++ b/packages/mui-material/test/integration/PopperChildrenLayout.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { createClientRender } from 'test/utils'; +import { createRenderer } from 'test/utils'; import Collapse from '@mui/material/Collapse'; import Fade from '@mui/material/Fade'; import Grow from '@mui/material/Grow'; @@ -11,7 +11,7 @@ import Popper from '@mui/material/Popper'; describe('', () => { let isSafari; - const render = createClientRender(); + const { render } = createRenderer(); before(function beforeHook() { // JSDOM has neither layout nor window.scrollTo diff --git a/packages/mui-material/test/integration/Select.test.js b/packages/mui-material/test/integration/Select.test.js index 6e85e5ab3deb4f..a22a10a61a9c18 100644 --- a/packages/mui-material/test/integration/Select.test.js +++ b/packages/mui-material/test/integration/Select.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { useFakeTimers } from 'sinon'; -import { act, createClientRender, fireEvent } from 'test/utils'; +import { act, createRenderer, fireEvent } from 'test/utils'; import MenuItem from '@mui/material/MenuItem'; import Select from '@mui/material/Select'; import Dialog from '@mui/material/Dialog'; @@ -9,7 +9,7 @@ import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; describe('