couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 2f22a89
Date Mon, 30 May 2016 12:58:29 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 4f2401a04 -> 2f22a89f7


fix linting and failing test


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/2f22a89f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/2f22a89f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/2f22a89f

Branch: refs/heads/master
Commit: 2f22a89f73e56945ebe91c6d0d58b0e4252b38de
Parents: 4f2401a
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon May 30 13:49:51 2016 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon May 30 13:49:51 2016 +0200

----------------------------------------------------------------------
 .../notifications/notifications.react.jsx       |  6 +-
 .../fauxton/notifications/tests/actionsSpec.js  | 49 +++++++++++++++++
 .../fauxton/notifications/tests/actionsSpec.jsx | 58 --------------------
 3 files changed, 54 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2f22a89f/app/addons/fauxton/notifications/notifications.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/notifications.react.jsx b/app/addons/fauxton/notifications/notifications.react.jsx
index cd88fe5..a307bf7 100644
--- a/app/addons/fauxton/notifications/notifications.react.jsx
+++ b/app/addons/fauxton/notifications/notifications.react.jsx
@@ -336,7 +336,11 @@ function (app, FauxtonAPI, React, ReactDOM, Actions, Stores, Components,
Velocit
             </div>
 
             <footer>
-              <input type="button" value="Clear All" className="btn btn-small btn-info"
onClick={Actions.clearAllNotifications} />
+              <input
+                type="button"
+                value="Clear All"
+                className="btn btn-small btn-info"
+                onClick={Actions.clearAllNotifications} />
             </footer>
           </div>
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2f22a89f/app/addons/fauxton/notifications/tests/actionsSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/tests/actionsSpec.js b/app/addons/fauxton/notifications/tests/actionsSpec.js
new file mode 100644
index 0000000..1afd7de
--- /dev/null
+++ b/app/addons/fauxton/notifications/tests/actionsSpec.js
@@ -0,0 +1,49 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+define([
+  '../../../../core/api',
+  '../notifications.react',
+  '../stores',
+  '../actions',
+  '../../../../../test/mocha/testUtils',
+  'react',
+  'react-dom',
+  'moment',
+  'react-addons-test-utils',
+  'sinon'
+], function (FauxtonAPI, Views, {notificationStore: store}, Actions, {assert, restore}, React,
ReactDOM, moment, TestUtils) {
+
+  describe('NotificationPanel', function () {
+    var container;
+
+    beforeEach(function () {
+      container = document.createElement('div');
+      store.reset();
+    });
+
+    afterEach(function () {
+      restore(Actions.clearAllNotifications);
+      ReactDOM.unmountComponentAtNode(container);
+    });
+
+    it('clear all action fires', function () {
+      var stub = sinon.stub(Actions, 'clearAllNotifications');
+
+      var panelEl = TestUtils.renderIntoDocument(<Views.NotificationCenterPanel
+        notifications={[]} filter={'all'}
+        visible={true} />, container);
+
+      TestUtils.Simulate.click($(ReactDOM.findDOMNode(panelEl)).find('footer input')[0]);
+      assert.ok(stub.calledOnce);
+    });
+  });
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/2f22a89f/app/addons/fauxton/notifications/tests/actionsSpec.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/tests/actionsSpec.jsx b/app/addons/fauxton/notifications/tests/actionsSpec.jsx
deleted file mode 100644
index 7121143..0000000
--- a/app/addons/fauxton/notifications/tests/actionsSpec.jsx
+++ /dev/null
@@ -1,58 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-define([
-  '../../../../core/api',
-  '../notifications.react',
-  '../stores',
-  '../../../../../test/mocha/testUtils',
-  'react',
-  'react-dom',
-  'moment',
-  'react-addons-test-utils',
-  'sinon'
-], function (FauxtonAPI, Views, Stores, utils, React, ReactDOM, moment, TestUtils) {
-  var assert = utils.assert;
-  var store = Stores.notificationStore;
-
-
-  describe('NotificationPanel', function () {
-    var container;
-
-    beforeEach(function () {
-      container = document.createElement('div');
-      store.reset();
-    });
-
-    afterEach(function () {
-      ReactDOM.unmountComponentAtNode(container);
-    });
-
-    it('clear all action fires', function () {
-      var panelEl = TestUtils.renderIntoDocument(<Views.NotificationPanel />, container);
-
-      var stub = sinon.stub(Actions, 'clearAllNotifications');
-      TestUtils.Simulate.click($(ReactDOM.findDOMNode(panelEl)).find('footer input')[0]);
-      assert.ok(stub.calledOnce);
-      Actions.clearAllNotifications.restore();
-    });
-
-    it('switch filter action fires', function () {
-      var panelEl = TestUtils.renderIntoDocument(<Views.NotificationPanel />, container);
-
-      var stub = sinon.stub(Actions, 'clearAllNotifications');
-      TestUtils.Simulate.click($(ReactDOM.findDOMNode(panelEl)).find('footer input')[0]);
-      assert.ok(stub.calledOnce);
-      Actions.clearAllNotifications.restore();
-    });
-
-  });
-});


Mime
View raw message