From 645a032a50dc200c485e2aff32d0a6655813c4ac Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Thu, 27 Oct 2016 11:44:19 -0700 Subject: [PATCH] fix(specs): Fix remaining broken specs --- spec/components/date-picker-popover-spec.jsx | 6 +++--- src/components/menu.cjsx | 3 --- src/pro | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/spec/components/date-picker-popover-spec.jsx b/spec/components/date-picker-popover-spec.jsx index e8ffadc86..b2c3f82a6 100644 --- a/spec/components/date-picker-popover-spec.jsx +++ b/spec/components/date-picker-popover-spec.jsx @@ -34,19 +34,19 @@ describe('DatePickerPopover', function sendLaterPopover() { }); - describe('onSelectCustomOption', () => { + describe('onCustomDateSelected', () => { it('selects date', () => { const popover = makePopover() const instance = popover.instance() spyOn(instance, 'selectDate') - instance.onSelectCustomOption('date', 'abc') + instance.onCustomDateSelected('date', 'abc') expect(instance.selectDate).toHaveBeenCalledWith('date', 'Custom') }); it('throws error if date is invalid', () => { spyOn(NylasEnv, 'showErrorDialog') const popover = makePopover() - popover.instance().onSelectCustomOption(null, 'abc') + popover.instance().onCustomDateSelected(null, 'abc') expect(NylasEnv.showErrorDialog).toHaveBeenCalled() }); }); diff --git a/src/components/menu.cjsx b/src/components/menu.cjsx index 59bcfe897..18d233c95 100644 --- a/src/components/menu.cjsx +++ b/src/components/menu.cjsx @@ -18,14 +18,12 @@ class MenuItem extends React.Component ### Public: React `props` supported by MenuItem: - - `index`: {Number} of the index of the current menu item - `divider` (optional) Pass a {Boolean} to render the menu item as a section divider. - `key` (optional) Pass a {String} to be the React key to optimize rendering lists of items. - `selected` (optional) Pass a {Boolean} to specify whether the item is selected. - `checked` (optional) Pass a {Boolean} to specify whether the item is checked. ### @propTypes: - index: React.PropTypes.number.isRequired divider: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.bool]) selected: React.PropTypes.bool checked: React.PropTypes.bool @@ -263,7 +261,6 @@ class Menu extends React.Component seenItemKeys[key] = item