Skip to content

Commit

Permalink
[test] Remove StyledEngineProvider usage from regressions and e2e tes…
Browse files Browse the repository at this point in the history
…ts (mui#27258)

[test] Remove StyledEngineProvider usage from regressions and e2e tests (mui#27258)
  • Loading branch information
mnajdova authored Jul 14, 2021
1 parent a00ca2e commit d3fbdb2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
10 changes: 3 additions & 7 deletions test/e2e/TestViewer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import PropTypes from 'prop-types';
import { StyledEngineProvider } from '@material-ui/core/styles';

function TestViewer(props) {
const { children } = props;
Expand All @@ -14,12 +13,9 @@ function TestViewer(props) {
}, []);

return (
// TODO v5: remove once migration to emotion is completed
<StyledEngineProvider injectFirst>
<div aria-busy={!ready} data-testid="testcase">
{children}
</div>
</StyledEngineProvider>
<div aria-busy={!ready} data-testid="testcase">
{children}
</div>
);
}

Expand Down
6 changes: 2 additions & 4 deletions test/regressions/TestViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { useFakeTimers } from 'sinon';
import Box from '@material-ui/core/Box';
import GlobalStyles from '@material-ui/core/GlobalStyles';
import { StyledEngineProvider } from '@material-ui/core/styles';

function TestViewer(props) {
const { children } = props;
Expand Down Expand Up @@ -47,8 +46,7 @@ function TestViewer(props) {
}, []);

return (
// TODO v5: remove once migration to emotion is completed
<StyledEngineProvider injectFirst>
<React.Fragment>
<GlobalStyles
styles={{
html: {
Expand Down Expand Up @@ -76,7 +74,7 @@ function TestViewer(props) {
>
{children}
</Box>
</StyledEngineProvider>
</React.Fragment>
);
}

Expand Down

0 comments on commit d3fbdb2

Please sign in to comment.