Skip to content

Commit

Permalink
[core] Remove react-test-renderer (#42853)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah authored Jul 8, 2024
1 parent 814c155 commit 9f1848b
Show file tree
Hide file tree
Showing 50 changed files with 28 additions and 172 deletions.
2 changes: 1 addition & 1 deletion packages/mui-base/src/Menu/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('<Menu />', () => {
expectedClassName: menuClasses.listbox,
},
},
skip: ['reactTestRenderer', 'componentProp', 'slotsProp'],
skip: ['componentProp', 'slotsProp'],
}));

describe('after initialization', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/MenuButton/MenuButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('<MenuButton />', () => {
testWithElement: null,
},
},
skip: ['componentProp', 'reactTestRenderer'],
skip: ['componentProp'],
}));

describe('prop: disabled', () => {
Expand Down
5 changes: 1 addition & 4 deletions packages/mui-base/src/MenuItem/MenuItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ describe('<MenuItem />', () => {
expectedClassName: menuItemClasses.root,
},
},
skip: [
'componentProp',
'reactTestRenderer', // Need to be wrapped in MenuContext
],
skip: ['componentProp'],
}));
});
5 changes: 1 addition & 4 deletions packages/mui-base/src/Modal/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ describe('<Modal />', () => {
expectedClassName: classes.root,
},
},
skip: [
'componentProp',
'reactTestRenderer', // portal https://github.com/facebook/react/issues/11565
],
skip: ['componentProp'],
}),
);

Expand Down
5 changes: 1 addition & 4 deletions packages/mui-base/src/Option/Option.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ describe('<Option />', () => {
expectedClassName: optionClasses.root,
},
},
skip: [
'componentProp',
'reactTestRenderer', // Need to be wrapped in SelectContext
],
skip: ['componentProp'],
}));
});
6 changes: 1 addition & 5 deletions packages/mui-base/src/Popper/Popper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ describe('<Popper />', () => {
inheritComponent: 'div',
render,
refInstanceof: window.HTMLDivElement,
skip: [
// https://github.com/facebook/react/issues/11565
'reactTestRenderer',
'componentProp',
],
skip: ['componentProp'],
slots: {
root: {
expectedClassName: popperClasses.root,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Select/Select.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('<Select />', () => {
testWithElement: 'span',
},
},
skip: ['componentProp', 'reactTestRenderer'],
skip: ['componentProp'],
}));

describe('selected option rendering', () => {
Expand Down
5 changes: 1 addition & 4 deletions packages/mui-base/src/Tab/Tab.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ describe('<Tab />', () => {
expectedClassName: tabClasses.root,
},
},
skip: [
'reactTestRenderer', // Need to be wrapped with TabsContext
'componentProp',
],
skip: ['componentProp'],
}));
});
5 changes: 1 addition & 4 deletions packages/mui-base/src/TabPanel/TabPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ describe('<TabPanel />', () => {
expectedClassName: tabPanelClasses.root,
},
},
skip: [
'reactTestRenderer', // Need to be wrapped with TabsContext
'componentProp',
],
skip: ['componentProp'],
}));
});
5 changes: 1 addition & 4 deletions packages/mui-base/src/TabsList/TabsList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ describe('<TabsList />', () => {
expectedClassName: tabsListClasses.root,
},
},
skip: [
'reactTestRenderer', // Need to be wrapped with TabsContext
'componentProp',
],
skip: ['componentProp'],
}));

describe('accessibility attributes', () => {
Expand Down
6 changes: 1 addition & 5 deletions packages/mui-base/src/Unstable_Popup/Popup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ describe('<Popup />', () => {
return result;
},
refInstanceof: window.HTMLDivElement,
skip: [
// https://github.com/facebook/react/issues/11565
'reactTestRenderer',
'componentProp',
],
skip: ['componentProp'],
slots: {
root: {
expectedClassName: popupClasses.root,
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-base/test/describeConformanceUnstyled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
describeRef,
randomStringValue,
testComponentProp,
testReactTestRenderer,
} from '@mui-internal/test-utils';
import { ClassNameConfigurator } from '@mui/base/utils';

Expand Down Expand Up @@ -405,7 +404,6 @@ const fullSuite = {
slotPropsCallbacks: testSlotPropsCallbacks,
mergeClassName: testClassName,
propsSpread: testPropForwarding,
reactTestRenderer: testReactTestRenderer,
refForwarding: describeRef,
ownerStatePropagation: testOwnerStatePropagation,
disableClassGeneration: testDisablingClassGeneration,
Expand Down
7 changes: 1 addition & 6 deletions packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ describe('Joy <Autocomplete />', () => {
muiName: 'JoyAutocomplete',
testDeepOverrides: { slotName: 'popupIndicator', slotClassName: classes.popupIndicator },
testVariantProps: { size: 'lg' },
skip: [
'componentsProp',
'classesRoot',
// https://github.com/facebook/react/issues/11565
'reactTestRenderer',
],
skip: ['componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
1 change: 0 additions & 1 deletion packages/mui-joy/src/Drawer/Drawer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ describe('<Drawer />', () => {
'componentsProp', // TODO isRTL is leaking, why do we even have it in the first place?
'themeDefaultProps', // portal, can't determine the root
'themeStyleOverrides', // portal, can't determine the root
'reactTestRenderer', // portal https://github.com/facebook/react/issues/11565
],
}),
);
Expand Down
1 change: 0 additions & 1 deletion packages/mui-joy/src/Menu/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('Joy <Menu />', () => {
'classesRoot',
'componentProp',
'componentsProp',
'reactTestRenderer', // react-transition-group issue
'themeDefaultProps', // portal, can't determine the root
],
}));
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/MenuButton/MenuButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('<MenuButton />', () => {
slots: {
root: { expectedClassName: classes.root },
},
skip: ['reactTestRenderer', 'componentsProp', 'classesRoot'],
skip: ['componentsProp', 'classesRoot'],
testRootOverrides: { slotName: 'root', slotClassName: classes.root },
testVariantProps: { variant: 'soft' },
ThemeProvider,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/MenuItem/MenuItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('Joy <MenuItem />', () => {
muiName: 'JoyMenuItem',
testVariantProps: { variant: 'solid' },
testCustomVariant: true,
skip: ['propsSpread', 'componentsProp', 'classesRoot', 'reactTestRenderer'],
skip: ['propsSpread', 'componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
1 change: 0 additions & 1 deletion packages/mui-joy/src/Modal/Modal.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe('<Modal />', () => {
'componentsProp', // TODO isRTL is leaking, why do we even have it in the first place?
'themeDefaultProps', // portal, can't determine the root
'themeStyleOverrides', // portal, can't determine the root
'reactTestRenderer', // portal https://github.com/facebook/react/issues/11565
],
}),
);
Expand Down
9 changes: 1 addition & 8 deletions packages/mui-joy/src/Select/Select.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,7 @@ describe('Joy <Select />', () => {
startDecorator: { expectedClassName: classes.startDecorator },
endDecorator: { expectedClassName: classes.endDecorator },
},
skip: [
'classesRoot',
'propsSpread',
'componentProp',
'componentsProp',
// https://github.com/facebook/react/issues/11565
'reactTestRenderer',
],
skip: ['classesRoot', 'propsSpread', 'componentProp', 'componentsProp'],
}));

it('should be able to mount the component', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/Tab/Tab.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Joy <Tab />', () => {
refInstanceof: window.HTMLButtonElement,
testVariantProps: { variant: 'solid' },
testCustomVariant: true,
skip: ['componentsProp', 'classesRoot', 'reactTestRenderer'],
skip: ['componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/TabList/TabList.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Joy <TabList />', () => {
muiName: 'JoyTabList',
refInstanceof: window.HTMLDivElement,
testVariantProps: { variant: 'solid' },
skip: ['componentsProp', 'classesRoot', 'reactTestRenderer'],
skip: ['componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/TabPanel/TabPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Joy <TabPanel />', () => {
refInstanceof: window.HTMLDivElement,
testVariantProps: { size: 'sm' },
testCustomVariant: true,
skip: ['componentsProp', 'classesRoot', 'reactTestRenderer'],
skip: ['componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
1 change: 0 additions & 1 deletion packages/mui-joy/src/Table/Table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe('<Table />', () => {
'componentProp',
'mergeClassName',
'propsSpread',
'reactTestRenderer',
'refForwarding',
],
slots: {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/Tabs/Tabs.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Joy <Tabs />', () => {
refInstanceof: window.HTMLDivElement,
testVariantProps: { variant: 'solid' },
testCustomVariant: true,
skip: ['componentsProp', 'classesRoot', 'reactTestRenderer'],
skip: ['componentsProp', 'classesRoot'],
slots: {
root: {
expectedClassName: classes.root,
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-joy/src/Tooltip/Tooltip.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ describe('<Tooltip />', () => {
'componentProp',
'componentsProp',
'themeVariants',
// react-transition-group issue
'reactTestRenderer',
// Props are spread to root and children
// We cannot use the standard propsSpread test which relies on data-testid only on the root
'propsSpread',
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-lab/src/TabList/TabList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ describe('<TabList />', () => {
*/
render: (node) => render(<TabContext value="0">{node}</TabContext>),
refInstanceof: window.HTMLDivElement,
// TODO: no idea why reactTestRenderer fails
skip: [
'componentsProp',
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
'rootClass',
'reactTestRenderer',
],
}));

Expand Down
8 changes: 1 addition & 7 deletions packages/mui-lab/src/TabPanel/TabPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ describe('<TabPanel />', () => {
render: (node) => render(<TabContext value="0">{node}</TabContext>),
refInstanceof: window.HTMLDivElement,
muiName: 'MuiTabPanel',
skip: [
'componentProp',
'componentsProp',
'reactTestRenderer',
'themeDefaultProps',
'themeVariants',
],
skip: ['componentProp', 'componentsProp', 'themeDefaultProps', 'themeVariants'],
}));

it('renders a [role="tabpanel"]', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ describe('<Autocomplete />', () => {
'componentProp',
'componentsProp',
'slotsProp',
'reactTestRenderer',
'slotPropsCallback', // not supported yet
],
}),
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Backdrop/Backdrop.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ describe('<Backdrop />', () => {
skip: [
'componentProp',
'componentsProp',
// react-transition-group issue
'reactTestRenderer',
'slotPropsCallback', // not supported yet
],
}));
Expand Down
8 changes: 1 addition & 7 deletions packages/mui-material/src/Dialog/Dialog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,7 @@ describe('<Dialog />', () => {
testVariantProps: { variant: 'foo' },
testDeepOverrides: { slotName: 'paper', slotClassName: classes.paper },
refInstanceof: window.HTMLDivElement,
skip: [
'componentProp',
'componentsProp',
'themeVariants',
// react-transition-group issue
'reactTestRenderer',
],
skip: ['componentProp', 'componentsProp', 'themeVariants'],
}),
);

Expand Down
8 changes: 1 addition & 7 deletions packages/mui-material/src/Drawer/Drawer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ describe('<Drawer />', () => {
testVariantProps: { variant: 'persistent' },
testDeepOverrides: { slotName: 'paper', slotClassName: classes.paper },
refInstanceof: window.HTMLDivElement,
skip: [
'componentProp',
'componentsProp',
'themeVariants',
// react-transition-group issue
'reactTestRenderer',
],
skip: ['componentProp', 'componentsProp', 'themeVariants'],
}),
);

Expand Down
3 changes: 0 additions & 3 deletions packages/mui-material/src/Fade/Fade.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ describe('<Fade />', () => {
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
// TODO: really?
// react-transition-group issue
'reactTestRenderer',
],
}));

Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Grow/Grow.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ describe('<Grow />', () => {
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
// react-transition-group issue
'reactTestRenderer',
],
}),
);
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Menu/Menu.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ describe('<Menu />', () => {
'rootClass', // portal, can't determine the root
'componentProp',
'componentsProp',
'reactTestRenderer', // react-transition-group issue
'themeDefaultProps', // portal, can't determine the root
],
}));
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Modal/Modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ describe('<Modal />', () => {
'componentsProp', // TODO isRTL is leaking, why do we even have it in the first place?
'themeDefaultProps', // portal, can't determine the root
'themeStyleOverrides', // portal, can't determine the root
'reactTestRenderer', // portal https://github.com/facebook/react/issues/11565
'slotPropsCallback', // not supported yet
],
}),
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material/src/Popover/Popover.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ describe('<Popover />', () => {
'themeDefaultProps', // portal, can't determine the root
'themeStyleOverrides', // portal, can't determine the root
'themeVariants',
'reactTestRenderer', // react-transition-group issue
'slotPropsCallback', // not supported yet
],
}));
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Popper/Popper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ describe('<Popper />', () => {
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
// https://github.com/facebook/react/issues/11565
'reactTestRenderer',
'slotPropsCallback', // not supported yet
],
}));
Expand Down
2 changes: 0 additions & 2 deletions packages/mui-material/src/Slide/Slide.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ describe('<Slide />', () => {
'themeDefaultProps',
'themeStyleOverrides',
'themeVariants',
// react-transition-group issue
'reactTestRenderer',
],
}),
);
Expand Down
Loading

0 comments on commit 9f1848b

Please sign in to comment.