@@ -3,11 +3,12 @@ import PropTypes from 'prop-types';
3
3
import { expect } from 'chai' ;
4
4
import { spy } from 'sinon' ;
5
5
import { describeConformance , act , createRenderer , fireEvent , screen } from 'test/utils' ;
6
- import { ThemeProvider } from '@emotion/react' ;
7
6
import FormControl , { useFormControl } from '@mui/material-next/FormControl' ;
7
+ // TODO v6: replace with material-next/InputAdornment
8
8
import InputAdornment from '@mui/material/InputAdornment' ;
9
+ // TODO v6: replace with material-next/TextField
9
10
import TextField from '@mui/material/TextField' ;
10
- import { createTheme } from '@mui/ material/styles' ;
11
+ // TODO v6: replace with material-next/Select
11
12
import Select from '@mui/material/Select' ;
12
13
import InputBase , { inputBaseClasses as classes } from '@mui/material-next/InputBase' ;
13
14
import { CssVarsProvider , extendTheme } from '@mui/material-next/styles' ;
@@ -670,25 +671,31 @@ describe('<InputBase />', () => {
670
671
} ) ;
671
672
672
673
describe ( 'prop: focused' , ( ) => {
673
- // TODO v6: use material-next/TextField
674
+ // TODO v6: requires material-next/OutlinedInput
674
675
// eslint-disable-next-line mocha/no-skipped-tests
675
- it . skip ( 'should render correct border color with `ThemeProvider` imported from `@emotion/react` ' , function test ( ) {
676
+ it . skip ( 'should render correct border color with a customized primary color supplied to CssVarsProvider ' , function test ( ) {
676
677
if ( / j s d o m / . test ( window . navigator . userAgent ) ) {
677
678
this . skip ( ) ;
678
679
}
679
- const theme = createTheme ( {
680
- palette : {
681
- mode : 'light' ,
682
- primary : {
683
- main : 'rgb(0, 191, 165)' ,
680
+ const theme = extendTheme ( {
681
+ colorSchemes : {
682
+ light : {
683
+ palette : {
684
+ primary : {
685
+ main : 'rgb(0, 191, 165)' ,
686
+ } ,
687
+ } ,
684
688
} ,
685
689
} ,
686
690
} ) ;
687
691
const { getByRole } = render (
688
- < ThemeProvider theme = { theme } >
692
+ < CssVarsProvider theme = { theme } >
693
+ { /* TODO v6: use material-next/TextField or OutlinedInput */ }
689
694
< TextField focused label = "Your email" />
690
- </ ThemeProvider > ,
695
+ </ CssVarsProvider > ,
691
696
) ;
697
+
698
+ // this `fieldset` is the (internal) NotchedOutline component
692
699
const fieldset = getByRole ( 'textbox' ) . nextSibling ;
693
700
expect ( fieldset ) . toHaveComputedStyle ( {
694
701
borderTopColor : 'rgb(0, 191, 165)' ,
0 commit comments