couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andyw...@apache.org
Subject [3/4] couchdb commit: updated refs/heads/master to a7a6d2e
Date Fri, 21 Mar 2014 20:46:45 GMT
Fauxton: Fix tests


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

Branch: refs/heads/master
Commit: 5bdfa6c41c1dfd9782907b513954cdbd0b6edaa2
Parents: ca5913e
Author: Robert Kowalski <rok@kowalski.gd>
Authored: Fri Mar 21 17:49:15 2014 +0100
Committer: Robert Kowalski <rok@kowalski.gd>
Committed: Fri Mar 21 17:49:15 2014 +0100

----------------------------------------------------------------------
 .../app/addons/config/tests/resourcesSpec.js    | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5bdfa6c4/src/fauxton/app/addons/config/tests/resourcesSpec.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/config/tests/resourcesSpec.js b/src/fauxton/app/addons/config/tests/resourcesSpec.js
index c78bc85..1cc9e62 100644
--- a/src/fauxton/app/addons/config/tests/resourcesSpec.js
+++ b/src/fauxton/app/addons/config/tests/resourcesSpec.js
@@ -28,7 +28,10 @@ define([
       });
 
       tabMenu = new Views.TableRow({
-        model: optionModel
+        model: optionModel,
+        uniqueName: function () {
+          return false;
+        }
       });
     });
 
@@ -47,8 +50,12 @@ define([
         var renderSpy = sinon.stub(tabMenu, 'render');
         var saveSpy = sinon.stub(optionModel, 'save');
 
-        tabMenu.$('.js-edit-value').trigger('dblclick');
-        tabMenu.$('.js-save-value').trigger('click');
+        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
+          return $(this).find('[name="value"]').length;
+        });
+
+        $fields.find('.js-edit-value').trigger('dblclick');
+        $fields.find('.js-save-value').trigger('click');
 
         assert.ok(renderSpy.calledOnce);
         assert.ok(saveSpy.calledOnce);
@@ -60,7 +67,12 @@ define([
 
         var e = $.Event("keyup");
         e.keyCode = 13;
-        tabMenu.$('.js-value-input').trigger(e);
+
+        var $fields = tabMenu.$('.js-edit-value').filter(function (el) {
+          return $(this).find('[name="value"]').length;
+        });
+
+        $fields.find('.js-value-input').trigger(e);
 
         assert.ok(renderSpy.calledOnce);
         assert.ok(saveSpy.calledOnce);


Mime
View raw message