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 4d863a8
Date Mon, 13 Apr 2015 10:06:35 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 93aa09fe2 -> 4d863a8f2


Strenghten error checking code

Add a check to get the correct xhr object


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

Branch: refs/heads/master
Commit: 4d863a8f20e7e5dd8d3c6481db9dbaaf58db3d41
Parents: 93aa09f
Author: Garren Smith <garren.smith@gmail.com>
Authored: Thu Apr 9 12:53:16 2015 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Apr 13 11:14:35 2015 +0200

----------------------------------------------------------------------
 app/addons/documents/index-results/actions.js              | 6 +++---
 app/addons/documents/tests/nightwatch/viewCreateBadView.js | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4d863a8f/app/addons/documents/index-results/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-results/actions.js b/app/addons/documents/index-results/actions.js
index 0f91295..b2cb62d 100644
--- a/app/addons/documents/index-results/actions.js
+++ b/app/addons/documents/index-results/actions.js
@@ -49,9 +49,9 @@ function (app, FauxtonAPI, ActionTypes, Stores, HeaderStores, HeaderActions,
Doc
 
       return options.collection.fetch({reset: true}).then(function () {
         this.resultsListReset();
-      }.bind(this), function (xhr) {
-        // TODO: handle error requests that slip through
-        // This should just throw a notification, not break the page
+      }.bind(this), function (collection, _xhr) {
+        //Make this more robust as sometimes the colection is passed through here.
+        var xhr = collection.responseText ? collection : _xhr;
         var errorMsg = 'Bad Request';
 
         try {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/4d863a8f/app/addons/documents/tests/nightwatch/viewCreateBadView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/viewCreateBadView.js b/app/addons/documents/tests/nightwatch/viewCreateBadView.js
index 18d6f1f..19a79bd 100644
--- a/app/addons/documents/tests/nightwatch/viewCreateBadView.js
+++ b/app/addons/documents/tests/nightwatch/viewCreateBadView.js
@@ -36,7 +36,7 @@ module.exports = {
       .execute('$(".save")[0].scrollIntoView();')
       .click('button.btn-success.save')
       .waitForElementVisible('.alert-error', waitTime, false)
-      .assert.containsText('.alert-error', '_sum function requires that map values be numbers')
+      .assert.containsText('.alert-error', '_sum function requires')
       .end();
   },
 
@@ -50,7 +50,7 @@ module.exports = {
       .populateDatabase(newDatabaseName)
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/brokenview/_view/brokenview')
       .waitForElementVisible('.alert-error', waitTime, false)
-      .assert.containsText('.alert-error', '_sum function requires that map values be numbers')
+      .assert.containsText('.alert-error', '_sum function requires')
       .end();
   }
 


Mime
View raw message