Skip to content

Commit

Permalink
Fix #2642. Removed entry from counter widget menu (#2729)
Browse files Browse the repository at this point in the history
  • Loading branch information
amusso01 authored and offtherailz committed Mar 12, 2018
1 parent d4e5e5b commit 5fe67f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion web/client/components/widgets/widget/CounterWidget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module.exports = ({
topRightItems={showTable
? null : <ButtonToolbar>
<DropdownButton pullRight bsStyle="default" className="widget-menu" title={<Glyphicon glyph="option-vertical" />} noCaret id="dropdown-no-caret">
<MenuItem onClick={() => toggleTableView()} eventKey="1"><Glyphicon glyph="features-grid"/>&nbsp;<Message msgId="widgets.widget.menu.showChartData" /></MenuItem>
<MenuItem onClick={() => onEdit()} eventKey="3"><Glyphicon glyph="pencil"/>&nbsp;<Message msgId="widgets.widget.menu.edit" /></MenuItem>
<MenuItem onClick={() => toggleDeleteConfirm(true)} eventKey="2"><Glyphicon glyph="trash"/>&nbsp;<Message msgId="widgets.widget.menu.delete" /></MenuItem>
</DropdownButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,10 @@ describe('CounterWidget component', () => {
ReactTestUtils.Simulate.click(el); // <-- trigger event callback
expect(spyonEdit).toHaveBeenCalled();
});
it('Test CounterWidget DropdownMenu', () => {
ReactDOM.render(<CounterWidget />, document.getElementById("container"));
const container = document.getElementById('container');
const el = container.querySelectorAll('.dropdown-menu li');
expect(el.length).toEqual(2);
});
});

0 comments on commit 5fe67f5

Please sign in to comment.