[inputs] Remove deprecated props & classes#48071
Conversation
Netlify deploy previewBundle size report
|
279b44f to
03a43d0
Compare
03a43d0 to
a16ea77
Compare
a16ea77 to
71ce52e
Compare
| it('should respects the componentsProps if passed', () => { | ||
| render(<FilledInput componentsProps={{ root: { 'data-test': 'test' } }} />); | ||
| expect(document.querySelector('[data-test=test]')).not.to.equal(null); | ||
| }); | ||
|
|
There was a problem hiding this comment.
better convert this to slotProps than removing test?
silviuaavram
left a comment
There was a problem hiding this comment.
some test related comments
| it('should respects the componentsProps if passed', () => { | ||
| render(<Input componentsProps={{ root: { 'data-test': 'test' } }} />); | ||
| expect(document.querySelector('[data-test=test]')).not.to.equal(null); | ||
| }); | ||
|
|
There was a problem hiding this comment.
same here, convert test to slotProps equivalent
| </FormControl>, | ||
| ); | ||
| expect(container.querySelector('input')).to.have.class(classes.inputSizeSmall); | ||
| expect(screen.getByTestId('root')).to.have.class(classes.sizeSmall); |
There was a problem hiding this comment.
should we also check input has class input? when migrating these, I usually check for the equivalents, and in this case, the equivalent also involves input class.
| const { container, setProps } = render(<InputBaseInFormWithMargin />); | ||
| expect(container.querySelector('input')).not.to.have.class(classes.inputSizeSmall); | ||
| const { setProps } = render(<InputBaseInFormWithMargin />); | ||
| expect(screen.getByTestId('root')).not.to.have.class(classes.sizeSmall); |
There was a problem hiding this comment.
same here, check root small and input input
| expect(container.querySelector('input')).to.have.class(classes.inputSizeSmall); | ||
| }); | ||
|
|
||
| it('has an inputHiddenLabel class to further reduce margin', () => { |
There was a problem hiding this comment.
maybe convert this test instead of removing it? check input + hiddenLabel
| expect(document.querySelector('.error')).not.to.equal(null); | ||
| }); | ||
|
|
||
| it('should respects the componentsProps if passed', () => { |
| />, | ||
| ); | ||
|
|
||
| expect(screen.getByTestId('mui-input-base-root')).to.have.class(inputBaseClasses.multiline); |
There was a problem hiding this comment.
let's also check the input has class input
|
Added back all the tests dropped by Claude code 🤡 |
Part of #47987