Skip to content

Commit

Permalink
Remove uniforms-material uniforms-unstyled TextField enzyme test
Browse files Browse the repository at this point in the history
  • Loading branch information
kestarumper committed Feb 9, 2024
1 parent 600f53f commit 8efd147
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 447 deletions.
272 changes: 0 additions & 272 deletions packages/uniforms-material/__tests__/TextField.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
import createMuiTheme, {
ThemeOptions,
} from '@material-ui/core/styles/createMuiTheme';
import ThemeProvider from '@material-ui/styles/ThemeProvider/ThemeProvider';
import React, { PropsWithChildren } from 'react';
import * as theme from 'uniforms-material';
import * as suites from 'uniforms/__suites__';

Expand Down Expand Up @@ -56,7 +61,20 @@ describe('@RTL', () => {
suites.testQuickForm(theme.QuickForm);
suites.testRadioField(theme.RadioField);
suites.testSubmitField(theme.SubmitField);
suites.testTextField(theme.TextField);
suites.testTextField(theme.TextField, {
testPassThemeProps: {
ThemeProvider({
themeOptions,
...props
}: PropsWithChildren<{ themeOptions: ThemeOptions }>) {
return (
<ThemeProvider {...props} theme={createMuiTheme(themeOptions)}>
{props.children}
</ThemeProvider>
);
},
},
});
suites.testValidatedForm(theme.ValidatedForm);
suites.testValidatedQuickForm(theme.ValidatedQuickForm);
});
Loading

0 comments on commit 8efd147

Please sign in to comment.