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(); });