From d96a1f7bfb85a411c10ceb33f93166c4e04b7b41 Mon Sep 17 00:00:00 2001 From: Marija Najdova Date: Tue, 17 Aug 2021 13:13:40 +0200 Subject: [PATCH 1/3] Remove legacy describeConformance --- .../DateRangePicker/DateRangePicker.test.tsx | 14 +- .../DesktopDateRangePicker.test.tsx | 14 +- .../DesktopTimePicker.test.tsx | 14 +- .../MobileDateRangePicker.test.tsx | 14 +- .../MobileTimePicker.test.tsx | 14 +- .../StaticDateRangePicker.test.tsx | 6 +- .../StaticTimePicker.test.tsx | 6 +- .../src/TabList/TabList.test.js | 6 +- .../src/TimePicker/TimePicker.test.tsx | 14 +- .../BackdropUnstyled/BackdropUnstyled.test.js | 9 +- .../src/BadgeUnstyled/BadgeUnstyled.test.js | 9 +- .../src/SliderUnstyled/SliderUnstyled.test.js | 11 +- packages/material-ui/src/Fade/Fade.test.js | 6 +- packages/material-ui/src/Grow/Grow.test.js | 6 +- .../material-ui/src/MenuList/MenuList.test.js | 6 +- .../material-ui/src/Popper/Popper.test.js | 6 +- .../src/RadioGroup/RadioGroup.test.js | 6 +- packages/material-ui/src/Slide/Slide.test.js | 6 +- .../SwipeableDrawer/SwipeableDrawer.test.js | 5 +- .../TextareaAutosize/TextareaAutosize.test.js | 6 +- packages/material-ui/src/Zoom/Zoom.test.js | 6 +- test/utils/describeConformance.js | 247 ------------------ test/utils/describeConformanceUnstyled.tsx | 2 +- test/utils/describeConformanceV5.js | 194 +++++++++++++- test/utils/index.js | 1 - 25 files changed, 318 insertions(+), 310 deletions(-) delete mode 100644 test/utils/describeConformance.js diff --git a/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx b/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx index a00eab3cbdc552..70ffa70e264416 100644 --- a/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import DateRangePicker from '@material-ui/lab/DateRangePicker'; -import { describeConformance } from 'test/utils'; +import { describeConformanceV5 } from 'test/utils'; import { createPickerRender, wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -17,7 +17,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); diff --git a/packages/material-ui-lab/src/DesktopDateRangePicker/DesktopDateRangePicker.test.tsx b/packages/material-ui-lab/src/DesktopDateRangePicker/DesktopDateRangePicker.test.tsx index 8633e96b50fc8c..bcd2efa6e5e8d9 100644 --- a/packages/material-ui-lab/src/DesktopDateRangePicker/DesktopDateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/DesktopDateRangePicker/DesktopDateRangePicker.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { SinonFakeTimers, spy, useFakeTimers } from 'sinon'; -import { act, describeConformance, screen, fireEvent, userEvent } from 'test/utils'; +import { act, describeConformanceV5, screen, fireEvent, userEvent } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; import TextField, { TextFieldProps } from '@material-ui/core/TextField'; import { DateRange } from '@material-ui/lab/DateRangePicker'; @@ -32,7 +32,7 @@ describe('', () => { }); const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -42,7 +42,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); diff --git a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx index 7b93d9534eb1bf..fad77ffc183751 100644 --- a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx +++ b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy, useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { act, describeConformance, fireEvent, screen, userEvent } from 'test/utils'; +import { act, describeConformanceV5, fireEvent, screen, userEvent } from 'test/utils'; import { TransitionProps } from '@material-ui/core/transitions'; import { TimePickerProps } from '@material-ui/lab/TimePicker'; import DesktopTimePicker from '@material-ui/lab/DesktopTimePicker'; @@ -20,7 +20,7 @@ describe('', () => { const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -30,7 +30,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); diff --git a/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx b/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx index e087309efe7f15..919b6a6570e827 100644 --- a/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import MobileDateRangePicker from '@material-ui/lab/MobileDateRangePicker'; -import { describeConformance } from 'test/utils'; +import { describeConformanceV5 } from 'test/utils'; import { wrapPickerMount, createPickerRender } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -17,7 +17,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); diff --git a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx index 5c433ebb5c7bd5..13b5091fb38109 100644 --- a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx +++ b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { describeConformance, fireEvent, fireTouchChangedEvent } from 'test/utils'; +import { describeConformanceV5, fireEvent, fireTouchChangedEvent } from 'test/utils'; import MobileTimePicker from '@material-ui/lab/MobileTimePicker'; import { wrapPickerMount, @@ -30,7 +30,7 @@ function createMouseEventWithOffsets( describe('', () => { const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -40,7 +40,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); diff --git a/packages/material-ui-lab/src/StaticDateRangePicker/StaticDateRangePicker.test.tsx b/packages/material-ui-lab/src/StaticDateRangePicker/StaticDateRangePicker.test.tsx index f0186287f72889..099900ba7af2e7 100644 --- a/packages/material-ui-lab/src/StaticDateRangePicker/StaticDateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/StaticDateRangePicker/StaticDateRangePicker.test.tsx @@ -4,7 +4,7 @@ import { isWeekend } from 'date-fns'; import { useFakeTimers } from 'sinon'; import TextField, { TextFieldProps } from '@material-ui/core/TextField'; import StaticDateRangePicker from '@material-ui/lab/StaticDateRangePicker'; -import { describeConformance } from 'test/utils'; +import { describeConformanceV5 } from 'test/utils'; import { wrapPickerMount, createPickerRender, @@ -30,7 +30,7 @@ describe('', () => { const render = createPickerRender(); - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -42,6 +42,8 @@ describe('', () => { refInstanceof: undefined, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', 'mergeClassName', 'propsSpread', 'refForwarding', diff --git a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx index 214453f0c43247..f9e9916b1f4a6a 100644 --- a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx +++ b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; -import { describeConformance } from 'test/utils'; +import { describeConformanceV5 } from 'test/utils'; import StaticTimePicker from './StaticTimePicker'; import { wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -17,6 +17,8 @@ describe('', () => { refInstanceof: undefined, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', 'mergeClassName', 'propsSpread', // TODO: `ref` is typed but has no effect diff --git a/packages/material-ui-lab/src/TabList/TabList.test.js b/packages/material-ui-lab/src/TabList/TabList.test.js index 857dce9d228ee3..37732db681d970 100644 --- a/packages/material-ui-lab/src/TabList/TabList.test.js +++ b/packages/material-ui-lab/src/TabList/TabList.test.js @@ -1,7 +1,7 @@ // @ts-check import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createClientRender, describeConformanceV5 } from 'test/utils'; import Tab from '@material-ui/core/Tab'; import Tabs, { tabsClasses as classes } from '@material-ui/core/Tabs'; import TabList from './TabList'; @@ -10,7 +10,7 @@ import TabContext from '../TabContext'; describe('', () => { const render = createClientRender(); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ // @ts-expect-error https://github.com/microsoft/TypeScript/issues/15300 classes, inheritComponent: Tabs, @@ -24,7 +24,7 @@ describe('', () => { }, refInstanceof: window.HTMLDivElement, // TODO: no idea why reactTestRenderer fails - skip: ['reactTestRenderer'], + skip: ['componentsProp', 'themeDefaultProps', 'reactTestRenderer'], })); // outside of TabContext pass every test in Tabs diff --git a/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx index 1f0120fb930fa4..b2ee6cd25d485c 100644 --- a/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx +++ b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; -import { describeConformance } from 'test/utils'; +import { describeConformanceV5 } from 'test/utils'; import TimePicker from './TimePicker'; import { wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { - describeConformance( + describeConformanceV5( {}} renderInput={(props) => } @@ -15,7 +15,15 @@ describe('', () => { classes: {}, wrapMount: wrapPickerMount, refInstanceof: window.HTMLDivElement, - skip: ['componentProp', 'mergeClassName', 'propsSpread', 'rootClass', 'reactTestRenderer'], + skip: [ + 'componentProp', + 'componentsProp', + 'themeDefaultProps', + 'mergeClassName', + 'propsSpread', + 'rootClass', + 'reactTestRenderer', + ], }), ); }); diff --git a/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js b/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js index 6b38b3cd24ad69..53ba30630a98e3 100644 --- a/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js +++ b/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createClientRender, describeConformanceV5 } from 'test/utils'; import BackdropUnstyled, { backdropUnstyledClasses as classes, } from '@material-ui/unstyled/BackdropUnstyled'; @@ -8,7 +8,7 @@ import BackdropUnstyled, { describe('', () => { const render = createClientRender(); - describeConformance( + describeConformanceV5(
, @@ -18,6 +18,11 @@ describe('', () => { render, refInstanceof: window.HTMLDivElement, testComponentPropWith: 'div', + skip: [ + 'themeDefaultProps', // unstyled + 'themeStyleOverrides', // unstyled + 'themeVariants', // unstyled + ], }), ); diff --git a/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js b/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js index f846cfa789a491..958292164dfd19 100644 --- a/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js +++ b/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance } from 'test/utils'; +import { createClientRender, describeConformanceV5 } from 'test/utils'; import BadgeUnstyled, { badgeUnstyledClasses as classes, } from '@material-ui/unstyled/BadgeUnstyled'; @@ -8,7 +8,7 @@ import BadgeUnstyled, { describe('', () => { const render = createClientRender(); - describeConformance( + describeConformanceV5(
, @@ -18,6 +18,11 @@ describe('', () => { render, refInstanceof: window.HTMLSpanElement, testComponentPropWith: 'div', + skip: [ + 'themeDefaultProps', // unstyled + 'themeStyleOverrides', // unstyled + 'themeVariants', // unstyled + ], }), ); diff --git a/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js b/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js index 381fa98bd75dae..81e8d6501b5b44 100644 --- a/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js +++ b/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformance, screen } from 'test/utils'; +import { createClientRender, createMount, describeConformanceV5, screen } from 'test/utils'; import SliderUnstyled, { sliderUnstyledClasses as classes, } from '@material-ui/unstyled/SliderUnstyled'; @@ -12,14 +12,21 @@ describe('', () => { } }); + const mount = createMount(); const render = createClientRender(); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ classes, inheritComponent: 'span', + mount, render, refInstanceof: window.HTMLSpanElement, testComponentPropWith: 'span', + skip: [ + 'themeDefaultProps', // unstyled + 'themeStyleOverrides', // unstyled + 'themeVariants', // unstyled + ], })); it('forwards style props on the Root component', () => { diff --git a/packages/material-ui/src/Fade/Fade.test.js b/packages/material-ui/src/Fade/Fade.test.js index 2307c6f556cdea..54e69d93295f18 100644 --- a/packages/material-ui/src/Fade/Fade.test.js +++ b/packages/material-ui/src/Fade/Fade.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createClientRender, describeConformanceV5 } from 'test/utils'; import { Transition } from 'react-transition-group'; import Fade from '@material-ui/core/Fade'; @@ -13,12 +13,14 @@ describe('', () => { children:
, }; - describeConformance(, () => ({ + describeConformanceV5(, () => ({ classes: {}, inheritComponent: Transition, refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', // TODO: really? // react-transition-group issue 'reactTestRenderer', diff --git a/packages/material-ui/src/Grow/Grow.test.js b/packages/material-ui/src/Grow/Grow.test.js index 27b60fbb9719d4..9a47633bad144f 100644 --- a/packages/material-ui/src/Grow/Grow.test.js +++ b/packages/material-ui/src/Grow/Grow.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformance } from 'test/utils'; +import { act, createClientRender, describeConformanceV5 } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; import { Transition } from 'react-transition-group'; import Grow from '@material-ui/core/Grow'; @@ -15,7 +15,7 @@ describe('', () => { children:
, }; - describeConformance( + describeConformanceV5(
, @@ -25,6 +25,8 @@ describe('', () => { refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', // react-transition-group issue 'reactTestRenderer', ], diff --git a/packages/material-ui/src/MenuList/MenuList.test.js b/packages/material-ui/src/MenuList/MenuList.test.js index 2049b9ed5f747d..fc234077dcb0e2 100644 --- a/packages/material-ui/src/MenuList/MenuList.test.js +++ b/packages/material-ui/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 { describeConformanceV5, createClientRender } from 'test/utils'; import MenuList from '@material-ui/core/MenuList'; import List from '@material-ui/core/List'; import getScrollbarSize from '../utils/getScrollbarSize'; @@ -19,11 +19,11 @@ function setStyleWidthForJsdomOrBrowser(style, width) { describe('', () => { const render = createClientRender(); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ classes: {}, inheritComponent: List, refInstanceof: window.HTMLUListElement, - skip: ['componentProp'], + skip: ['componentProp', 'componentsProp', 'themeDefaultProps'], })); describe('prop: children', () => { diff --git a/packages/material-ui/src/Popper/Popper.test.js b/packages/material-ui/src/Popper/Popper.test.js index 544fd8997908f0..cca09859a18126 100644 --- a/packages/material-ui/src/Popper/Popper.test.js +++ b/packages/material-ui/src/Popper/Popper.test.js @@ -2,7 +2,7 @@ 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 { describeConformanceV5, act, createClientRender, fireEvent, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import Grow from '@material-ui/core/Grow'; import Popper from '@material-ui/core/Popper'; @@ -22,12 +22,14 @@ describe('', () => { }); }); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ classes: {}, inheritComponent: 'div', refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', // https://github.com/facebook/react/issues/11565 'reactTestRenderer', ], diff --git a/packages/material-ui/src/RadioGroup/RadioGroup.test.js b/packages/material-ui/src/RadioGroup/RadioGroup.test.js index 222b7db1b2b8f8..350f7c294ba35d 100644 --- a/packages/material-ui/src/RadioGroup/RadioGroup.test.js +++ b/packages/material-ui/src/RadioGroup/RadioGroup.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, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; import FormGroup from '@material-ui/core/FormGroup'; import Radio from '@material-ui/core/Radio'; import RadioGroup, { useRadioGroup } from '@material-ui/core/RadioGroup'; @@ -10,11 +10,11 @@ import RadioGroup, { useRadioGroup } from '@material-ui/core/RadioGroup'; describe('', () => { const render = createClientRender(); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ classes: {}, inheritComponent: FormGroup, refInstanceof: window.HTMLDivElement, - skip: ['componentProp'], + skip: ['componentProp', 'componentsProp', 'themeDefaultProps'], })); it('the root component has the radiogroup role', () => { diff --git a/packages/material-ui/src/Slide/Slide.test.js b/packages/material-ui/src/Slide/Slide.test.js index 5542517cbb4690..ea3e607042f46f 100644 --- a/packages/material-ui/src/Slide/Slide.test.js +++ b/packages/material-ui/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, createClientRender, describeConformanceV5 } from 'test/utils'; import { createTheme } from '@material-ui/core/styles'; import { Transition } from 'react-transition-group'; import Slide from '@material-ui/core/Slide'; @@ -17,7 +17,7 @@ describe('', () => { direction: 'down', }; - describeConformance( + describeConformanceV5(
, @@ -27,6 +27,8 @@ describe('', () => { refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', // react-transition-group issue 'reactTestRenderer', ], diff --git a/packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js b/packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js index e72a7f27a9fbbe..8074e4a5df012e 100644 --- a/packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js +++ b/packages/material-ui/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, createClientRender, describeConformanceV5, screen } from 'test/utils'; import PropTypes, { checkPropTypes } from 'prop-types'; import SwipeableDrawer from '@material-ui/core/SwipeableDrawer'; import Drawer, { drawerClasses } from '@material-ui/core/Drawer'; @@ -71,12 +71,13 @@ describe('', () => { const render = createClientRender(); - describeConformance( {}} onClose={() => {}} open />, () => ({ + describeConformanceV5( {}} onClose={() => {}} open />, () => ({ classes: {}, inheritComponent: Drawer, refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'themeDefaultProps', // https://github.com/facebook/react/issues/11565 'reactTestRenderer', ], diff --git a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js index d070e22655f70c..1bbaeebcea91ce 100644 --- a/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js +++ b/packages/material-ui/src/TextareaAutosize/TextareaAutosize.test.js @@ -1,16 +1,16 @@ import * as React from 'react'; import { expect } from 'chai'; import sinon, { spy, stub, useFakeTimers } from 'sinon'; -import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; import TextareaAutosize from '@material-ui/core/TextareaAutosize'; describe('', () => { const render = createClientRender(); - describeConformance(, () => ({ + describeConformanceV5(, () => ({ inheritComponent: 'textarea', refInstanceof: window.HTMLTextAreaElement, - skip: ['rootClass', 'componentProp'], + skip: ['rootClass', 'componentProp', 'componentsProp', 'themeDefaultProps'], })); describe('layout', () => { diff --git a/packages/material-ui/src/Zoom/Zoom.test.js b/packages/material-ui/src/Zoom/Zoom.test.js index ebe72d7f12d1f4..426385334b675c 100644 --- a/packages/material-ui/src/Zoom/Zoom.test.js +++ b/packages/material-ui/src/Zoom/Zoom.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, describeConformance, createClientRender } from 'test/utils'; +import { act, describeConformanceV5, createClientRender } from 'test/utils'; import { Transition } from 'react-transition-group'; import Zoom from '@material-ui/core/Zoom'; describe('', () => { const render = createClientRender(); - describeConformance( + describeConformanceV5(
, @@ -18,6 +18,8 @@ describe('', () => { refInstanceof: window.HTMLDivElement, skip: [ 'componentProp', + 'componentsProp', + 'themeDefaultProps', // react-transition-group issue 'reactTestRenderer', ], diff --git a/test/utils/describeConformance.js b/test/utils/describeConformance.js deleted file mode 100644 index 3980e542786164..00000000000000 --- a/test/utils/describeConformance.js +++ /dev/null @@ -1,247 +0,0 @@ -/* eslint-env mocha */ -import { expect } from 'chai'; -import * as React from 'react'; -import ReactTestRenderer from 'react-test-renderer'; -import createMount from './createMount'; -import findOutermostIntrinsic from './findOutermostIntrinsic'; - -/** - * @param {object} node - * @returns - */ -function assertDOMNode(node) { - // duck typing a DOM node - expect(typeof node.nodeName).to.equal('string'); -} - -/** - * Utility method to make assertions about the ref on an element - * @param {React.ReactElement} element - The element should have a component wrapped - * in withStyles as the root - * @param {(node: React.ReactNode) => import('enzyme').ReactWrapper} mount - Should be returnvalue of createMount - * @param {(instance: unknown, wrapper: import('enzyme').ReactWrapper) => void} onRef - Asserts that the ref is a DOM node by default - */ -function testRef(element, mount, onRef = assertDOMNode) { - const ref = React.createRef(); - const wrapper = mount({React.cloneElement(element, { ref })}); - onRef(ref.current, wrapper); -} - -/** - * Glossary - * - root component: - * - renders the outermost host component - * - has the `root` class if the component has one - * - excess props are spread to this component - * - has the type of `inheritComponent` - */ - -/** - * Returns the component with the same constructor as `component` that renders - * the outermost host - * @param {import('enzyme').ReactWrapper} wrapper - * @param {object} options - * @param {import('react').ElementType} options.component - */ -export function findRootComponent(wrapper, { component }) { - const outermostHostElement = findOutermostIntrinsic(wrapper).getElement(); - - return wrapper.find(component).filterWhere((componentWrapper) => { - return componentWrapper.contains(outermostHostElement); - }); -} - -export function randomStringValue() { - return `s${Math.random().toString(36).slice(2)}`; -} - -/** - * Material-UI components have a `className` prop. The `className` is applied to - * the root component. - * @param {React.ReactElement} element - * @param {() => ConformanceOptions} getOptions - */ -export function testClassName(element, getOptions) { - it('applies the className to the root component', () => { - const { mount } = getOptions(); - const className = randomStringValue(); - - const wrapper = mount(React.cloneElement(element, { className })); - - expect(findOutermostIntrinsic(wrapper).instance()).to.have.class(className); - }); -} - -/** - * Material-UI components have a `component` prop that allows rendering a different - * Component from @inheritComponent - * @param {React.ReactElement} element - * @param {() => ConformanceOptions} getOptions - */ -export function testComponentProp(element, getOptions) { - describe('prop: component', () => { - it('can render another root component with the `component` prop', () => { - const { mount, testComponentPropWith: component = 'em' } = getOptions(); - - const wrapper = mount(React.cloneElement(element, { component })); - - expect(findRootComponent(wrapper, { component }).exists()).to.equal(true); - }); - }); -} - -/** - * Material-UI components can spread additional props to a documented component. - * @param {React.ReactElement} element - * @param {() => ConformanceOptions} getOptions - */ -export function testPropsSpread(element, getOptions) { - it(`spreads props to the root component`, () => { - // type def in ConformanceOptions - const { inheritComponent, mount } = getOptions(); - if (inheritComponent === undefined) { - throw new TypeError( - 'Unable to test props spread without `inheritComponent`. Either skip the test or pass a React element type.', - ); - } - - const testProp = 'data-test-props-spread'; - const value = randomStringValue(); - - const wrapper = mount(React.cloneElement(element, { [testProp]: value })); - const root = findRootComponent(wrapper, { component: inheritComponent }); - - expect(root.props()).to.have.property(testProp, value); - }); -} - -/** - * Tests that the `ref` of a component will return the correct instance - * - * This is determined by a given constructor i.e. a React.Component or HTMLElement for - * components that forward their ref and attach it to a host component. - * @param {React.ReactElement} element - * @param {() => ConformanceOptions} getOptions - */ -export function describeRef(element, getOptions) { - describe('ref', () => { - it(`attaches the ref`, () => { - // type def in ConformanceOptions - const { inheritComponent, mount, refInstanceof } = getOptions(); - - testRef(element, mount, (instance, wrapper) => { - expect(instance).to.be.instanceof(refInstanceof); - - if (inheritComponent !== undefined && instance.nodeType === 1) { - const rootHost = findOutermostIntrinsic(wrapper); - expect(instance).to.equal(rootHost.instance()); - } - }); - }); - }); -} - -/** - * Tests that the root component has the root class - * @param {React.ReactElement} element - * @param {() => ConformanceOptions} getOptions - */ -export function testRootClass(element, getOptions) { - it('applies the root class to the root component if it has this class', () => { - const { classes, render } = getOptions(); - if (classes.root == null) { - return; - } - - const className = randomStringValue(); - const { container, setProps } = render(React.cloneElement(element, { className })); - - // we established that the root component renders the outermost host previously. We immediately - // jump to the host component because some components pass the `root` class - // to the `classes` prop of the root component. - // https://github.com/mui-org/material-ui/blob/f9896bcd129a1209153106296b3d2487547ba205/packages/material-ui/src/OutlinedInput/OutlinedInput.js#L101 - expect(container.firstChild).to.have.class(className); - expect(container.firstChild).to.have.class(classes.root); - expect(document.querySelectorAll(`.${classes.root}`).length).to.equal(1); - - // Test that classes prop works - setProps({ classes: { ...classes, root: `${classes.root} ${className}` } }); - expect(container.firstChild).to.have.class(className); - expect(container.firstChild).not.to.have.attribute('classes'); - }); -} - -/** - * Tests that the component can be rendered with react-test-renderer. - * This is important for snapshot testing with Jest (even if we don't encourage it). - * @param {React.ReactElement} element - */ -export function testReactTestRenderer(element) { - it('should render without errors in ReactTestRenderer', () => { - ReactTestRenderer.act(() => { - ReactTestRenderer.create(element, { - createNodeMock: (node) => { - return document.createElement(node.type); - }, - }); - }); - }); -} - -const fullSuite = { - componentProp: testComponentProp, - mergeClassName: testClassName, - propsSpread: testPropsSpread, - refForwarding: describeRef, - rootClass: testRootClass, - reactTestRenderer: testReactTestRenderer, -}; - -/** - * @typedef {Object} ConformanceOptions - * @property {() => void} [after] - * @property {Record} classes - `classes` of the component provided by `@material-ui/styles` - * @property {import('react').ElementType} [inheritComponent] - The element type that receives spread props or `undefined` if props are not spread. - * @property {Array} [only] - If specified only run the tests listed - * @property {any} refInstanceof - `ref` will be an instanceof this constructor. - * @property {Array} [skip] - Skip the specified tests - * @property {string} [testComponentPropWith] - The host component that should be rendered instead. - * @property {(mount: (node: React.ReactNode) => import('enzyme').ReactWrapper) => (node: React.ReactNode) => import('enzyme').ReactWrapper} [wrapMount] - You can use this option to mount the component with enzyme in a WrapperComponent. Make sure the returned node corresponds to the input node and not the wrapper component. - * @property {(node: React.ReactElement) => import('./createClientRender').MuiRenderResult} [render] - Should be a return value from createClientRender - */ - -/** - * Tests various aspects of a component that should be equal across Material-UI - * components. - * @param {React.ReactElement} minimalElement - the component with it's minimal required props - * @param {() => ConformanceOptions} getOptions - */ -export default function describeConformance(minimalElement, getOptions) { - describe('Material-UI component API', () => { - const { - after: runAfterHook = () => {}, - only = Object.keys(fullSuite), - skip = [], - wrapMount = (mount) => mount, - } = getOptions(); - - const baseMount = createMount(); - const mount = wrapMount(baseMount); - - after(runAfterHook); - - function getTestOptions() { - return { - ...getOptions(), - mount, - }; - } - - Object.keys(fullSuite) - .filter((testKey) => only.indexOf(testKey) !== -1 && skip.indexOf(testKey) === -1) - .forEach((testKey) => { - const test = fullSuite[testKey]; - test(minimalElement, getTestOptions); - }); - }); -} diff --git a/test/utils/describeConformanceUnstyled.tsx b/test/utils/describeConformanceUnstyled.tsx index 5ed1adadb7b330..075ac8f917e227 100644 --- a/test/utils/describeConformanceUnstyled.tsx +++ b/test/utils/describeConformanceUnstyled.tsx @@ -9,7 +9,7 @@ import { testClassName, testComponentProp, testReactTestRenderer, -} from './describeConformance'; +} from './describeConformanceV5'; export interface SlotTestingOptions { testWithComponent?: React.ComponentType; diff --git a/test/utils/describeConformanceV5.js b/test/utils/describeConformanceV5.js index a8b1865def9505..5b541c124ebd70 100644 --- a/test/utils/describeConformanceV5.js +++ b/test/utils/describeConformanceV5.js @@ -2,16 +2,192 @@ import { expect } from 'chai'; import * as React from 'react'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; -import { - testComponentProp, - testClassName, - testPropsSpread, - describeRef, - findRootComponent, - testReactTestRenderer, - testRootClass, -} from './describeConformance'; +import ReactTestRenderer from 'react-test-renderer'; import createMount from './createMount'; +import findOutermostIntrinsic from './findOutermostIntrinsic'; + +/** + * @param {object} node + * @returns + */ +function assertDOMNode(node) { + // duck typing a DOM node + expect(typeof node.nodeName).to.equal('string'); +} + +/** + * Utility method to make assertions about the ref on an element + * @param {React.ReactElement} element - The element should have a component wrapped + * in withStyles as the root + * @param {(node: React.ReactNode) => import('enzyme').ReactWrapper} mount - Should be returnvalue of createMount + * @param {(instance: unknown, wrapper: import('enzyme').ReactWrapper) => void} onRef - Asserts that the ref is a DOM node by default + */ +function testRef(element, mount, onRef = assertDOMNode) { + const ref = React.createRef(); + const wrapper = mount({React.cloneElement(element, { ref })}); + onRef(ref.current, wrapper); +} + +/** + * Glossary + * - root component: + * - renders the outermost host component + * - has the `root` class if the component has one + * - excess props are spread to this component + * - has the type of `inheritComponent` + */ + +/** + * Returns the component with the same constructor as `component` that renders + * the outermost host + * @param {import('enzyme').ReactWrapper} wrapper + * @param {object} options + * @param {import('react').ElementType} options.component + */ +export function findRootComponent(wrapper, { component }) { + const outermostHostElement = findOutermostIntrinsic(wrapper).getElement(); + + return wrapper.find(component).filterWhere((componentWrapper) => { + return componentWrapper.contains(outermostHostElement); + }); +} + +export function randomStringValue() { + return `s${Math.random().toString(36).slice(2)}`; +} + +/** + * Material-UI components have a `className` prop. The `className` is applied to + * the root component. + * @param {React.ReactElement} element + * @param {() => ConformanceOptions} getOptions + */ +export function testClassName(element, getOptions) { + it('applies the className to the root component', () => { + const { mount } = getOptions(); + const className = randomStringValue(); + + const wrapper = mount(React.cloneElement(element, { className })); + + expect(findOutermostIntrinsic(wrapper).instance()).to.have.class(className); + }); +} + +/** + * Material-UI components have a `component` prop that allows rendering a different + * Component from @inheritComponent + * @param {React.ReactElement} element + * @param {() => ConformanceOptions} getOptions + */ +export function testComponentProp(element, getOptions) { + describe('prop: component', () => { + it('can render another root component with the `component` prop', () => { + const { mount, testComponentPropWith: component = 'em' } = getOptions(); + + const wrapper = mount(React.cloneElement(element, { component })); + + expect(findRootComponent(wrapper, { component }).exists()).to.equal(true); + }); + }); +} + +/** + * Material-UI components can spread additional props to a documented component. + * @param {React.ReactElement} element + * @param {() => ConformanceOptions} getOptions + */ +export function testPropsSpread(element, getOptions) { + it(`spreads props to the root component`, () => { + // type def in ConformanceOptions + const { inheritComponent, mount } = getOptions(); + if (inheritComponent === undefined) { + throw new TypeError( + 'Unable to test props spread without `inheritComponent`. Either skip the test or pass a React element type.', + ); + } + + const testProp = 'data-test-props-spread'; + const value = randomStringValue(); + + const wrapper = mount(React.cloneElement(element, { [testProp]: value })); + const root = findRootComponent(wrapper, { component: inheritComponent }); + + expect(root.props()).to.have.property(testProp, value); + }); +} + +/** + * Tests that the `ref` of a component will return the correct instance + * + * This is determined by a given constructor i.e. a React.Component or HTMLElement for + * components that forward their ref and attach it to a host component. + * @param {React.ReactElement} element + * @param {() => ConformanceOptions} getOptions + */ +export function describeRef(element, getOptions) { + describe('ref', () => { + it(`attaches the ref`, () => { + // type def in ConformanceOptions + const { inheritComponent, mount, refInstanceof } = getOptions(); + + testRef(element, mount, (instance, wrapper) => { + expect(instance).to.be.instanceof(refInstanceof); + + if (inheritComponent !== undefined && instance.nodeType === 1) { + const rootHost = findOutermostIntrinsic(wrapper); + expect(instance).to.equal(rootHost.instance()); + } + }); + }); + }); +} + +/** + * Tests that the root component has the root class + * @param {React.ReactElement} element + * @param {() => ConformanceOptions} getOptions + */ +export function testRootClass(element, getOptions) { + it('applies the root class to the root component if it has this class', () => { + const { classes, render } = getOptions(); + if (classes.root == null) { + return; + } + + const className = randomStringValue(); + const { container, setProps } = render(React.cloneElement(element, { className })); + + // we established that the root component renders the outermost host previously. We immediately + // jump to the host component because some components pass the `root` class + // to the `classes` prop of the root component. + // https://github.com/mui-org/material-ui/blob/f9896bcd129a1209153106296b3d2487547ba205/packages/material-ui/src/OutlinedInput/OutlinedInput.js#L101 + expect(container.firstChild).to.have.class(className); + expect(container.firstChild).to.have.class(classes.root); + expect(document.querySelectorAll(`.${classes.root}`).length).to.equal(1); + + // Test that classes prop works + setProps({ classes: { ...classes, root: `${classes.root} ${className}` } }); + expect(container.firstChild).to.have.class(className); + expect(document.querySelectorAll('[classes]').length).to.equal(0); + }); +} + +/** + * Tests that the component can be rendered with react-test-renderer. + * This is important for snapshot testing with Jest (even if we don't encourage it). + * @param {React.ReactElement} element + */ +export function testReactTestRenderer(element) { + it('should render without errors in ReactTestRenderer', () => { + ReactTestRenderer.act(() => { + ReactTestRenderer.create(element, { + createNodeMock: (node) => { + return document.createElement(node.type); + }, + }); + }); + }); +} /** * @typedef {Object} ConformanceOptions diff --git a/test/utils/index.js b/test/utils/index.js index 492b8be4f51929..c0118d5b6143d0 100644 --- a/test/utils/index.js +++ b/test/utils/index.js @@ -1,5 +1,4 @@ export * from './components'; -export { default as describeConformance } from './describeConformance'; export { default as describeConformanceV5 } from './describeConformanceV5'; export { default as describeConformanceUnstyled } from './describeConformanceUnstyled'; export * from './createClientRender'; From 79158d4a7469615dfb2f8327b767d46f9804959b Mon Sep 17 00:00:00 2001 From: Marija Najdova Date: Tue, 17 Aug 2021 13:15:45 +0200 Subject: [PATCH 2/3] Renamed describeConformanceV5 to describeConformance --- .../src/CalendarPicker/CalendarPicker.test.tsx | 4 ++-- .../CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx | 4 ++-- .../material-ui-lab/src/ClockPicker/ClockPicker.test.tsx | 4 ++-- .../src/DateRangePicker/DateRangePicker.test.tsx | 4 ++-- .../src/DateRangePickerDay/DateRangePickerDay.test.tsx | 4 ++-- .../DesktopDateRangePicker/DesktopDateRangePicker.test.tsx | 6 +++--- .../src/DesktopTimePicker/DesktopTimePicker.test.tsx | 4 ++-- .../material-ui-lab/src/LoadingButton/LoadingButton.test.js | 4 ++-- .../MobileDateRangePicker/MobileDateRangePicker.test.tsx | 4 ++-- .../src/MobileTimePicker/MobileTimePicker.test.tsx | 4 ++-- .../material-ui-lab/src/MonthPicker/MonthPicker.test.tsx | 4 ++-- packages/material-ui-lab/src/PickersDay/PickersDay.test.tsx | 4 ++-- .../StaticDateRangePicker/StaticDateRangePicker.test.tsx | 4 ++-- .../src/StaticTimePicker/StaticTimePicker.test.tsx | 4 ++-- packages/material-ui-lab/src/TabList/TabList.test.js | 4 ++-- packages/material-ui-lab/src/TabPanel/TabPanel.test.tsx | 4 ++-- packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx | 4 ++-- packages/material-ui-lab/src/Timeline/Timeline.test.tsx | 4 ++-- .../src/TimelineConnector/TimelineConnector.test.js | 4 ++-- .../src/TimelineContent/TimelineContent.test.js | 4 ++-- .../material-ui-lab/src/TimelineDot/TimelineDot.test.js | 4 ++-- .../material-ui-lab/src/TimelineItem/TimelineItem.test.js | 4 ++-- .../TimelineOppositeContent/TimelineOppositeContent.test.js | 4 ++-- .../src/TimelineSeparator/TimelineSeparator.test.js | 4 ++-- packages/material-ui-lab/src/TreeItem/TreeItem.test.js | 4 ++-- packages/material-ui-lab/src/TreeView/TreeView.test.js | 4 ++-- packages/material-ui-lab/src/YearPicker/YearPicker.test.tsx | 4 ++-- packages/material-ui-system/src/Box/Box.test.js | 4 ++-- .../src/BackdropUnstyled/BackdropUnstyled.test.js | 4 ++-- .../src/BadgeUnstyled/BadgeUnstyled.test.js | 4 ++-- .../src/ModalUnstyled/ModalUnstyled.test.js | 4 ++-- .../src/SliderUnstyled/SliderUnstyled.test.js | 4 ++-- packages/material-ui/src/Accordion/Accordion.test.js | 4 ++-- .../src/AccordionActions/AccordionActions.test.js | 4 ++-- .../src/AccordionDetails/AccordionDetails.test.js | 4 ++-- .../src/AccordionSummary/AccordionSummary.test.js | 4 ++-- packages/material-ui/src/Alert/Alert.test.js | 4 ++-- packages/material-ui/src/AlertTitle/AlertTitle.test.js | 4 ++-- packages/material-ui/src/AppBar/AppBar.test.js | 4 ++-- packages/material-ui/src/Autocomplete/Autocomplete.test.js | 4 ++-- packages/material-ui/src/Avatar/Avatar.test.js | 4 ++-- packages/material-ui/src/AvatarGroup/AvatarGroup.test.js | 4 ++-- packages/material-ui/src/Backdrop/Backdrop.test.js | 4 ++-- packages/material-ui/src/Badge/Badge.test.js | 4 ++-- .../src/BottomNavigation/BottomNavigation.test.js | 4 ++-- .../BottomNavigationAction/BottomNavigationAction.test.js | 4 ++-- packages/material-ui/src/Box/Box.test.js | 4 ++-- packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js | 4 ++-- packages/material-ui/src/Button/Button.test.js | 4 ++-- packages/material-ui/src/ButtonBase/ButtonBase.test.js | 4 ++-- packages/material-ui/src/ButtonBase/TouchRipple.test.js | 4 ++-- packages/material-ui/src/ButtonGroup/ButtonGroup.test.js | 4 ++-- packages/material-ui/src/Card/Card.test.tsx | 4 ++-- .../material-ui/src/CardActionArea/CardActionArea.test.js | 4 ++-- packages/material-ui/src/CardActions/CardActions.test.js | 4 ++-- packages/material-ui/src/CardContent/CardContent.test.js | 4 ++-- packages/material-ui/src/CardHeader/CardHeader.test.js | 4 ++-- packages/material-ui/src/CardMedia/CardMedia.test.js | 4 ++-- packages/material-ui/src/Checkbox/Checkbox.test.js | 4 ++-- packages/material-ui/src/Chip/Chip.test.js | 4 ++-- .../src/CircularProgress/CircularProgress.test.js | 4 ++-- packages/material-ui/src/Collapse/Collapse.test.js | 4 ++-- packages/material-ui/src/Container/Container.test.js | 4 ++-- packages/material-ui/src/Dialog/Dialog.test.js | 4 ++-- .../material-ui/src/DialogActions/DialogActions.test.js | 4 ++-- .../material-ui/src/DialogContent/DialogContent.test.js | 4 ++-- .../src/DialogContentText/DialogContentText.test.js | 4 ++-- packages/material-ui/src/DialogTitle/DialogTitle.test.js | 4 ++-- packages/material-ui/src/Divider/Divider.test.js | 4 ++-- packages/material-ui/src/Drawer/Drawer.test.js | 4 ++-- packages/material-ui/src/Fab/Fab.test.js | 4 ++-- packages/material-ui/src/Fade/Fade.test.js | 4 ++-- packages/material-ui/src/FilledInput/FilledInput.test.js | 4 ++-- packages/material-ui/src/FormControl/FormControl.test.js | 4 ++-- .../src/FormControlLabel/FormControlLabel.test.js | 4 ++-- packages/material-ui/src/FormGroup/FormGroup.test.js | 4 ++-- .../material-ui/src/FormHelperText/FormHelperText.test.js | 4 ++-- packages/material-ui/src/FormLabel/FormLabel.test.js | 4 ++-- packages/material-ui/src/Grid/Grid.test.js | 4 ++-- packages/material-ui/src/Grow/Grow.test.js | 4 ++-- packages/material-ui/src/Icon/Icon.test.js | 4 ++-- packages/material-ui/src/IconButton/IconButton.test.js | 4 ++-- packages/material-ui/src/ImageList/ImageList.test.js | 4 ++-- .../material-ui/src/ImageListItem/ImageListItem.test.js | 4 ++-- .../src/ImageListItemBar/ImageListItemBar.test.js | 4 ++-- packages/material-ui/src/Input/Input.test.js | 4 ++-- .../material-ui/src/InputAdornment/InputAdornment.test.js | 4 ++-- packages/material-ui/src/InputBase/InputBase.test.js | 4 ++-- packages/material-ui/src/InputLabel/InputLabel.test.js | 4 ++-- .../material-ui/src/LinearProgress/LinearProgress.test.js | 4 ++-- packages/material-ui/src/Link/Link.test.js | 4 ++-- packages/material-ui/src/List/List.test.js | 4 ++-- packages/material-ui/src/ListItem/ListItem.test.js | 4 ++-- .../material-ui/src/ListItemAvatar/ListItemAvatar.test.js | 4 ++-- .../material-ui/src/ListItemButton/ListItemButton.test.js | 4 ++-- packages/material-ui/src/ListItemIcon/ListItemIcon.test.js | 4 ++-- .../ListItemSecondaryAction/ListItemSecondaryAction.test.js | 4 ++-- packages/material-ui/src/ListItemText/ListItemText.test.js | 4 ++-- .../material-ui/src/ListSubheader/ListSubheader.test.js | 4 ++-- packages/material-ui/src/Menu/Menu.test.js | 4 ++-- packages/material-ui/src/MenuItem/MenuItem.test.js | 4 ++-- packages/material-ui/src/MenuList/MenuList.test.js | 4 ++-- .../material-ui/src/MobileStepper/MobileStepper.test.js | 4 ++-- packages/material-ui/src/Modal/Modal.test.js | 4 ++-- packages/material-ui/src/NativeSelect/NativeSelect.test.js | 4 ++-- .../material-ui/src/NativeSelect/NativeSelectInput.test.js | 4 ++-- .../material-ui/src/OutlinedInput/OutlinedInput.test.js | 4 ++-- packages/material-ui/src/Pagination/Pagination.test.js | 4 ++-- .../material-ui/src/PaginationItem/PaginationItem.test.js | 4 ++-- packages/material-ui/src/Paper/Paper.test.js | 4 ++-- packages/material-ui/src/Popover/Popover.test.js | 4 ++-- packages/material-ui/src/Popper/Popper.test.js | 4 ++-- packages/material-ui/src/Radio/Radio.test.js | 4 ++-- packages/material-ui/src/RadioGroup/RadioGroup.test.js | 4 ++-- packages/material-ui/src/Rating/Rating.test.js | 4 ++-- .../src/ScopedCssBaseline/ScopedCssBaseline.test.js | 4 ++-- packages/material-ui/src/Select/Select.test.js | 4 ++-- packages/material-ui/src/Skeleton/Skeleton.test.js | 4 ++-- packages/material-ui/src/Slide/Slide.test.js | 4 ++-- packages/material-ui/src/Slider/Slider.test.js | 4 ++-- packages/material-ui/src/Snackbar/Snackbar.test.js | 4 ++-- .../material-ui/src/SnackbarContent/SnackbarContent.test.js | 4 ++-- packages/material-ui/src/SpeedDial/SpeedDial.test.js | 4 ++-- .../material-ui/src/SpeedDialAction/SpeedDialAction.test.js | 4 ++-- .../material-ui/src/SpeedDialIcon/SpeedDialIcon.test.js | 4 ++-- packages/material-ui/src/Stack/Stack.test.js | 4 ++-- packages/material-ui/src/Step/Step.test.js | 4 ++-- packages/material-ui/src/StepButton/StepButton.test.js | 4 ++-- .../material-ui/src/StepConnector/StepConnector.test.js | 4 ++-- packages/material-ui/src/StepContent/StepContent.test.js | 4 ++-- packages/material-ui/src/StepIcon/StepIcon.test.js | 4 ++-- packages/material-ui/src/StepLabel/StepLabel.test.js | 4 ++-- packages/material-ui/src/Stepper/Stepper.test.tsx | 4 ++-- packages/material-ui/src/SvgIcon/SvgIcon.test.js | 4 ++-- .../material-ui/src/SwipeableDrawer/SwipeableDrawer.test.js | 4 ++-- packages/material-ui/src/Switch/Switch.test.js | 4 ++-- packages/material-ui/src/Tab/Tab.test.js | 4 ++-- .../material-ui/src/TabScrollButton/TabScrollButton.test.js | 4 ++-- packages/material-ui/src/Table/Table.test.js | 4 ++-- packages/material-ui/src/TableBody/TableBody.test.js | 4 ++-- packages/material-ui/src/TableCell/TableCell.test.js | 4 ++-- .../material-ui/src/TableContainer/TableContainer.test.js | 4 ++-- packages/material-ui/src/TableFooter/TableFooter.test.js | 4 ++-- packages/material-ui/src/TableHead/TableHead.test.js | 4 ++-- .../material-ui/src/TablePagination/TablePagination.test.js | 4 ++-- packages/material-ui/src/TableRow/TableRow.test.js | 4 ++-- .../material-ui/src/TableSortLabel/TableSortLabel.test.js | 4 ++-- packages/material-ui/src/Tabs/Tabs.test.js | 4 ++-- packages/material-ui/src/TextField/TextField.test.js | 4 ++-- .../src/TextareaAutosize/TextareaAutosize.test.js | 4 ++-- packages/material-ui/src/ToggleButton/ToggleButton.test.js | 4 ++-- .../src/ToggleButtonGroup/ToggleButtonGroup.test.js | 4 ++-- packages/material-ui/src/Toolbar/Toolbar.test.js | 4 ++-- packages/material-ui/src/Tooltip/Tooltip.test.js | 4 ++-- packages/material-ui/src/Typography/Typography.test.js | 4 ++-- packages/material-ui/src/Zoom/Zoom.test.js | 4 ++-- packages/material-ui/src/internal/SwitchBase.test.js | 4 ++-- .../{describeConformanceV5.js => describeConformance.js} | 4 ++-- test/utils/describeConformanceUnstyled.tsx | 2 +- test/utils/index.js | 2 +- 160 files changed, 319 insertions(+), 319 deletions(-) rename test/utils/{describeConformanceV5.js => describeConformance.js} (99%) diff --git a/packages/material-ui-lab/src/CalendarPicker/CalendarPicker.test.tsx b/packages/material-ui-lab/src/CalendarPicker/CalendarPicker.test.tsx index 6165a237da0c10..219c8eae494a3b 100644 --- a/packages/material-ui-lab/src/CalendarPicker/CalendarPicker.test.tsx +++ b/packages/material-ui-lab/src/CalendarPicker/CalendarPicker.test.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { SinonFakeTimers, useFakeTimers } from 'sinon'; -import { fireEvent, screen, describeConformanceV5 } from 'test/utils'; +import { fireEvent, screen, describeConformance } from 'test/utils'; import CalendarPicker, { calendarPickerClasses as classes } from '@material-ui/lab/CalendarPicker'; import { adapterToUse, @@ -21,7 +21,7 @@ describe('', () => { const render = createPickerRender(); - describeConformanceV5( {}} />, () => ({ + describeConformance( {}} />, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx b/packages/material-ui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx index 78bcb5a7f98787..a2b440d99af8e5 100644 --- a/packages/material-ui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx +++ b/packages/material-ui-lab/src/CalendarPickerSkeleton/CalendarPickerSkeleton.test.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CalendarPickerSkeleton, { calendarPickerSkeletonClasses as classes, } from '@material-ui/lab/CalendarPickerSkeleton'; @@ -7,7 +7,7 @@ import CalendarPickerSkeleton, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui-lab/src/ClockPicker/ClockPicker.test.tsx b/packages/material-ui-lab/src/ClockPicker/ClockPicker.test.tsx index ddb20495b62d1e..ee48205d3eb4fc 100644 --- a/packages/material-ui-lab/src/ClockPicker/ClockPicker.test.tsx +++ b/packages/material-ui-lab/src/ClockPicker/ClockPicker.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; import { - describeConformanceV5, + describeConformance, fireEvent, fireTouchChangedEvent, screen, @@ -19,7 +19,7 @@ import { describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} />, () => ({ classes, diff --git a/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx b/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx index 70ffa70e264416..9ded33a9799d71 100644 --- a/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/DateRangePicker/DateRangePicker.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import DateRangePicker from '@material-ui/lab/DateRangePicker'; -import { describeConformanceV5 } from 'test/utils'; +import { describeConformance } from 'test/utils'; import { createPickerRender, wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/DateRangePickerDay/DateRangePickerDay.test.tsx b/packages/material-ui-lab/src/DateRangePickerDay/DateRangePickerDay.test.tsx index 57963ac2eefa67..69ba310337808e 100644 --- a/packages/material-ui-lab/src/DateRangePickerDay/DateRangePickerDay.test.tsx +++ b/packages/material-ui-lab/src/DateRangePickerDay/DateRangePickerDay.test.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { describeConformanceV5 } from 'test/utils'; +import { describeConformance } from 'test/utils'; import DateRangePickerDay, { dateRangePickerDayClasses as classes, } from '@material-ui/lab/DateRangePickerDay'; @@ -8,7 +8,7 @@ import { adapterToUse, wrapPickerMount, createPickerRender } from '../internal/p describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( ', () => { }); const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } @@ -349,7 +349,7 @@ describe('', () => { expect(screen.getByRole('tooltip')).toBeVisible(); }); - // TODO: remove once we use describeConformanceV5. + // TODO: remove once we use describeConformance. it("respect theme's defaultProps", () => { const theme = createTheme({ components: { diff --git a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx index fad77ffc183751..9c5148b4a4b04a 100644 --- a/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx +++ b/packages/material-ui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy, useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { act, describeConformanceV5, fireEvent, screen, userEvent } from 'test/utils'; +import { act, describeConformance, fireEvent, screen, userEvent } from 'test/utils'; import { TransitionProps } from '@material-ui/core/transitions'; import { TimePickerProps } from '@material-ui/lab/TimePicker'; import DesktopTimePicker from '@material-ui/lab/DesktopTimePicker'; @@ -20,7 +20,7 @@ describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/LoadingButton/LoadingButton.test.js b/packages/material-ui-lab/src/LoadingButton/LoadingButton.test.js index a38db096a71fc0..6063bd55b5bfaf 100644 --- a/packages/material-ui-lab/src/LoadingButton/LoadingButton.test.js +++ b/packages/material-ui-lab/src/LoadingButton/LoadingButton.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5, screen } from 'test/utils'; +import { createClientRender, describeConformance, screen } from 'test/utils'; import { expect } from 'chai'; import Button from '@material-ui/core/Button'; import LoadingButton, { loadingButtonClasses as classes } from '@material-ui/lab/LoadingButton'; @@ -7,7 +7,7 @@ import LoadingButton, { loadingButtonClasses as classes } from '@material-ui/lab describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance?, () => ({ + describeConformance(Conformance?, () => ({ classes, inheritComponent: Button, render, diff --git a/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx b/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx index 919b6a6570e827..df195d11bc3785 100644 --- a/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx +++ b/packages/material-ui-lab/src/MobileDateRangePicker/MobileDateRangePicker.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import MobileDateRangePicker from '@material-ui/lab/MobileDateRangePicker'; -import { describeConformanceV5 } from 'test/utils'; +import { describeConformance } from 'test/utils'; import { wrapPickerMount, createPickerRender } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx index 13b5091fb38109..9a6e50d984b614 100644 --- a/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx +++ b/packages/material-ui-lab/src/MobileTimePicker/MobileTimePicker.test.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { describeConformanceV5, fireEvent, fireTouchChangedEvent } from 'test/utils'; +import { describeConformance, fireEvent, fireTouchChangedEvent } from 'test/utils'; import MobileTimePicker from '@material-ui/lab/MobileTimePicker'; import { wrapPickerMount, @@ -30,7 +30,7 @@ function createMouseEventWithOffsets( describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/MonthPicker/MonthPicker.test.tsx b/packages/material-ui-lab/src/MonthPicker/MonthPicker.test.tsx index 14b9f4be76d503..8fbe815a15e847 100644 --- a/packages/material-ui-lab/src/MonthPicker/MonthPicker.test.tsx +++ b/packages/material-ui-lab/src/MonthPicker/MonthPicker.test.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { fireEvent, screen, describeConformanceV5 } from 'test/utils'; +import { fireEvent, screen, describeConformance } from 'test/utils'; import MonthPicker, { monthPickerClasses as classes } from '@material-ui/lab/MonthPicker'; import { adapterToUse, wrapPickerMount, createPickerRender } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( ', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( ', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx index f9e9916b1f4a6a..51c4224f46af6b 100644 --- a/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx +++ b/packages/material-ui-lab/src/StaticTimePicker/StaticTimePicker.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; -import { describeConformanceV5 } from 'test/utils'; +import { describeConformance } from 'test/utils'; import StaticTimePicker from './StaticTimePicker'; import { wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/TabList/TabList.test.js b/packages/material-ui-lab/src/TabList/TabList.test.js index 37732db681d970..7dcff7f8866cf2 100644 --- a/packages/material-ui-lab/src/TabList/TabList.test.js +++ b/packages/material-ui-lab/src/TabList/TabList.test.js @@ -1,7 +1,7 @@ // @ts-check import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Tab from '@material-ui/core/Tab'; import Tabs, { tabsClasses as classes } from '@material-ui/core/Tabs'; import TabList from './TabList'; @@ -10,7 +10,7 @@ import TabContext from '../TabContext'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ // @ts-expect-error https://github.com/microsoft/TypeScript/issues/15300 classes, inheritComponent: Tabs, diff --git a/packages/material-ui-lab/src/TabPanel/TabPanel.test.tsx b/packages/material-ui-lab/src/TabPanel/TabPanel.test.tsx index 886da2972e66b8..c7162b53fee51c 100644 --- a/packages/material-ui-lab/src/TabPanel/TabPanel.test.tsx +++ b/packages/material-ui-lab/src/TabPanel/TabPanel.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import TabPanel, { tabPanelClasses as classes } from '@material-ui/lab/TabPanel'; import TabContext from '../TabContext'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render: (node) => render({node}), diff --git a/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx index b2ee6cd25d485c..e40dd1dcb1a4b1 100644 --- a/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx +++ b/packages/material-ui-lab/src/TimePicker/TimePicker.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; import TextField from '@material-ui/core/TextField'; -import { describeConformanceV5 } from 'test/utils'; +import { describeConformance } from 'test/utils'; import TimePicker from './TimePicker'; import { wrapPickerMount } from '../internal/pickers/test-utils'; describe('', () => { - describeConformanceV5( + describeConformance( {}} renderInput={(props) => } diff --git a/packages/material-ui-lab/src/Timeline/Timeline.test.tsx b/packages/material-ui-lab/src/Timeline/Timeline.test.tsx index 4ea8fa3710ffe1..3bda3af9e69de9 100644 --- a/packages/material-ui-lab/src/Timeline/Timeline.test.tsx +++ b/packages/material-ui-lab/src/Timeline/Timeline.test.tsx @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Timeline, { timelineClasses as classes } from '@material-ui/lab/Timeline'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'ul', render, diff --git a/packages/material-ui-lab/src/TimelineConnector/TimelineConnector.test.js b/packages/material-ui-lab/src/TimelineConnector/TimelineConnector.test.js index 1684c68a479fd8..5fd2c86b41c973 100644 --- a/packages/material-ui-lab/src/TimelineConnector/TimelineConnector.test.js +++ b/packages/material-ui-lab/src/TimelineConnector/TimelineConnector.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import TimelineConnector, { timelineConnectorClasses as classes, } from '@material-ui/lab/TimelineConnector'; @@ -7,7 +7,7 @@ import TimelineConnector, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui-lab/src/TimelineContent/TimelineContent.test.js b/packages/material-ui-lab/src/TimelineContent/TimelineContent.test.js index e8c922dd997527..b1752db117dafc 100644 --- a/packages/material-ui-lab/src/TimelineContent/TimelineContent.test.js +++ b/packages/material-ui-lab/src/TimelineContent/TimelineContent.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Typography from '@material-ui/core/Typography'; import Timeline from '@material-ui/lab/Timeline'; import TimelineItem from '@material-ui/lab/TimelineItem'; @@ -11,7 +11,7 @@ import TimelineContent, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Typography, render, diff --git a/packages/material-ui-lab/src/TimelineDot/TimelineDot.test.js b/packages/material-ui-lab/src/TimelineDot/TimelineDot.test.js index f85a08a7f7f283..b2db0aa9fd81e6 100644 --- a/packages/material-ui-lab/src/TimelineDot/TimelineDot.test.js +++ b/packages/material-ui-lab/src/TimelineDot/TimelineDot.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import TimelineDot, { timelineDotClasses as classes } from '@material-ui/lab/TimelineDot'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui-lab/src/TimelineItem/TimelineItem.test.js b/packages/material-ui-lab/src/TimelineItem/TimelineItem.test.js index 0d53fc833e0d46..5a7a75401d2724 100644 --- a/packages/material-ui-lab/src/TimelineItem/TimelineItem.test.js +++ b/packages/material-ui-lab/src/TimelineItem/TimelineItem.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import TimelineItem, { timelineItemClasses as classes } from '@material-ui/lab/TimelineItem'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'li', render, diff --git a/packages/material-ui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js b/packages/material-ui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js index 006bda22e57daa..3eb2fd96a2bbe9 100644 --- a/packages/material-ui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js +++ b/packages/material-ui-lab/src/TimelineOppositeContent/TimelineOppositeContent.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Typography from '@material-ui/core/Typography'; import Timeline from '@material-ui/lab/Timeline'; import TimelineItem from '@material-ui/lab/TimelineItem'; @@ -11,7 +11,7 @@ import TimelineOppositeContent, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Typography, render, diff --git a/packages/material-ui-lab/src/TimelineSeparator/TimelineSeparator.test.js b/packages/material-ui-lab/src/TimelineSeparator/TimelineSeparator.test.js index 5424ac47d3cf31..8aeb238352c62f 100644 --- a/packages/material-ui-lab/src/TimelineSeparator/TimelineSeparator.test.js +++ b/packages/material-ui-lab/src/TimelineSeparator/TimelineSeparator.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import TimelineSeparator, { timelineSeparatorClasses as classes, } from '@material-ui/lab/TimelineSeparator'; @@ -7,7 +7,7 @@ import TimelineSeparator, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui-lab/src/TreeItem/TreeItem.test.js b/packages/material-ui-lab/src/TreeItem/TreeItem.test.js index 163e778da7d146..ba65e7ecb89d41 100644 --- a/packages/material-ui-lab/src/TreeItem/TreeItem.test.js +++ b/packages/material-ui-lab/src/TreeItem/TreeItem.test.js @@ -3,7 +3,7 @@ import { expect } from 'chai'; import PropTypes from 'prop-types'; import { spy } from 'sinon'; import { - describeConformanceV5, + describeConformance, act, createEvent, createClientRender, @@ -16,7 +16,7 @@ import TreeItem, { treeItemClasses as classes } from '@material-ui/lab/TreeItem' describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'li', render, diff --git a/packages/material-ui-lab/src/TreeView/TreeView.test.js b/packages/material-ui-lab/src/TreeView/TreeView.test.js index 129d8a281a4ca5..83e3472c670f2a 100644 --- a/packages/material-ui-lab/src/TreeView/TreeView.test.js +++ b/packages/material-ui-lab/src/TreeView/TreeView.test.js @@ -7,7 +7,7 @@ import { ErrorBoundary, fireEvent, screen, - describeConformanceV5, + describeConformance, } from 'test/utils'; import Portal from '@material-ui/core/Portal'; import TreeView, { treeViewClasses as classes } from '@material-ui/lab/TreeView'; @@ -16,7 +16,7 @@ import TreeItem from '@material-ui/lab/TreeItem'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'ul', render, diff --git a/packages/material-ui-lab/src/YearPicker/YearPicker.test.tsx b/packages/material-ui-lab/src/YearPicker/YearPicker.test.tsx index 2886183bdb5c01..d1b86a0582f2d6 100644 --- a/packages/material-ui-lab/src/YearPicker/YearPicker.test.tsx +++ b/packages/material-ui-lab/src/YearPicker/YearPicker.test.tsx @@ -1,14 +1,14 @@ import * as React from 'react'; import { spy } from 'sinon'; import { expect } from 'chai'; -import { fireEvent, screen, describeConformanceV5 } from 'test/utils'; +import { fireEvent, screen, describeConformance } from 'test/utils'; import YearPicker, { yearPickerClasses as classes } from '@material-ui/lab/YearPicker'; import { adapterToUse, wrapPickerMount, createPickerRender } from '../internal/pickers/test-utils'; describe('', () => { const render = createPickerRender(); - describeConformanceV5( + describeConformance( ', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ render, inheritComponent: 'div', skip: [ diff --git a/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js b/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js index 53ba30630a98e3..9555bba82ea194 100644 --- a/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js +++ b/packages/material-ui-unstyled/src/BackdropUnstyled/BackdropUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import BackdropUnstyled, { backdropUnstyledClasses as classes, } from '@material-ui/unstyled/BackdropUnstyled'; @@ -8,7 +8,7 @@ import BackdropUnstyled, { describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js b/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js index 958292164dfd19..ec2a5c20198bf0 100644 --- a/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js +++ b/packages/material-ui-unstyled/src/BadgeUnstyled/BadgeUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import BadgeUnstyled, { badgeUnstyledClasses as classes, } from '@material-ui/unstyled/BadgeUnstyled'; @@ -8,7 +8,7 @@ import BadgeUnstyled, { describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui-unstyled/src/ModalUnstyled/ModalUnstyled.test.js b/packages/material-ui-unstyled/src/ModalUnstyled/ModalUnstyled.test.js index 768b53db4fd43d..d8763f43ee05d0 100644 --- a/packages/material-ui-unstyled/src/ModalUnstyled/ModalUnstyled.test.js +++ b/packages/material-ui-unstyled/src/ModalUnstyled/ModalUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ModalUnstyled, { modalUnstyledClasses as classes, } from '@material-ui/unstyled/ModalUnstyled'; @@ -17,7 +17,7 @@ describe('', () => { document.body.setAttribute('style', savedBodyStyle); }); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js b/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js index 81e8d6501b5b44..756615c2f2f4ac 100644 --- a/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js +++ b/packages/material-ui-unstyled/src/SliderUnstyled/SliderUnstyled.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, createMount, describeConformanceV5, screen } from 'test/utils'; +import { createClientRender, createMount, describeConformance, screen } from 'test/utils'; import SliderUnstyled, { sliderUnstyledClasses as classes, } from '@material-ui/unstyled/SliderUnstyled'; @@ -15,7 +15,7 @@ describe('', () => { const mount = createMount(); const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', mount, diff --git a/packages/material-ui/src/Accordion/Accordion.test.js b/packages/material-ui/src/Accordion/Accordion.test.js index ceea1cc728eaf3..54de902b7d5fd0 100644 --- a/packages/material-ui/src/Accordion/Accordion.test.js +++ b/packages/material-ui/src/Accordion/Accordion.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 { describeConformanceV5, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createClientRender, fireEvent } from 'test/utils'; import Accordion, { accordionClasses as classes } from '@material-ui/core/Accordion'; import Paper from '@material-ui/core/Paper'; import AccordionSummary from '@material-ui/core/AccordionSummary'; @@ -12,7 +12,7 @@ describe('', () => { const minimalChildren = [Header]; - describeConformanceV5({minimalChildren}, () => ({ + describeConformance({minimalChildren}, () => ({ classes, inheritComponent: Paper, render, diff --git a/packages/material-ui/src/AccordionActions/AccordionActions.test.js b/packages/material-ui/src/AccordionActions/AccordionActions.test.js index acc9445c7eec33..8fd54ea7ed2ecd 100644 --- a/packages/material-ui/src/AccordionActions/AccordionActions.test.js +++ b/packages/material-ui/src/AccordionActions/AccordionActions.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import AccordionActions, { accordionActionsClasses as classes, } from '@material-ui/core/AccordionActions'; @@ -7,7 +7,7 @@ import AccordionActions, { describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance, () => ({ + describeConformance(Conformance, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/AccordionDetails/AccordionDetails.test.js b/packages/material-ui/src/AccordionDetails/AccordionDetails.test.js index cd5e0f40a3aa38..750d142128801e 100644 --- a/packages/material-ui/src/AccordionDetails/AccordionDetails.test.js +++ b/packages/material-ui/src/AccordionDetails/AccordionDetails.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import AccordionDetails, { accordionDetailsClasses as classes, } from '@material-ui/core/AccordionDetails'; @@ -8,7 +8,7 @@ import AccordionDetails, { describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance, () => ({ + describeConformance(Conformance, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/AccordionSummary/AccordionSummary.test.js b/packages/material-ui/src/AccordionSummary/AccordionSummary.test.js index a59b6e9c18abc7..39239c46b46214 100644 --- a/packages/material-ui/src/AccordionSummary/AccordionSummary.test.js +++ b/packages/material-ui/src/AccordionSummary/AccordionSummary.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; import AccordionSummary, { accordionSummaryClasses as classes, } from '@material-ui/core/AccordionSummary'; @@ -11,7 +11,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/Alert/Alert.test.js b/packages/material-ui/src/Alert/Alert.test.js index 2eab7bf700927f..60ef790036fba3 100644 --- a/packages/material-ui/src/Alert/Alert.test.js +++ b/packages/material-ui/src/Alert/Alert.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Alert, { alertClasses as classes } from '@material-ui/core/Alert'; import Paper from '@material-ui/core/Paper'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Paper, render, diff --git a/packages/material-ui/src/AlertTitle/AlertTitle.test.js b/packages/material-ui/src/AlertTitle/AlertTitle.test.js index db65d3f53ba2be..73e332c4a2ee68 100644 --- a/packages/material-ui/src/AlertTitle/AlertTitle.test.js +++ b/packages/material-ui/src/AlertTitle/AlertTitle.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import AlertTitle, { alertTitleClasses as classes } from '@material-ui/core/AlertTitle'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/AppBar/AppBar.test.js b/packages/material-ui/src/AppBar/AppBar.test.js index acd3bb304a60c7..d47bdf553592b9 100644 --- a/packages/material-ui/src/AppBar/AppBar.test.js +++ b/packages/material-ui/src/AppBar/AppBar.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5, screen } from 'test/utils'; +import { createClientRender, describeConformance, screen } from 'test/utils'; import AppBar, { appBarClasses as classes } from '@material-ui/core/AppBar'; import Paper from '@material-ui/core/Paper'; describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance?, () => ({ + describeConformance(Conformance?, () => ({ classes, inheritComponent: Paper, render, diff --git a/packages/material-ui/src/Autocomplete/Autocomplete.test.js b/packages/material-ui/src/Autocomplete/Autocomplete.test.js index 94e9b9e832aba6..37c9c56279b005 100644 --- a/packages/material-ui/src/Autocomplete/Autocomplete.test.js +++ b/packages/material-ui/src/Autocomplete/Autocomplete.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { describeConformanceV5, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; import { spy } from 'sinon'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import TextField from '@material-ui/core/TextField'; @@ -29,7 +29,7 @@ function checkHighlightIs(listbox, expected) { describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance( } />, () => ({ classes, diff --git a/packages/material-ui/src/Avatar/Avatar.test.js b/packages/material-ui/src/Avatar/Avatar.test.js index aa9f804dfa4667..6776160d10450c 100644 --- a/packages/material-ui/src/Avatar/Avatar.test.js +++ b/packages/material-ui/src/Avatar/Avatar.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, fireEvent, describeConformanceV5 } from 'test/utils'; +import { createClientRender, fireEvent, describeConformance } from 'test/utils'; import { spy } from 'sinon'; import Avatar, { avatarClasses as classes } from '@material-ui/core/Avatar'; import CancelIcon from '../internal/svg-icons/Cancel'; @@ -8,7 +8,7 @@ import CancelIcon from '../internal/svg-icons/Cancel'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/AvatarGroup/AvatarGroup.test.js b/packages/material-ui/src/AvatarGroup/AvatarGroup.test.js index 99eced4ccd7c2f..a3bf5b9778dc5e 100644 --- a/packages/material-ui/src/AvatarGroup/AvatarGroup.test.js +++ b/packages/material-ui/src/AvatarGroup/AvatarGroup.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import Avatar from '@material-ui/core/Avatar'; import AvatarGroup, { avatarGroupClasses as classes } from '@material-ui/core/AvatarGroup'; describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/Backdrop/Backdrop.test.js b/packages/material-ui/src/Backdrop/Backdrop.test.js index 86b1a8631906da..8e6e151b830338 100644 --- a/packages/material-ui/src/Backdrop/Backdrop.test.js +++ b/packages/material-ui/src/Backdrop/Backdrop.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { createClientRender, describeConformanceV5, act } from 'test/utils'; +import { createClientRender, describeConformance, act } from 'test/utils'; import Backdrop, { backdropClasses as classes } from '@material-ui/core/Backdrop'; import Fade from '@material-ui/core/Fade'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Fade, render, diff --git a/packages/material-ui/src/Badge/Badge.test.js b/packages/material-ui/src/Badge/Badge.test.js index afb44c642a64cd..7e35341591f213 100644 --- a/packages/material-ui/src/Badge/Badge.test.js +++ b/packages/material-ui/src/Badge/Badge.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { BadgeUnstyled } from '@material-ui/unstyled'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Badge, { badgeClasses as classes } from '@material-ui/core/Badge'; function findBadge(container) { @@ -20,7 +20,7 @@ describe('', () => { badgeContent: 10, }; - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/BottomNavigation/BottomNavigation.test.js b/packages/material-ui/src/BottomNavigation/BottomNavigation.test.js index 8e8a457d1542d0..4442645c5c6633 100755 --- a/packages/material-ui/src/BottomNavigation/BottomNavigation.test.js +++ b/packages/material-ui/src/BottomNavigation/BottomNavigation.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createClientRender, fireEvent } from 'test/utils'; import BottomNavigation, { bottomNavigationClasses as classes, } from '@material-ui/core/BottomNavigation'; @@ -16,7 +16,7 @@ describe('', () => { const icon = restore; const getBottomNavigation = (container) => container.firstChild; - describeConformanceV5( + describeConformance( , diff --git a/packages/material-ui/src/BottomNavigationAction/BottomNavigationAction.test.js b/packages/material-ui/src/BottomNavigationAction/BottomNavigationAction.test.js index 1ce858bd8e90e5..72e920bd206d9e 100644 --- a/packages/material-ui/src/BottomNavigationAction/BottomNavigationAction.test.js +++ b/packages/material-ui/src/BottomNavigationAction/BottomNavigationAction.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { describeConformanceV5, createClientRender, within, fireEvent } from 'test/utils'; +import { describeConformance, createClientRender, within, fireEvent } from 'test/utils'; import BottomNavigationAction, { bottomNavigationActionClasses as classes, } from '@material-ui/core/BottomNavigationAction'; @@ -10,7 +10,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/Box/Box.test.js b/packages/material-ui/src/Box/Box.test.js index 790053b40a86bc..f45ec03708a431 100644 --- a/packages/material-ui/src/Box/Box.test.js +++ b/packages/material-ui/src/Box/Box.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Box from '@material-ui/core/Box'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ render, inheritComponent: 'div', skip: [ diff --git a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js index dfa7131494cbc9..0400fabea85e20 100644 --- a/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js +++ b/packages/material-ui/src/Breadcrumbs/Breadcrumbs.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { act, describeConformanceV5, createClientRender, screen } from 'test/utils'; +import { act, describeConformance, createClientRender, screen } from 'test/utils'; import Breadcrumbs, { breadcrumbsClasses as classes } from '@material-ui/core/Breadcrumbs'; describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance?, () => ({ + describeConformance(Conformance?, () => ({ classes, inheritComponent: 'nav', render, diff --git a/packages/material-ui/src/Button/Button.test.js b/packages/material-ui/src/Button/Button.test.js index 6fed3d2ece3767..314690468d5420 100644 --- a/packages/material-ui/src/Button/Button.test.js +++ b/packages/material-ui/src/Button/Button.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { - describeConformanceV5, + describeConformance, act, createClientRender, fireEvent, @@ -13,7 +13,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe(', () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/ButtonBase/ButtonBase.test.js b/packages/material-ui/src/ButtonBase/ButtonBase.test.js index 55c50d27c47b16..339119a0e5b4a8 100644 --- a/packages/material-ui/src/ButtonBase/ButtonBase.test.js +++ b/packages/material-ui/src/ButtonBase/ButtonBase.test.js @@ -3,7 +3,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub } from 'sinon'; import { - describeConformanceV5, + describeConformance, act, createClientRender, fireEvent, @@ -33,7 +33,7 @@ describe('', () => { } }); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'button', render, diff --git a/packages/material-ui/src/ButtonBase/TouchRipple.test.js b/packages/material-ui/src/ButtonBase/TouchRipple.test.js index ccfa77cb8b1966..3a82f4a85374dd 100644 --- a/packages/material-ui/src/ButtonBase/TouchRipple.test.js +++ b/packages/material-ui/src/ButtonBase/TouchRipple.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { describeConformanceV5, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createClientRender } from 'test/utils'; import TouchRipple, { DELAY_RIPPLE } from './TouchRipple'; const cb = () => {}; @@ -42,7 +42,7 @@ describe('', () => { }; } - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes: {}, inheritComponent: 'span', render, diff --git a/packages/material-ui/src/ButtonGroup/ButtonGroup.test.js b/packages/material-ui/src/ButtonGroup/ButtonGroup.test.js index 024b78bd1c3b44..355d57bc6be5be 100644 --- a/packages/material-ui/src/ButtonGroup/ButtonGroup.test.js +++ b/packages/material-ui/src/ButtonGroup/ButtonGroup.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ButtonGroup, { buttonGroupClasses as classes } from '@material-ui/core/ButtonGroup'; import Button from '@material-ui/core/Button'; describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance( , diff --git a/packages/material-ui/src/Card/Card.test.tsx b/packages/material-ui/src/Card/Card.test.tsx index 4d2b33cc3090fc..0a83a7f56799cd 100644 --- a/packages/material-ui/src/Card/Card.test.tsx +++ b/packages/material-ui/src/Card/Card.test.tsx @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Card, { cardClasses as classes } from '@material-ui/core/Card'; import Paper from '@material-ui/core/Paper'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Paper, render, diff --git a/packages/material-ui/src/CardActionArea/CardActionArea.test.js b/packages/material-ui/src/CardActionArea/CardActionArea.test.js index 0da3fca4530cda..b79365ce5329a8 100644 --- a/packages/material-ui/src/CardActionArea/CardActionArea.test.js +++ b/packages/material-ui/src/CardActionArea/CardActionArea.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CardActionArea, { cardActionAreaClasses as classes } from '@material-ui/core/CardActionArea'; import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/CardActions/CardActions.test.js b/packages/material-ui/src/CardActions/CardActions.test.js index ce57bf699d2c75..1b07fcd9d21c60 100644 --- a/packages/material-ui/src/CardActions/CardActions.test.js +++ b/packages/material-ui/src/CardActions/CardActions.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CardActions, { cardActionsClasses as classes } from '@material-ui/core/CardActions'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/CardContent/CardContent.test.js b/packages/material-ui/src/CardContent/CardContent.test.js index b2160bd781025d..b12ef0b9e7396d 100644 --- a/packages/material-ui/src/CardContent/CardContent.test.js +++ b/packages/material-ui/src/CardContent/CardContent.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CardContent, { cardContentClasses as classes } from '@material-ui/core/CardContent'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/CardHeader/CardHeader.test.js b/packages/material-ui/src/CardHeader/CardHeader.test.js index 1d41f850e2b1e5..8307dc918a356b 100644 --- a/packages/material-ui/src/CardHeader/CardHeader.test.js +++ b/packages/material-ui/src/CardHeader/CardHeader.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import { typographyClasses } from '@material-ui/core/Typography'; import CardHeader, { cardHeaderClasses as classes } from '@material-ui/core/CardHeader'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/CardMedia/CardMedia.test.js b/packages/material-ui/src/CardMedia/CardMedia.test.js index e9224ce72e28d9..aa0473ff435567 100644 --- a/packages/material-ui/src/CardMedia/CardMedia.test.js +++ b/packages/material-ui/src/CardMedia/CardMedia.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CardMedia, { cardMediaClasses as classes } from '@material-ui/core/CardMedia'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Checkbox/Checkbox.test.js b/packages/material-ui/src/Checkbox/Checkbox.test.js index 0402766ebb4660..8c7bdf4ef74ab1 100644 --- a/packages/material-ui/src/Checkbox/Checkbox.test.js +++ b/packages/material-ui/src/Checkbox/Checkbox.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createClientRender } from 'test/utils'; import Checkbox, { checkboxClasses as classes } from '@material-ui/core/Checkbox'; import FormControl from '@material-ui/core/FormControl'; import ButtonBase from '@material-ui/core/ButtonBase'; @@ -9,7 +9,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/Chip/Chip.test.js b/packages/material-ui/src/Chip/Chip.test.js index d0e7750d509e61..31d4b74fd4243a 100644 --- a/packages/material-ui/src/Chip/Chip.test.js +++ b/packages/material-ui/src/Chip/Chip.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub } from 'sinon'; import { - describeConformanceV5, + describeConformance, act, createClientRender, fireEvent, @@ -17,7 +17,7 @@ import CheckBox from '../internal/svg-icons/CheckBox'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/CircularProgress/CircularProgress.test.js b/packages/material-ui/src/CircularProgress/CircularProgress.test.js index b7ae80114e5d80..4f3fe4f6ce927c 100644 --- a/packages/material-ui/src/CircularProgress/CircularProgress.test.js +++ b/packages/material-ui/src/CircularProgress/CircularProgress.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import CircularProgress, { circularProgressClasses as classes, } from '@material-ui/core/CircularProgress'; @@ -8,7 +8,7 @@ import CircularProgress, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui/src/Collapse/Collapse.test.js b/packages/material-ui/src/Collapse/Collapse.test.js index af09064f1ecca6..182f39d25146de 100644 --- a/packages/material-ui/src/Collapse/Collapse.test.js +++ b/packages/material-ui/src/Collapse/Collapse.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformanceV5 } from 'test/utils'; +import { act, createClientRender, describeConformance } from 'test/utils'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import { Transition } from 'react-transition-group'; import Collapse, { collapseClasses as classes } from '@material-ui/core/Collapse'; @@ -14,7 +14,7 @@ describe('', () => { children:
, }; - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Transition, render, diff --git a/packages/material-ui/src/Container/Container.test.js b/packages/material-ui/src/Container/Container.test.js index d7bdd0248fe23b..624ac7774523c4 100644 --- a/packages/material-ui/src/Container/Container.test.js +++ b/packages/material-ui/src/Container/Container.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import Container, { containerClasses as classes } from '@material-ui/core/Container'; describe('', () => { @@ -10,7 +10,7 @@ describe('', () => { children:
, }; - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Dialog/Dialog.test.js b/packages/material-ui/src/Dialog/Dialog.test.js index aae355aca83207..300ff78d4d81cf 100644 --- a/packages/material-ui/src/Dialog/Dialog.test.js +++ b/packages/material-ui/src/Dialog/Dialog.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { describeConformanceV5, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; import Modal from '@material-ui/core/Modal'; import Dialog, { dialogClasses as classes } from '@material-ui/core/Dialog'; @@ -43,7 +43,7 @@ describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance( foo , diff --git a/packages/material-ui/src/DialogActions/DialogActions.test.js b/packages/material-ui/src/DialogActions/DialogActions.test.js index 49160ecb45ebd8..962f8b23f4d993 100644 --- a/packages/material-ui/src/DialogActions/DialogActions.test.js +++ b/packages/material-ui/src/DialogActions/DialogActions.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import DialogActions, { dialogActionsClasses as classes } from '@material-ui/core/DialogActions'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/DialogContent/DialogContent.test.js b/packages/material-ui/src/DialogContent/DialogContent.test.js index 88d30bb69dab2b..44687522ba6bc3 100644 --- a/packages/material-ui/src/DialogContent/DialogContent.test.js +++ b/packages/material-ui/src/DialogContent/DialogContent.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import DialogContent, { dialogContentClasses as classes } from '@material-ui/core/DialogContent'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/DialogContentText/DialogContentText.test.js b/packages/material-ui/src/DialogContentText/DialogContentText.test.js index d29fd747b80f97..b3220e489e917c 100644 --- a/packages/material-ui/src/DialogContentText/DialogContentText.test.js +++ b/packages/material-ui/src/DialogContentText/DialogContentText.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Typography from '@material-ui/core/Typography'; import DialogContentText, { dialogContentTextClasses as classes, @@ -8,7 +8,7 @@ import DialogContentText, { describe('', () => { const render = createClientRender(); - describeConformanceV5(foo, () => ({ + describeConformance(foo, () => ({ classes, inheritComponent: Typography, render, diff --git a/packages/material-ui/src/DialogTitle/DialogTitle.test.js b/packages/material-ui/src/DialogTitle/DialogTitle.test.js index fa52ad0952a87c..96775fb37ee2b4 100644 --- a/packages/material-ui/src/DialogTitle/DialogTitle.test.js +++ b/packages/material-ui/src/DialogTitle/DialogTitle.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import DialogTitle, { dialogTitleClasses as classes } from '@material-ui/core/DialogTitle'; describe('', () => { const render = createClientRender(); - describeConformanceV5(foo, () => ({ + describeConformance(foo, () => ({ classes, inheritComponent: 'h2', render, diff --git a/packages/material-ui/src/Divider/Divider.test.js b/packages/material-ui/src/Divider/Divider.test.js index 182beed662e731..7ebc9a30c3c4fd 100644 --- a/packages/material-ui/src/Divider/Divider.test.js +++ b/packages/material-ui/src/Divider/Divider.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import Divider, { dividerClasses as classes } from '@material-ui/core/Divider'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'hr', render, diff --git a/packages/material-ui/src/Drawer/Drawer.test.js b/packages/material-ui/src/Drawer/Drawer.test.js index 954521f1c8d52d..0d7259784154cf 100644 --- a/packages/material-ui/src/Drawer/Drawer.test.js +++ b/packages/material-ui/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, describeConformanceV5, screen } from 'test/utils'; +import { act, createClientRender, describeConformance, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import Drawer, { drawerClasses as classes } from '@material-ui/core/Drawer'; import { getAnchor, isHorizontal } from './Drawer'; @@ -20,7 +20,7 @@ describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/Fab/Fab.test.js b/packages/material-ui/src/Fab/Fab.test.js index 8429d850d55207..f1fa581b5c5fa2 100644 --- a/packages/material-ui/src/Fab/Fab.test.js +++ b/packages/material-ui/src/Fab/Fab.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { - describeConformanceV5, + describeConformance, createClientRender, createServerRender, act, @@ -14,7 +14,7 @@ import Icon from '@material-ui/core/Icon'; describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance?, () => ({ + describeConformance(Conformance?, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/Fade/Fade.test.js b/packages/material-ui/src/Fade/Fade.test.js index 54e69d93295f18..cf0af0bf16ea39 100644 --- a/packages/material-ui/src/Fade/Fade.test.js +++ b/packages/material-ui/src/Fade/Fade.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformanceV5 } from 'test/utils'; +import { act, createClientRender, describeConformance } from 'test/utils'; import { Transition } from 'react-transition-group'; import Fade from '@material-ui/core/Fade'; @@ -13,7 +13,7 @@ describe('', () => { children:
, }; - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes: {}, inheritComponent: Transition, refInstanceof: window.HTMLDivElement, diff --git a/packages/material-ui/src/FilledInput/FilledInput.test.js b/packages/material-ui/src/FilledInput/FilledInput.test.js index 9b308c85f046ac..dc771996366fca 100644 --- a/packages/material-ui/src/FilledInput/FilledInput.test.js +++ b/packages/material-ui/src/FilledInput/FilledInput.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import FilledInput, { filledInputClasses as classes } from '@material-ui/core/FilledInput'; import InputBase from '@material-ui/core/InputBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: InputBase, render, diff --git a/packages/material-ui/src/FormControl/FormControl.test.js b/packages/material-ui/src/FormControl/FormControl.test.js index b7e239935f74e6..1f102a29a7d8d1 100644 --- a/packages/material-ui/src/FormControl/FormControl.test.js +++ b/packages/material-ui/src/FormControl/FormControl.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createClientRender } from 'test/utils'; import FormControl, { formControlClasses as classes } from '@material-ui/core/FormControl'; import Input from '@material-ui/core/Input'; import Select from '@material-ui/core/Select'; @@ -18,7 +18,7 @@ describe('', () => { return null; } - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/FormControlLabel/FormControlLabel.test.js b/packages/material-ui/src/FormControlLabel/FormControlLabel.test.js index 16983bea41e2bd..15e4589fb1774c 100644 --- a/packages/material-ui/src/FormControlLabel/FormControlLabel.test.js +++ b/packages/material-ui/src/FormControlLabel/FormControlLabel.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import FormControlLabel, { formControlLabelClasses as classes, } from '@material-ui/core/FormControlLabel'; @@ -11,7 +11,7 @@ import Typography from '@material-ui/core/Typography'; describe('', () => { const render = createClientRender(); - describeConformanceV5(} />, () => ({ + describeConformance(} />, () => ({ classes, inheritComponent: 'label', render, diff --git a/packages/material-ui/src/FormGroup/FormGroup.test.js b/packages/material-ui/src/FormGroup/FormGroup.test.js index 0e8e0bcf0f8f1b..dd0b4abdd4a23c 100644 --- a/packages/material-ui/src/FormGroup/FormGroup.test.js +++ b/packages/material-ui/src/FormGroup/FormGroup.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import FormGroup, { formGroupClasses as classes } from '@material-ui/core/FormGroup'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/FormHelperText/FormHelperText.test.js b/packages/material-ui/src/FormHelperText/FormHelperText.test.js index 4cc3d4fe01c119..02f2fa10a70877 100644 --- a/packages/material-ui/src/FormHelperText/FormHelperText.test.js +++ b/packages/material-ui/src/FormHelperText/FormHelperText.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import FormHelperText, { formHelperTextClasses as classes } from '@material-ui/core/FormHelperText'; import FormControl from '@material-ui/core/FormControl'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'p', render, diff --git a/packages/material-ui/src/FormLabel/FormLabel.test.js b/packages/material-ui/src/FormLabel/FormLabel.test.js index 166687aa57768a..aa85a95ffbd990 100644 --- a/packages/material-ui/src/FormLabel/FormLabel.test.js +++ b/packages/material-ui/src/FormLabel/FormLabel.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { describeConformanceV5, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createClientRender } from 'test/utils'; import FormLabel, { formLabelClasses as classes } from '@material-ui/core/FormLabel'; import FormControl, { useFormControl } from '@material-ui/core/FormControl'; import { hexToRgb } from '@material-ui/core/styles'; @@ -10,7 +10,7 @@ import defaultTheme from '../styles/defaultTheme'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'label', render, diff --git a/packages/material-ui/src/Grid/Grid.test.js b/packages/material-ui/src/Grid/Grid.test.js index 552c9c37a427c1..8712402d764725 100644 --- a/packages/material-ui/src/Grid/Grid.test.js +++ b/packages/material-ui/src/Grid/Grid.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender, screen } from 'test/utils'; +import { describeConformance, createClientRender, screen } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; import defaultTheme from '@material-ui/core/styles/defaultTheme'; import Grid, { gridClasses as classes } from '@material-ui/core/Grid'; @@ -9,7 +9,7 @@ import { generateRowGap, generateColumnGap } from './Grid'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Grow/Grow.test.js b/packages/material-ui/src/Grow/Grow.test.js index 9a47633bad144f..8a66ab2a94734e 100644 --- a/packages/material-ui/src/Grow/Grow.test.js +++ b/packages/material-ui/src/Grow/Grow.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, useFakeTimers } from 'sinon'; -import { act, createClientRender, describeConformanceV5 } from 'test/utils'; +import { act, createClientRender, describeConformance } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; import { Transition } from 'react-transition-group'; import Grow from '@material-ui/core/Grow'; @@ -15,7 +15,7 @@ describe('', () => { children:
, }; - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/Icon/Icon.test.js b/packages/material-ui/src/Icon/Icon.test.js index 835a814b3304d4..73d59e2cffd31f 100644 --- a/packages/material-ui/src/Icon/Icon.test.js +++ b/packages/material-ui/src/Icon/Icon.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Icon, { iconClasses as classes } from '@material-ui/core/Icon'; describe('', () => { const render = createClientRender(); - describeConformanceV5(account_circle, () => ({ + describeConformance(account_circle, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui/src/IconButton/IconButton.test.js b/packages/material-ui/src/IconButton/IconButton.test.js index c9a7724d3e8218..5a2a241838de0e 100644 --- a/packages/material-ui/src/IconButton/IconButton.test.js +++ b/packages/material-ui/src/IconButton/IconButton.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import IconButton, { iconButtonClasses as classes } from '@material-ui/core/IconButton'; import Icon from '@material-ui/core/Icon'; import ButtonBase from '@material-ui/core/ButtonBase'; @@ -9,7 +9,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(book, () => ({ + describeConformance(book, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/ImageList/ImageList.test.js b/packages/material-ui/src/ImageList/ImageList.test.js index c720a09df4028d..fa2f17ec433954 100644 --- a/packages/material-ui/src/ImageList/ImageList.test.js +++ b/packages/material-ui/src/ImageList/ImageList.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ImageList, { imageListClasses as classes } from '@material-ui/core/ImageList'; const itemsData = [ @@ -19,7 +19,7 @@ const itemsData = [ describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/ImageListItem/ImageListItem.test.js b/packages/material-ui/src/ImageListItem/ImageListItem.test.js index 2a37395e32c6fd..808f42d7d542a7 100644 --- a/packages/material-ui/src/ImageListItem/ImageListItem.test.js +++ b/packages/material-ui/src/ImageListItem/ImageListItem.test.js @@ -1,13 +1,13 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ImageList from '@material-ui/core/ImageList'; import ImageListItem, { imageListItemClasses as classes } from '@material-ui/core/ImageListItem'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'li', render, diff --git a/packages/material-ui/src/ImageListItemBar/ImageListItemBar.test.js b/packages/material-ui/src/ImageListItemBar/ImageListItemBar.test.js index 07f3533d135c8f..ade1a60c0d6303 100644 --- a/packages/material-ui/src/ImageListItemBar/ImageListItemBar.test.js +++ b/packages/material-ui/src/ImageListItemBar/ImageListItemBar.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ImageListItemBar, { imageListItemBarClasses as classes, } from '@material-ui/core/ImageListItemBar'; @@ -8,7 +8,7 @@ import ImageListItemBar, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Input/Input.test.js b/packages/material-ui/src/Input/Input.test.js index 53737b7bcfdbef..da24a8de57698e 100644 --- a/packages/material-ui/src/Input/Input.test.js +++ b/packages/material-ui/src/Input/Input.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import InputBase from '@material-ui/core/InputBase'; import Input, { inputClasses as classes } from '@material-ui/core/Input'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: InputBase, render, diff --git a/packages/material-ui/src/InputAdornment/InputAdornment.test.js b/packages/material-ui/src/InputAdornment/InputAdornment.test.js index 07aabd4fdd6770..54c62d6211b4bf 100644 --- a/packages/material-ui/src/InputAdornment/InputAdornment.test.js +++ b/packages/material-ui/src/InputAdornment/InputAdornment.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import { typographyClasses } from '@material-ui/core/Typography'; import InputAdornment, { inputAdornmentClasses as classes } from '@material-ui/core/InputAdornment'; import TextField from '@material-ui/core/TextField'; @@ -10,7 +10,7 @@ import Input from '@material-ui/core/Input'; describe('', () => { const render = createClientRender(); - describeConformanceV5(foo, () => ({ + describeConformance(foo, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/InputBase/InputBase.test.js b/packages/material-ui/src/InputBase/InputBase.test.js index 6b35a1ff07b7c3..16abfe1ed2d086 100644 --- a/packages/material-ui/src/InputBase/InputBase.test.js +++ b/packages/material-ui/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 { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; import FormControl, { useFormControl } from '@material-ui/core/FormControl'; import InputAdornment from '@material-ui/core/InputAdornment'; import TextField from '@material-ui/core/TextField'; @@ -12,7 +12,7 @@ import InputBase, { inputBaseClasses as classes } from '@material-ui/core/InputB describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/InputLabel/InputLabel.test.js b/packages/material-ui/src/InputLabel/InputLabel.test.js index 5b8d012eab8327..082aa229a38ce3 100644 --- a/packages/material-ui/src/InputLabel/InputLabel.test.js +++ b/packages/material-ui/src/InputLabel/InputLabel.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import PropTypes from 'prop-types'; import { expect } from 'chai'; -import { describeConformanceV5, act, createClientRender } from 'test/utils'; +import { describeConformance, act, createClientRender } from 'test/utils'; import FormControl from '@material-ui/core/FormControl'; import Input from '@material-ui/core/Input'; import FormLabel from '@material-ui/core/FormLabel'; @@ -10,7 +10,7 @@ import InputLabel, { inputLabelClasses as classes } from '@material-ui/core/Inpu describe('', () => { const render = createClientRender(); - describeConformanceV5(Foo, () => ({ + describeConformance(Foo, () => ({ classes, inheritComponent: FormLabel, render, diff --git a/packages/material-ui/src/LinearProgress/LinearProgress.test.js b/packages/material-ui/src/LinearProgress/LinearProgress.test.js index 1e1fa045c5f7cc..0507bf6032a361 100644 --- a/packages/material-ui/src/LinearProgress/LinearProgress.test.js +++ b/packages/material-ui/src/LinearProgress/LinearProgress.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, screen, describeConformanceV5 } from 'test/utils'; +import { createClientRender, screen, describeConformance } from 'test/utils'; import LinearProgress, { linearProgressClasses as classes } from '@material-ui/core/LinearProgress'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui/src/Link/Link.test.js b/packages/material-ui/src/Link/Link.test.js index 7efd816caa4bdc..b753ffaefc1458 100644 --- a/packages/material-ui/src/Link/Link.test.js +++ b/packages/material-ui/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, describeConformanceV5 } from 'test/utils'; +import { act, createClientRender, fireEvent, describeConformance } from 'test/utils'; import Link, { linkClasses as classes } from '@material-ui/core/Link'; import Typography, { typographyClasses } from '@material-ui/core/Typography'; @@ -16,7 +16,7 @@ function focusVisible(element) { describe('', () => { const render = createClientRender(); - describeConformanceV5(Home, () => ({ + describeConformance(Home, () => ({ classes, inheritComponent: Typography, render, diff --git a/packages/material-ui/src/List/List.test.js b/packages/material-ui/src/List/List.test.js index fe03d153c38cce..d2982841119a71 100644 --- a/packages/material-ui/src/List/List.test.js +++ b/packages/material-ui/src/List/List.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import ListSubheader, { listSubheaderClasses } from '@material-ui/core/ListSubheader'; import ListItem, { listItemClasses } from '@material-ui/core/ListItem'; import List, { listClasses as classes } from '@material-ui/core/List'; @@ -8,7 +8,7 @@ import List, { listClasses as classes } from '@material-ui/core/List'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'ul', render, diff --git a/packages/material-ui/src/ListItem/ListItem.test.js b/packages/material-ui/src/ListItem/ListItem.test.js index ebb3bbbd194a7e..a479b48e1710b6 100644 --- a/packages/material-ui/src/ListItem/ListItem.test.js +++ b/packages/material-ui/src/ListItem/ListItem.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { describeConformanceV5, act, createClientRender, fireEvent, queries } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent, queries } from 'test/utils'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import ListItemText from '@material-ui/core/ListItemText'; import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; @@ -15,7 +15,7 @@ const NoContent = React.forwardRef(() => { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'li', render, diff --git a/packages/material-ui/src/ListItemAvatar/ListItemAvatar.test.js b/packages/material-ui/src/ListItemAvatar/ListItemAvatar.test.js index 53ea5fc91039ab..36a391aabcf5ef 100644 --- a/packages/material-ui/src/ListItemAvatar/ListItemAvatar.test.js +++ b/packages/material-ui/src/ListItemAvatar/ListItemAvatar.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ListItemAvatar, { listItemAvatarClasses as classes } from '@material-ui/core/ListItemAvatar'; describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/ListItemButton/ListItemButton.test.js b/packages/material-ui/src/ListItemButton/ListItemButton.test.js index e55a47ddd4004f..ce9f3069a5a8f1 100644 --- a/packages/material-ui/src/ListItemButton/ListItemButton.test.js +++ b/packages/material-ui/src/ListItemButton/ListItemButton.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; import ListItemButton, { listItemButtonClasses as classes } from '@material-ui/core/ListItemButton'; import ButtonBase from '@material-ui/core/ButtonBase'; import ListContext from '../List/ListContext'; @@ -8,7 +8,7 @@ import ListContext from '../List/ListContext'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/ListItemIcon/ListItemIcon.test.js b/packages/material-ui/src/ListItemIcon/ListItemIcon.test.js index adb6760352d985..3ad13b4115a6a6 100644 --- a/packages/material-ui/src/ListItemIcon/ListItemIcon.test.js +++ b/packages/material-ui/src/ListItemIcon/ListItemIcon.test.js @@ -1,11 +1,11 @@ import * as React from 'react'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ListItemIcon, { listItemIconClasses as classes } from '@material-ui/core/ListItemIcon'; describe('', () => { const render = createClientRender(); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js b/packages/material-ui/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js index febfa717f05a9d..938fa981c41ebf 100644 --- a/packages/material-ui/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js +++ b/packages/material-ui/src/ListItemSecondaryAction/ListItemSecondaryAction.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import ListItem from '@material-ui/core/ListItem'; import ListItemSecondaryAction, { listItemSecondaryActionClasses as classes, @@ -9,7 +9,7 @@ import ListItemSecondaryAction, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/ListItemText/ListItemText.test.js b/packages/material-ui/src/ListItemText/ListItemText.test.js index 0fcd7665d1f140..7d8e03c7be50c0 100644 --- a/packages/material-ui/src/ListItemText/ListItemText.test.js +++ b/packages/material-ui/src/ListItemText/ListItemText.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Typography, { typographyClasses } from '@material-ui/core/Typography'; import ListItemText, { listItemTextClasses as classes } from '@material-ui/core/ListItemText'; describe('', () => { const render = createClientRender(); - describeConformanceV5(Conformance?, () => ({ + describeConformance(Conformance?, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/ListSubheader/ListSubheader.test.js b/packages/material-ui/src/ListSubheader/ListSubheader.test.js index 8cd213c89d287e..f02621f141616b 100644 --- a/packages/material-ui/src/ListSubheader/ListSubheader.test.js +++ b/packages/material-ui/src/ListSubheader/ListSubheader.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import ListSubheader, { listSubheaderClasses as classes } from '@material-ui/core/ListSubheader'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'li', render, diff --git a/packages/material-ui/src/Menu/Menu.test.js b/packages/material-ui/src/Menu/Menu.test.js index 6a77f9c009950b..b1bc7ccd78e091 100644 --- a/packages/material-ui/src/Menu/Menu.test.js +++ b/packages/material-ui/src/Menu/Menu.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { spy, useFakeTimers } from 'sinon'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5, screen, fireEvent } from 'test/utils'; +import { createClientRender, describeConformance, screen, fireEvent } from 'test/utils'; import Menu, { menuClasses as classes } from '@material-ui/core/Menu'; import Popover from '@material-ui/core/Popover'; @@ -19,7 +19,7 @@ describe('', () => { const render = createClientRender(); - describeConformanceV5( document.createElement('div')} open />, () => ({ + describeConformance( document.createElement('div')} open />, () => ({ classes, inheritComponent: Popover, render, diff --git a/packages/material-ui/src/MenuItem/MenuItem.test.js b/packages/material-ui/src/MenuItem/MenuItem.test.js index cbceac934bbd0b..6642a8736fb4bf 100644 --- a/packages/material-ui/src/MenuItem/MenuItem.test.js +++ b/packages/material-ui/src/MenuItem/MenuItem.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { act, describeConformanceV5, createClientRender, fireEvent, screen } from 'test/utils'; +import { act, describeConformance, createClientRender, fireEvent, screen } from 'test/utils'; import MenuItem, { menuItemClasses as classes } from '@material-ui/core/MenuItem'; import ButtonBase from '@material-ui/core/ButtonBase'; import ListContext from '../List/ListContext'; @@ -9,7 +9,7 @@ import ListContext from '../List/ListContext'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/MenuList/MenuList.test.js b/packages/material-ui/src/MenuList/MenuList.test.js index fc234077dcb0e2..1e4c047fed4a35 100644 --- a/packages/material-ui/src/MenuList/MenuList.test.js +++ b/packages/material-ui/src/MenuList/MenuList.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { stub } from 'sinon'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import MenuList from '@material-ui/core/MenuList'; import List from '@material-ui/core/List'; import getScrollbarSize from '../utils/getScrollbarSize'; @@ -19,7 +19,7 @@ function setStyleWidthForJsdomOrBrowser(style, width) { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes: {}, inheritComponent: List, refInstanceof: window.HTMLUListElement, diff --git a/packages/material-ui/src/MobileStepper/MobileStepper.test.js b/packages/material-ui/src/MobileStepper/MobileStepper.test.js index cfeb6503600667..f9c7ed501cb832 100644 --- a/packages/material-ui/src/MobileStepper/MobileStepper.test.js +++ b/packages/material-ui/src/MobileStepper/MobileStepper.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5, screen } from 'test/utils'; +import { createClientRender, describeConformance, screen } from 'test/utils'; import Paper, { paperClasses } from '@material-ui/core/Paper'; import Button from '@material-ui/core/Button'; import MobileStepper, { mobileStepperClasses as classes } from '@material-ui/core/MobileStepper'; @@ -25,7 +25,7 @@ describe('', () => { ), }; - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Paper, render, diff --git a/packages/material-ui/src/Modal/Modal.test.js b/packages/material-ui/src/Modal/Modal.test.js index a2b006832ca82d..ea40bb1288a0e8 100644 --- a/packages/material-ui/src/Modal/Modal.test.js +++ b/packages/material-ui/src/Modal/Modal.test.js @@ -8,7 +8,7 @@ import { createClientRender, fireEvent, within, - describeConformanceV5, + describeConformance, screen, } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; @@ -28,7 +28,7 @@ describe('', () => { document.body.setAttribute('style', savedBodyStyle); }); - describeConformanceV5( + describeConformance(
, diff --git a/packages/material-ui/src/NativeSelect/NativeSelect.test.js b/packages/material-ui/src/NativeSelect/NativeSelect.test.js index c3e4998f8d6faf..ca8a0a2e9e59b7 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelect.test.js +++ b/packages/material-ui/src/NativeSelect/NativeSelect.test.js @@ -1,7 +1,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { createTheme, ThemeProvider, styled } from '@material-ui/core/styles'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import NativeSelect, { nativeSelectClasses as classes } from '@material-ui/core/NativeSelect'; import Input, { inputClasses } from '@material-ui/core/Input'; @@ -19,7 +19,7 @@ describe('', () => { ], }; - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: Input, render, diff --git a/packages/material-ui/src/NativeSelect/NativeSelectInput.test.js b/packages/material-ui/src/NativeSelect/NativeSelectInput.test.js index 84ba503cffaf1a..e01295d3b225b1 100644 --- a/packages/material-ui/src/NativeSelect/NativeSelectInput.test.js +++ b/packages/material-ui/src/NativeSelect/NativeSelectInput.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, createClientRender, fireEvent } from 'test/utils'; import NativeSelectInput from './NativeSelectInput'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ only: ['refForwarding'], refInstanceof: window.HTMLSelectElement, muiName: 'MuiNativeSelectInput', diff --git a/packages/material-ui/src/OutlinedInput/OutlinedInput.test.js b/packages/material-ui/src/OutlinedInput/OutlinedInput.test.js index e6425c6119c2c8..55148a297926a5 100644 --- a/packages/material-ui/src/OutlinedInput/OutlinedInput.test.js +++ b/packages/material-ui/src/OutlinedInput/OutlinedInput.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import OutlinedInput, { outlinedInputClasses as classes } from '@material-ui/core/OutlinedInput'; import InputBase from '@material-ui/core/InputBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: InputBase, render, diff --git a/packages/material-ui/src/Pagination/Pagination.test.js b/packages/material-ui/src/Pagination/Pagination.test.js index 9d75995933d76d..df2e93bf788007 100644 --- a/packages/material-ui/src/Pagination/Pagination.test.js +++ b/packages/material-ui/src/Pagination/Pagination.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy } from 'sinon'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; import Pagination, { paginationClasses as classes } from '@material-ui/core/Pagination'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'nav', render, diff --git a/packages/material-ui/src/PaginationItem/PaginationItem.test.js b/packages/material-ui/src/PaginationItem/PaginationItem.test.js index 33eed6f70a94aa..30a70aee878192 100644 --- a/packages/material-ui/src/PaginationItem/PaginationItem.test.js +++ b/packages/material-ui/src/PaginationItem/PaginationItem.test.js @@ -1,12 +1,12 @@ import * as React from 'react'; import { expect } from 'chai'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import PaginationItem, { paginationItemClasses as classes } from '@material-ui/core/PaginationItem'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'button', render, diff --git a/packages/material-ui/src/Paper/Paper.test.js b/packages/material-ui/src/Paper/Paper.test.js index 37b2d617f6b7da..8946415d04ea49 100644 --- a/packages/material-ui/src/Paper/Paper.test.js +++ b/packages/material-ui/src/Paper/Paper.test.js @@ -1,14 +1,14 @@ import * as React from 'react'; import { expect } from 'chai'; import PropTypes from 'prop-types'; -import { createClientRender, describeConformanceV5 } from 'test/utils'; +import { createClientRender, describeConformance } from 'test/utils'; import Paper, { paperClasses as classes } from '@material-ui/core/Paper'; import { createTheme, ThemeProvider } from '@material-ui/core/styles'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Popover/Popover.test.js b/packages/material-ui/src/Popover/Popover.test.js index 531dbb78d84046..ab93bca769f8a5 100644 --- a/packages/material-ui/src/Popover/Popover.test.js +++ b/packages/material-ui/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, describeConformanceV5, screen } from 'test/utils'; +import { act, createMount, createClientRender, describeConformance, screen } from 'test/utils'; import PropTypes from 'prop-types'; import Grow from '@material-ui/core/Grow'; import Modal from '@material-ui/core/Modal'; @@ -48,7 +48,7 @@ describe('', () => { const mount = createMount(); const render = createClientRender(); - describeConformanceV5( document.createElement('div')} open />, () => ({ + describeConformance( document.createElement('div')} open />, () => ({ classes, inheritComponent: Modal, render, diff --git a/packages/material-ui/src/Popper/Popper.test.js b/packages/material-ui/src/Popper/Popper.test.js index cca09859a18126..046bc3baa73daa 100644 --- a/packages/material-ui/src/Popper/Popper.test.js +++ b/packages/material-ui/src/Popper/Popper.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { useFakeTimers } from 'sinon'; import PropTypes from 'prop-types'; -import { describeConformanceV5, act, createClientRender, fireEvent, screen } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent, screen } from 'test/utils'; import { ThemeProvider, createTheme } from '@material-ui/core/styles'; import Grow from '@material-ui/core/Grow'; import Popper from '@material-ui/core/Popper'; @@ -22,7 +22,7 @@ describe('', () => { }); }); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes: {}, inheritComponent: 'div', refInstanceof: window.HTMLDivElement, diff --git a/packages/material-ui/src/Radio/Radio.test.js b/packages/material-ui/src/Radio/Radio.test.js index d19e0b5d481649..3213fc862196ba 100644 --- a/packages/material-ui/src/Radio/Radio.test.js +++ b/packages/material-ui/src/Radio/Radio.test.js @@ -1,6 +1,6 @@ import * as React from 'react'; import { expect } from 'chai'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import Radio, { radioClasses as classes } from '@material-ui/core/Radio'; import FormControl from '@material-ui/core/FormControl'; import ButtonBase from '@material-ui/core/ButtonBase'; @@ -8,7 +8,7 @@ import ButtonBase from '@material-ui/core/ButtonBase'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: ButtonBase, render, diff --git a/packages/material-ui/src/RadioGroup/RadioGroup.test.js b/packages/material-ui/src/RadioGroup/RadioGroup.test.js index 350f7c294ba35d..948b41079294d5 100644 --- a/packages/material-ui/src/RadioGroup/RadioGroup.test.js +++ b/packages/material-ui/src/RadioGroup/RadioGroup.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 { describeConformanceV5, act, createClientRender, fireEvent } from 'test/utils'; +import { describeConformance, act, createClientRender, fireEvent } from 'test/utils'; import FormGroup from '@material-ui/core/FormGroup'; import Radio from '@material-ui/core/Radio'; import RadioGroup, { useRadioGroup } from '@material-ui/core/RadioGroup'; @@ -10,7 +10,7 @@ import RadioGroup, { useRadioGroup } from '@material-ui/core/RadioGroup'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes: {}, inheritComponent: FormGroup, refInstanceof: window.HTMLDivElement, diff --git a/packages/material-ui/src/Rating/Rating.test.js b/packages/material-ui/src/Rating/Rating.test.js index f4c40a002a7b03..8effd0f8a9ff88 100644 --- a/packages/material-ui/src/Rating/Rating.test.js +++ b/packages/material-ui/src/Rating/Rating.test.js @@ -1,13 +1,13 @@ import * as React from 'react'; import { expect } from 'chai'; import { stub, spy } from 'sinon'; -import { act, describeConformanceV5, createClientRender, fireEvent, screen } from 'test/utils'; +import { act, describeConformance, createClientRender, fireEvent, screen } from 'test/utils'; import Rating, { ratingClasses as classes } from '@material-ui/core/Rating'; describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'span', render, diff --git a/packages/material-ui/src/ScopedCssBaseline/ScopedCssBaseline.test.js b/packages/material-ui/src/ScopedCssBaseline/ScopedCssBaseline.test.js index 7cd99a3d6496f4..b158798ddff583 100644 --- a/packages/material-ui/src/ScopedCssBaseline/ScopedCssBaseline.test.js +++ b/packages/material-ui/src/ScopedCssBaseline/ScopedCssBaseline.test.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { describeConformanceV5, createClientRender } from 'test/utils'; +import { describeConformance, createClientRender } from 'test/utils'; import ScopedCssBaseline, { scopedCssBaselineClasses as classes, } from '@material-ui/core/ScopedCssBaseline'; @@ -7,7 +7,7 @@ import ScopedCssBaseline, { describe('', () => { const render = createClientRender(); - describeConformanceV5(, () => ({ + describeConformance(, () => ({ classes, inheritComponent: 'div', render, diff --git a/packages/material-ui/src/Select/Select.test.js b/packages/material-ui/src/Select/Select.test.js index 6ff616136cad53..fa0b05474b47f1 100644 --- a/packages/material-ui/src/Select/Select.test.js +++ b/packages/material-ui/src/Select/Select.test.js @@ -2,7 +2,7 @@ import * as React from 'react'; import { expect } from 'chai'; import { spy, stub, useFakeTimers } from 'sinon'; import { - describeConformanceV5, + describeConformance, ErrorBoundary, act, createClientRender, @@ -32,7 +32,7 @@ describe(', () => ({ + describeConformance(