/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/mui-material/src/FormGroup/FormGroup.test.js
45 строк
1 KB
Zeeshan Tamboli
[test] Remove `componentsProp` from `describeConformance` tests (#48142)
30 мар 2026, 10:17
Не верифицирован
30 мар 2026, 10:17
f6db10a
Код
Авторство
О чём код?
import { expect } from 'chai'; import { createRenderer, screen } from '@mui/internal-test-utils'; import FormGroup, { formGroupClasses as classes } from '@mui/material/FormGroup'; import FormControl from '@mui/material/FormControl'; import describeConformance from '../../test/describeConformance'; describe('<FormGroup />', () => { const { render } = createRenderer(); describeConformance(<FormGroup />, () => ({ classes, inheritComponent: 'div', render, muiName: 'MuiFormGroup', refInstanceof: window.HTMLDivElement, testVariantProps: { row: true }, skip: ['componentProp'], })); it('should render a div with a div child', () => { render( <FormGroup> <div data-testid="test-children" /> </FormGroup>, ); expect(screen.queryByTestId('test-children')).not.to.equal(null); }); describe('with FormControl', () => { describe('error', () => { it(`should have the error class`, () => { render( <FormControl error> <FormGroup data-testid="FormGroup"> <div /> </FormGroup> </FormControl>, ); expect(screen.getByTestId('FormGroup')).to.have.class(classes.error); }); }); }); });