Skip to content

Commit

Permalink
[core] Remove dead code (mui#11791)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Jun 9, 2018
1 parent a2ac707 commit ea52982
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 36 deletions.
1 change: 0 additions & 1 deletion packages/material-ui-lab/src/SpeedDial/SpeedDial.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class SpeedDial extends React.Component {
ref={node => {
this.fab = node;
}}
data-mui-test="SpeedDial"
{...ButtonProps}
>
{icon()}
Expand Down
29 changes: 0 additions & 29 deletions packages/material-ui-lab/src/SpeedDial/SpeedDial.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
// import keycode from 'keycode';
import { assert } from 'chai';
import { spy } from 'sinon';
import { createMount, createShallow, getClasses } from '@material-ui/core/test-utils';
Expand Down Expand Up @@ -115,16 +114,6 @@ describe('<SpeedDial />', () => {
assert.strictEqual(actionsWrapper.childAt(1).props().open, true, 'open should be true');
});

// it('has a ref on the Button', () => {
// const wrapper = mount(
// <SpeedDial ariaLabel="mySpeedDial">
// <div />
// </SpeedDial>,
// );
// const buttonWrapper = wrapper.childAt(0).childAt(0);
// assert.strictEqual(buttonWrapper.instance().fab.props['data-mui-test'], 'SpeedDialAction');
// });

describe('prop: onKeyDown', () => {
it('should be called when a key is pressed', () => {
const handleKeyDown = spy();
Expand All @@ -140,22 +129,4 @@ describe('<SpeedDial />', () => {
assert.strictEqual(handleKeyDown.args[0][0], event);
});
});

// describe('escape', () => {
// it('should focus when a esc key is pressed', () => {
// const SpeedDialUnwrapped = unwrap(SpeedDial);
// const wrapper2 = mount(
// <SpeedDialUnwrapped classes={{}} ariaLabel="mySpeedDial">
// <div />
// </SpeedDialUnwrapped>,
// );
// const handleFocus = spy();
// wrapper2.instance().fab.focus = handleFocus;
// wrapper2.find('button').simulate('keydown', {
// preventDefault: () => {},
// keyCode: keycode('esc'),
// });
// assert.strictEqual(handleFocus.callCount, 1);
// });
// });
});
1 change: 0 additions & 1 deletion packages/material-ui/src/Dialog/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ function Dialog(props) {
{...TransitionProps}
>
<Paper
data-mui-test="Dialog"
elevation={24}
className={classNames(classes.paper, {
[classes[`paperWidth${maxWidth ? capitalize(maxWidth) : ''}`]]: maxWidth,
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/DialogTitle/DialogTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function DialogTitle(props) {
const { children, classes, className, disableTypography, ...other } = props;

return (
<div data-mui-test="DialogTitle" className={classNames(classes.root, className)} {...other}>
<div className={classNames(classes.root, className)} {...other}>
{disableTypography ? children : <Typography variant="title">{children}</Typography>}
</div>
);
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui/src/MenuList/MenuList.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ class MenuList extends React.Component {

return (
<List
data-mui-test="MenuList"
role="menu"
ref={node => {
this.list = node;
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/RadioGroup/RadioGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class RadioGroup extends React.Component {
this.radios = [];

return (
<FormGroup data-mui-test="RadioGroup" role="radiogroup" {...other}>
<FormGroup role="radiogroup" {...other}>
{React.Children.map(children, (child, index) => {
if (!React.isValidElement(child)) {
return null;
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui/src/internal/SwitchBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class SwitchBase extends React.Component {

return (
<IconButton
data-mui-test="SwitchBase"
component="span"
className={classNames(
classes.root,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SimpleMenu extends React.Component {

render() {
return (
<div data-mui-test="SimpleMenu">
<div>
<Menu id="simple-menu" open={this.state.open} onClose={this.handleClose} {...this.props}>
{options.map((label, index) => {
return (
Expand Down

0 comments on commit ea52982

Please sign in to comment.