From ae164abd17435e07e981782b1c41e43107c3900f Mon Sep 17 00:00:00 2001 From: syson16 Date: Thu, 6 Oct 2016 16:50:20 -0400 Subject: [PATCH] implemented issue #57 --- src/NotificationItem.jsx | 2 +- test/notification-system.test.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NotificationItem.jsx b/src/NotificationItem.jsx index f0020df..077d3e4 100644 --- a/src/NotificationItem.jsx +++ b/src/NotificationItem.jsx @@ -260,7 +260,7 @@ var NotificationItem = React.createClass({ if (this.props.getStyles.overrideStyle) { if (!this.state.visible && !this.state.removed) { - notificationStyle[cssByPos.property] = cssByPos.value; + if (!this._noAnimation) notificationStyle[cssByPos.property] = cssByPos.value; } if (this.state.visible && !this.state.removed) { diff --git a/test/notification-system.test.js b/test/notification-system.test.js index 9e89479..bb88c8e 100644 --- a/test/notification-system.test.js +++ b/test/notification-system.test.js @@ -323,7 +323,11 @@ describe('Notification Component', function() { component.addNotification(notificationObj); let notification = TestUtils.findRenderedDOMComponentWithClass(instance, 'notification'); let bottomPosition = notification.style.bottom; - expect(bottomPosition).toEqual('-100px'); + if(!component.props.noAnimation) { + expect(bottomPosition).toEqual('-100px'); + } else { + expect(bottomPosition).toEqual(''); + } done(); });