Skip to content

Commit

Permalink
update snapshots, avoid fragments bug with enzyme
Browse files Browse the repository at this point in the history
  • Loading branch information
snide committed May 11, 2018
1 parent 700a438 commit 9a4c824
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ exports[`CollapsedItemActions render 1`] = `
disabled={false}
icon={undefined}
onClick={[Function]}
toolTipPosition="right"
>
default1
</EuiContextMenuItem>,
<EuiContextMenuItem
onClick={[Function]}
toolTipPosition="right"
/>,
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
"<EuiContextMenuPanel items={{...}} hasFocus={true}>
<div className=\\"euiContextMenuPanel\\" onKeyDown={[Function]} tabIndex=\\"0\\" onAnimationEnd={[Function]}>
<div>
<EuiContextMenuItem data-counter={0} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={0} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={0}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -124,7 +124,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
</span>
</button>
</EuiContextMenuItem>
<EuiContextMenuItem data-counter={1} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={1} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={1}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -142,7 +142,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
"<EuiContextMenuPanel items={{...}} hasFocus={true}>
<div className=\\"euiContextMenuPanel\\" onKeyDown={[Function]} tabIndex=\\"0\\" onAnimationEnd={[Function]}>
<div>
<EuiContextMenuItem data-counter={0} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={0} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={0}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -151,7 +151,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
</span>
</button>
</EuiContextMenuItem>
<EuiContextMenuItem data-counter={1} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={1} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={1}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand Down Expand Up @@ -189,7 +189,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
"<EuiContextMenuPanel watchedItemProps={{...}} items={{...}} hasFocus={true}>
<div className=\\"euiContextMenuPanel\\" onKeyDown={[Function]} tabIndex=\\"0\\" onAnimationEnd={[Function]}>
<div>
<EuiContextMenuItem data-counter={0} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={0} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={0}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -198,7 +198,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
</span>
</button>
</EuiContextMenuItem>
<EuiContextMenuItem data-counter={1} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={1} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={1}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -216,7 +216,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
"<EuiContextMenuPanel watchedItemProps={{...}} items={{...}} hasFocus={true}>
<div className=\\"euiContextMenuPanel\\" onKeyDown={[Function]} tabIndex=\\"0\\" onAnimationEnd={[Function]}>
<div>
<EuiContextMenuItem data-counter={2} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={2} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={2}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand All @@ -225,7 +225,7 @@ exports[`EuiContextMenuPanel updating items and content updates to items should
</span>
</button>
</EuiContextMenuItem>
<EuiContextMenuItem data-counter={3} buttonRef={[Function: bound ]}>
<EuiContextMenuItem data-counter={3} toolTipPosition=\\"right\\" buttonRef={[Function: bound ]}>
<button className=\\"euiContextMenuItem\\" type=\\"button\\" disabled={[undefined]} data-counter={3}>
<span className=\\"euiContextMenu__itemLayout\\">
<span className=\\"euiContextMenuItem__text\\">
Expand Down
7 changes: 2 additions & 5 deletions src/components/context_menu/context_menu_item.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {
cloneElement,
Component,
Fragment,
} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
Expand Down Expand Up @@ -35,7 +34,7 @@ export class EuiContextMenuItem extends Component {
/**
* Dictates the position of the tooltip.
*/
toolTipPosition: PropTypes.node,
toolTipPosition: PropTypes.string,
};

render() {
Expand Down Expand Up @@ -122,9 +121,7 @@ export class EuiContextMenuItem extends Component {
);
} else {
return (
<Fragment>
{button}
</Fragment>
button
);
}

Expand Down

0 comments on commit 9a4c824

Please sign in to comment.