Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] Scope the tests to just Material UI components #35219

Merged
merged 24 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/mui-material/src/Alert/Alert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ describe('<Alert />', () => {
muiName: 'MuiAlert',
testVariantProps: { variant: 'standard', color: 'success' },
testDeepOverrides: { slotName: 'message', slotClassName: classes.message },
slots: {
components: {
closeButton: {},
closeIcon: {},
},
skip: ['componentsProp'],
}));

describe('prop: square', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('<Autocomplete />', () => {
testStateOverrides: { prop: 'fullWidth', value: true, styleKey: 'fullWidth' },
refInstanceof: window.HTMLDivElement,
testComponentPropWith: 'div',
slots: {
components: {
clearIndicator: { expectedClassName: classes.clearIndicator },
paper: { expectedClassName: classes.paper },
popper: { expectedClassName: classes.popper },
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/AvatarGroup/AvatarGroup.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('<AvatarGroup />', () => {
muiName: 'MuiAvatarGroup',
refInstanceof: window.HTMLDivElement,
testVariantProps: { max: 10, spacing: 'small', variant: 'square' },
slots: {
components: {
additionalAvatar: { expectedClassName: classes.avatar },
},
skip: ['componentsProp', 'slotsProp'],
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Backdrop/Backdrop.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('<Backdrop />', () => {
refInstanceof: window.HTMLDivElement,
muiName: 'MuiBackdrop',
testVariantProps: { invisible: true },
slots: {
components: {
root: {
expectedClassName: classes.root,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/FilledInput/FilledInput.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('<FilledInput />', () => {
testDeepOverrides: { slotName: 'input', slotClassName: classes.input },
testVariantProps: { variant: 'contained', fullWidth: true },
testStateOverrides: { prop: 'size', value: 'small', styleKey: 'sizeSmall' },
slots: {
components: {
// can't test with DOM element as Input places an ownerState prop on it unconditionally.
root: { expectedClassName: classes.root, testWithElement: null },
input: { expectedClassName: classes.input, testWithElement: null },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('<FormControlLabel />', () => {
muiName: 'MuiFormControlLabel',
testVariantProps: { disabled: true },
refInstanceof: window.HTMLLabelElement,
slots: {
components: {
typography: { expectedClassName: classes.label },
},
skip: ['componentProp', 'componentsProp', 'slotsProp'],
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Input/Input.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('<Input />', () => {
testDeepOverrides: { slotName: 'input', slotClassName: classes.input },
testVariantProps: { variant: 'contained', fullWidth: true },
testStateOverrides: { prop: 'size', value: 'small', styleKey: 'sizeSmall' },
slots: {
components: {
// can't test with DOM element as Input places an ownerState prop on it unconditionally.
root: { expectedClassName: classes.root, testWithElement: null },
input: { expectedClassName: classes.input, testWithElement: null },
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/InputBase/InputBase.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('<InputBase />', () => {
refInstanceof: window.HTMLDivElement,
muiName: 'MuiInputBase',
testVariantProps: { size: 'small' },
slots: {
components: {
// can't test with DOM element as InputBase places an ownerState prop on it unconditionally.
root: { expectedClassName: classes.root, testWithElement: null },
input: { expectedClassName: classes.input, testWithElement: null },
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/ListItem/ListItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('<ListItem />', () => {
refInstanceof: window.HTMLLIElement,
muiName: 'MuiListItem',
testVariantProps: { dense: true },
slots: {
components: {
root: {},
},
skip: ['componentsProp'],
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Modal/Modal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('<Modal />', () => {
muiName: 'MuiModal',
refInstanceof: window.HTMLDivElement,
testVariantProps: { hideBackdrop: true },
slots: {
components: {
root: { expectedClassName: classes.root },
backdrop: {},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('<OutlinedInput />', () => {
testDeepOverrides: { slotName: 'input', slotClassName: classes.input },
testVariantProps: { variant: 'contained', fullWidth: true },
testStateOverrides: { prop: 'size', value: 'small', styleKey: 'sizeSmall' },
slots: {
components: {
// can't test with DOM element as InputBase places an ownerState prop on it unconditionally.
root: { expectedClassName: classes.root, testWithElement: null },
input: { expectedClassName: classes.input, testWithElement: null },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('<PaginationItem />', () => {
refInstanceof: window.HTMLButtonElement,
testVariantProps: { variant: 'foo' },
testStateOverrides: { prop: 'variant', value: 'outlined', styleKey: 'outlined' },
slots: {
components: {
first: {},
last: {},
previous: {},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Popper/Popper.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('<Popper />', () => {
inheritComponent: 'div',
render,
refInstanceof: window.HTMLDivElement,
slots: {
components: {
root: {},
},
skip: [
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Slider/Slider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('<Slider />', () => {
testDeepOverrides: { slotName: 'thumb', slotClassName: classes.thumb },
testVariantProps: { color: 'primary', orientation: 'vertical', size: 'small' },
testStateOverrides: { prop: 'color', value: 'secondary', styleKey: 'colorSecondary' },
slots: {
components: {
root: {
expectedClassName: classes.root,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/StepLabel/StepLabel.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('<StepLabel />', () => {
render,
refInstanceof: window.HTMLSpanElement,
testVariantProps: { error: true },
slots: {
components: {
label: { expectedClassName: classes.label },
},
skip: ['componentProp', 'componentsProp', 'slotsProp'],
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Tooltip/Tooltip.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('<Tooltip />', () => {
refInstanceof: window.HTMLButtonElement,
testRootOverrides: { slotName: 'popper', slotClassName: classes.popper },
testDeepOverrides: { slotName: 'tooltip', slotClassName: classes.tooltip },
slots: {
components: {
popper: {
expectedClassName: classes.popper,
testWithComponent: TestPopper,
Expand Down
Loading