Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed May 19, 2018
1 parent 32ba3de commit c2caa25
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/material-ui/src/ListItem/ListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ ListItem.propTypes = {
* If `true`, a 1px light border is added to the bottom of the list item.
*/
divider: PropTypes.bool,
/**
* @ignore
*/
focusVisibleClassName: PropTypes.string,
};

Expand Down
11 changes: 11 additions & 0 deletions packages/material-ui/src/ListItem/ListItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,15 @@ describe('<ListItem />', () => {
assert.strictEqual(wrapper.hasClass('bubu'), true);
});
});

describe('prop: focusVisibleClassName', () => {
it('should merge the class names', () => {
const wrapper = shallow(<ListItem button focusVisibleClassName="focusVisibleClassName" />);
assert.strictEqual(wrapper.props().component, 'div');
assert.strictEqual(
wrapper.props().focusVisibleClassName,
`${classes.focusVisible} focusVisibleClassName`,
);
});
});
});
1 change: 0 additions & 1 deletion pages/api/list-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ filename: /packages/material-ui/src/ListItem/ListItem.js
| <span class="prop-name">dense</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, compact vertical padding designed for keyboard and mouse input will be used. |
| <span class="prop-name">disableGutters</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, the left and right padding is removed. |
| <span class="prop-name">divider</span> | <span class="prop-type">bool | <span class="prop-default">false</span> | If `true`, a 1px light border is added to the bottom of the list item. |
| <span class="prop-name">focusVisibleClassName</span> | <span class="prop-type">string |<span class="prop-default"></span> | If passed to the component,the provided CSS class will be applied |

Any other properties supplied will be [spread to the root element](/guides/api#spread).

Expand Down

0 comments on commit c2caa25

Please sign in to comment.