You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2015/03/30 11:08:29 UTC
fauxton commit: updated refs/heads/master to 7552f24
Repository: couchdb-fauxton
Updated Branches:
refs/heads/master f54d48ece -> 7552f24e9
Invalid 'undefined' class in All Docs header button element
This fixes the bug COUCHDB-2577 by removing a invalid class name
Closes COUCHDB-2577
PR: #332
PR-URL: https://github.com/apache/couchdb-fauxton/pull/332
Reviewed-By: Robert Kowalski <ro...@kowalski.gd>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/7552f24e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/7552f24e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/7552f24e
Branch: refs/heads/master
Commit: 7552f24e9f5cfe02e77cd61d337147de010bdd27
Parents: f54d48e
Author: Dulanga Sashika <wa...@gmail.com>
Authored: Wed Mar 25 01:37:47 2015 +0530
Committer: Robert Kowalski <ro...@apache.org>
Committed: Mon Mar 30 10:55:22 2015 +0200
----------------------------------------------------------------------
app/addons/documents/header/header.stores.js | 1 +
app/addons/documents/tests/headerSpec.react.jsx | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7552f24e/app/addons/documents/header/header.stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/header/header.stores.js b/app/addons/documents/header/header.stores.js
index bc57a34..5d5d1e2 100644
--- a/app/addons/documents/header/header.stores.js
+++ b/app/addons/documents/header/header.stores.js
@@ -25,6 +25,7 @@ function (FauxtonAPI, ActionTypes, IndexResultsActions) {
},
reset: function () {
+ this._toggleClass = '';
this._isToggled = false;
},
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7552f24e/app/addons/documents/tests/headerSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/headerSpec.react.jsx b/app/addons/documents/tests/headerSpec.react.jsx
index 782a9d3..75769a0 100644
--- a/app/addons/documents/tests/headerSpec.react.jsx
+++ b/app/addons/documents/tests/headerSpec.react.jsx
@@ -33,13 +33,18 @@ define([
var container, toggleEl;
beforeEach(function () {
container = document.createElement('div');
- Actions.resetHeaderController();
});
afterEach(function () {
React.unmountComponentAtNode(container);
});
+ it('should not include invalid calssname', function () {
+ toggleEl = TestUtils.renderIntoDocument(<Views.HeaderBarController />, container);
+ var $el = $(toggleEl.getDOMNode()).find('.control-toggle-alternative-header');
+ assert.equal($(toggleEl.getDOMNode()).find('.undefined').length, 0);
+ });
+
it('should use the passed classname', function () {
toggleEl = TestUtils.renderIntoDocument(<Views.HeaderBarController />, container);
var $el = $(toggleEl.getDOMNode()).find('.control-toggle-alternative-header');
@@ -48,6 +53,7 @@ define([
});
it('should not render the alternative header if the button is not clicked', function () {
+ Actions.resetHeaderController();
toggleEl = TestUtils.renderIntoDocument(<Views.HeaderBarController />, container);
var $el = $(toggleEl.getDOMNode()).find('.control-toggle-alternative-header');
assert.equal($(toggleEl.getDOMNode()).find('.alternative-header').length, 0);