From 39a741fe1ad767878835d3a19648717939854f23 Mon Sep 17 00:00:00 2001 From: Vandish Gandhi Date: Tue, 30 Apr 2019 15:22:03 +1000 Subject: [PATCH] fix: missing event injection commit --- docs/examples/PopoverExample.jsx | 6 +++--- src/components/third-party/Popover/index.jsx | 10 +++++----- src/components/third-party/Popover/index.spec.jsx | 12 ------------ 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/examples/PopoverExample.jsx b/docs/examples/PopoverExample.jsx index 4c1d03dff..74815e67e 100644 --- a/docs/examples/PopoverExample.jsx +++ b/docs/examples/PopoverExample.jsx @@ -24,7 +24,7 @@ class PopoverExample extends React.PureComponent { handlePlacements = (state, placement) => this.setState({ placement }); handleThemes = (state, theme) => this.setState({ theme }); - handleTriggers = (state, trigger) => this.setState({ trigger: state ? trigger : 'hover' }); + handleTriggers = (state, trigger) => this.setState({ trigger }); togglePopover = () => this.setState(prevState => ({ isOpen: !prevState.isOpen, @@ -112,7 +112,7 @@ class PopoverExample extends React.PureComponent {
{children} diff --git a/src/components/third-party/Popover/index.spec.jsx b/src/components/third-party/Popover/index.spec.jsx index 11ee77dfd..be1690796 100644 --- a/src/components/third-party/Popover/index.spec.jsx +++ b/src/components/third-party/Popover/index.spec.jsx @@ -241,10 +241,6 @@ describe('Popover Component', () => { ); expect(wrapper.find('.aui--popover-element').prop('onClick')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onMouseOver')).to.equal(null); - expect(wrapper.find('.aui--popover-element').prop('onFocus')).to.equal(null); - expect(wrapper.find('.aui--popover-element').prop('onMouseOut')).to.equal(null); - expect(wrapper.find('.aui--popover-element').prop('onBlur')).to.equal(null); }); it('should register event handlers only for hover trigger', () => { @@ -253,11 +249,8 @@ describe('Popover Component', () => { Test message ); - expect(wrapper.find('.aui--popover-element').prop('onClick')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onMouseOver')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onFocus')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onMouseOut')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onBlur')).to.equal(null); }); it('should register event handlers only for focus trigger', () => { @@ -266,10 +259,7 @@ describe('Popover Component', () => { Test message ); - expect(wrapper.find('.aui--popover-element').prop('onClick')).to.equal(null); - expect(wrapper.find('.aui--popover-element').prop('onMouseOver')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onFocus')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onMouseOut')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onBlur')).to.be.a('function'); }); @@ -285,9 +275,7 @@ describe('Popover Component', () => { ); expect(wrapper.find('.aui--popover-element').prop('onClick')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onMouseOver')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onFocus')).to.be.a('function'); - expect(wrapper.find('.aui--popover-element').prop('onMouseOut')).to.equal(null); expect(wrapper.find('.aui--popover-element').prop('onBlur')).to.be.a('function'); });