couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benk...@apache.org
Subject fauxton commit: updated refs/heads/master to adaf1d3
Date Thu, 24 Mar 2016 17:45:29 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 87487ec89 -> adaf1d300


Update NW to 0.8.18; asyncHookTimeout increased

This updates NW to use the latest version. Occasionally async
requests can fail to return by the default NW 10 second timeout;
this increases the value to 20 seconds to reduce the likelihood
of that occurring.


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

Branch: refs/heads/master
Commit: adaf1d30018a5aa4d4cc69262bb2e10f4b2d9a45
Parents: 87487ec
Author: Ben Keen <ben.keen@gmail.com>
Authored: Wed Mar 23 16:00:29 2016 -0700
Committer: Ben Keen <ben.keen@gmail.com>
Committed: Thu Mar 24 10:45:03 2016 -0700

----------------------------------------------------------------------
 app/addons/databases/tests/nightwatch/createsDatabase.js |  4 ++--
 .../documents/tests/nightwatch/deleteDatabaseModal.js    |  4 ++--
 package.json                                             |  4 ++--
 .../custom-commands/checkForDatabaseCreated.js           |  2 +-
 .../custom-commands/checkForDatabaseDeleted.js           |  2 +-
 .../custom-commands/checkForDocumentCreated.js           |  2 +-
 .../custom-commands/checkForStringNotPresent.js          |  3 +--
 .../custom-commands/checkForStringPresent.js             |  3 +--
 test/nightwatch_tests/custom-commands/createDatabase.js  |  2 +-
 test/nightwatch_tests/custom-commands/createDocument.js  |  2 +-
 .../custom-commands/createManyDocuments.js               |  2 +-
 test/nightwatch_tests/custom-commands/deleteDatabase.js  |  2 +-
 test/nightwatch_tests/custom-commands/deleteDocument.js  |  2 +-
 .../nightwatch_tests/custom-commands/populateDatabase.js | 11 ++++++-----
 .../custom-commands/replicateDatabase.js                 |  2 +-
 test/nightwatch_tests/helpers/helpers.js                 |  9 +++++----
 16 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/app/addons/databases/tests/nightwatch/createsDatabase.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/createsDatabase.js b/app/addons/databases/tests/nightwatch/createsDatabase.js
index 74496ff..4e7c99b 100644
--- a/app/addons/databases/tests/nightwatch/createsDatabase.js
+++ b/app/addons/databases/tests/nightwatch/createsDatabase.js
@@ -15,14 +15,14 @@ var helpers = require('../../../../../test/nightwatch_tests/helpers/helpers.js')
 module.exports = {
 
   before: function (client, done) {
-    var nano = helpers.getNanoInstance();
+    var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
     nano.db.destroy(newDatabaseName, function (err, body, header) {
       done();
     });
   },
 
   after: function (client, done) {
-    var nano = helpers.getNanoInstance();
+    var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
     nano.db.destroy(newDatabaseName, function (err, body, header) {
       done();
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
index 77b3a1c..26f659a 100644
--- a/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
+++ b/app/addons/documents/tests/nightwatch/deleteDatabaseModal.js
@@ -14,14 +14,14 @@ var helpers = require('../../../../../test/nightwatch_tests/helpers/helpers.js')
 module.exports = {
 
   before: function (client, done) {
-    var nano = helpers.getNanoInstance();
+    var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
     nano.db.create('_replicator', function (err, body, header) {
       done();
     });
   },
 
   after: function (client, done) {
-    var nano = helpers.getNanoInstance();
+    var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
     nano.db.destroy('_replicator', function (err, body, header) {
       done();
     });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 4b4d356..71ff1ce 100644
--- a/package.json
+++ b/package.json
@@ -20,8 +20,8 @@
     "imports-loader": "^0.6.5",
     "mocha": "^2.4.5",
     "mocha-phantomjs": "~4.0.2",
-    "nightwatch": "^0.6.0",
-    "phantomjs": "~1.9.1",
+    "nightwatch": "~0.8.18",
+    "phantomjs": "^1.9.1",
     "react-addons-test-utils": "^0.14.7",
     "sinon": "git+https://github.com/sinonjs/sinon.git"
   },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/checkForDatabaseCreated.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/checkForDatabaseCreated.js b/test/nightwatch_tests/custom-commands/checkForDatabaseCreated.js
index 76c3ec9..a3ac324 100644
--- a/test/nightwatch_tests/custom-commands/checkForDatabaseCreated.js
+++ b/test/nightwatch_tests/custom-commands/checkForDatabaseCreated.js
@@ -23,7 +23,7 @@ function CheckForDatabaseCreated () {
 util.inherits(CheckForDatabaseCreated, events.EventEmitter);
 
 CheckForDatabaseCreated.prototype.command = function (databaseName, timeout) {
-  var couchUrl = helpers.test_settings.db_url;
+  var couchUrl = this.client.options.db_url;
 
   if (!timeout) {
     timeout = helpers.maxWaitTime;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/checkForDatabaseDeleted.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/checkForDatabaseDeleted.js b/test/nightwatch_tests/custom-commands/checkForDatabaseDeleted.js
index e6931cc..a48362c 100644
--- a/test/nightwatch_tests/custom-commands/checkForDatabaseDeleted.js
+++ b/test/nightwatch_tests/custom-commands/checkForDatabaseDeleted.js
@@ -23,7 +23,7 @@ function CheckForDatabaseDeleted () {
 util.inherits(CheckForDatabaseDeleted, events.EventEmitter);
 
 CheckForDatabaseDeleted.prototype.command = function (databaseName, timeout) {
-  var couchUrl = helpers.test_settings.db_url;
+  var couchUrl = this.client.options.db_url;
 
   if (!timeout) {
     timeout = helpers.maxWaitTime;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js b/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js
index d291530..4b0e2e4 100644
--- a/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js
+++ b/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js
@@ -23,7 +23,7 @@ function CheckForDocumentCreated () {
 util.inherits(CheckForDocumentCreated, events.EventEmitter);
 
 CheckForDocumentCreated.prototype.command = function (doc, timeout, db) {
-  var couchUrl = helpers.test_settings.db_url;
+  var couchUrl = this.client.options.db_url;
 
   if (!db) {
     db = helpers.testDatabaseName;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/checkForStringNotPresent.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/checkForStringNotPresent.js b/test/nightwatch_tests/custom-commands/checkForStringNotPresent.js
index 85b581b..d02d95b 100644
--- a/test/nightwatch_tests/custom-commands/checkForStringNotPresent.js
+++ b/test/nightwatch_tests/custom-commands/checkForStringNotPresent.js
@@ -23,8 +23,7 @@ function CheckForStringNotPresent () {
 util.inherits(CheckForStringNotPresent, events.EventEmitter);
 
 CheckForStringNotPresent.prototype.command = function (path, string, timeout) {
-  var couchUrl = helpers.test_settings.db_url,
-      db = helpers.testDatabaseName;
+  var couchUrl = this.client.options.db_url;
 
   if (!timeout) {
     timeout = helpers.maxWaitTime;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/checkForStringPresent.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/checkForStringPresent.js b/test/nightwatch_tests/custom-commands/checkForStringPresent.js
index 21855d8..78dfbb8 100644
--- a/test/nightwatch_tests/custom-commands/checkForStringPresent.js
+++ b/test/nightwatch_tests/custom-commands/checkForStringPresent.js
@@ -23,8 +23,7 @@ function CheckForStringPresent () {
 util.inherits(CheckForStringPresent, events.EventEmitter);
 
 CheckForStringPresent.prototype.command = function (path, string, timeout) {
-  var couchUrl = helpers.test_settings.db_url,
-      db = helpers.testDatabaseName;
+  var couchUrl = this.client.options.db_url;
 
   if (!timeout) {
     timeout = helpers.maxWaitTime;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/createDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDatabase.js b/test/nightwatch_tests/custom-commands/createDatabase.js
index 7be2c18..a7dcd6a 100644
--- a/test/nightwatch_tests/custom-commands/createDatabase.js
+++ b/test/nightwatch_tests/custom-commands/createDatabase.js
@@ -23,7 +23,7 @@ util.inherits(CreateDatabase, events.EventEmitter);
 
 CreateDatabase.prototype.command = function (databaseName) {
   var that = this,
-      nano = helpers.getNanoInstance();
+      nano = helpers.getNanoInstance(this.client.options.db_url);
 
   nano.db.create(databaseName, function (err, body, header) {
     if (err) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/createDocument.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createDocument.js b/test/nightwatch_tests/custom-commands/createDocument.js
index f8c72d5..11082ba 100644
--- a/test/nightwatch_tests/custom-commands/createDocument.js
+++ b/test/nightwatch_tests/custom-commands/createDocument.js
@@ -23,7 +23,7 @@ function CreateDocument () {
 util.inherits(CreateDocument, events.EventEmitter);
 
 CreateDocument.prototype.command = function (documentName, databaseName, docContents) {
-  var couchUrl = helpers.test_settings.db_url;
+  var couchUrl = this.client.options.db_url;
 
   if (!docContents) {
     docContents = { dummyKey: 'testingValue' };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/createManyDocuments.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/createManyDocuments.js b/test/nightwatch_tests/custom-commands/createManyDocuments.js
index 872a7b8..4aa55da 100644
--- a/test/nightwatch_tests/custom-commands/createManyDocuments.js
+++ b/test/nightwatch_tests/custom-commands/createManyDocuments.js
@@ -23,7 +23,7 @@ util.inherits(CreateManyDocuments, events.EventEmitter);
 
 CreateManyDocuments.prototype.command = function (amount, databaseName) {
   var that = this,
-      nano = helpers.getNanoInstance(),
+      nano = helpers.getNanoInstance(this.client.options.db_url),
       database = nano.use(databaseName),
       docs = [];
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/deleteDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/deleteDatabase.js b/test/nightwatch_tests/custom-commands/deleteDatabase.js
index 4db5170..407b22c 100644
--- a/test/nightwatch_tests/custom-commands/deleteDatabase.js
+++ b/test/nightwatch_tests/custom-commands/deleteDatabase.js
@@ -22,7 +22,7 @@ util.inherits(DeleteDatabase, events.EventEmitter);
 
 DeleteDatabase.prototype.command = function (databaseName) {
   var that = this,
-      nano = helpers.getNanoInstance();
+      nano = helpers.getNanoInstance(this.client.options.db_url);
 
   nano.db.destroy(databaseName, function (err, body, header) {
     if (err) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/deleteDocument.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/deleteDocument.js b/test/nightwatch_tests/custom-commands/deleteDocument.js
index 29ecac4..3e39897 100644
--- a/test/nightwatch_tests/custom-commands/deleteDocument.js
+++ b/test/nightwatch_tests/custom-commands/deleteDocument.js
@@ -12,7 +12,7 @@ util.inherits(DeleteDocument, events.EventEmitter);
 
 DeleteDocument.prototype.command = function (databaseName, documentName) {
   var that = this,
-      nano = helpers.getNanoInstance(),
+      nano = helpers.getNanoInstance(this.client.options.db_url),
       database = nano.use(databaseName),
       documentRev;
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/populateDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/populateDatabase.js b/test/nightwatch_tests/custom-commands/populateDatabase.js
index e3884f9..2837bd5 100644
--- a/test/nightwatch_tests/custom-commands/populateDatabase.js
+++ b/test/nightwatch_tests/custom-commands/populateDatabase.js
@@ -24,9 +24,10 @@ util.inherits(PopulateDatabase, events.EventEmitter);
 
 PopulateDatabase.prototype.command = function (databaseName, count) {
   var that = this,
-      nano = helpers.getNanoInstance(),
+      nano = helpers.getNanoInstance(this.client.options.db_url),
       database = nano.use(databaseName),
-      i = 0;
+      i = 0,
+      db_url = that.client.options.db_url;
 
   async.whilst(
     function () { return i < (count ? count : 20); },
@@ -61,7 +62,7 @@ PopulateDatabase.prototype.command = function (databaseName, count) {
 
         createKeyView(null, function () {
           createBrokenView(null, function () {
-            createMangoIndex(null, function () {
+            createMangoIndex(null, db_url, function () {
               that.emit('complete');
             });
           });
@@ -105,9 +106,9 @@ PopulateDatabase.prototype.command = function (databaseName, count) {
     });
   }
 
-  function createMangoIndex (err, cb) {
+  function createMangoIndex (err, db_url, cb) {
     request({
-      uri: helpers.test_settings.db_url + '/' + databaseName + '/_index',
+      uri: db_url + '/' + databaseName + '/_index',
       method: 'POST',
       json: true,
       body: {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/custom-commands/replicateDatabase.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/replicateDatabase.js b/test/nightwatch_tests/custom-commands/replicateDatabase.js
index ee941c7..2662ebb 100644
--- a/test/nightwatch_tests/custom-commands/replicateDatabase.js
+++ b/test/nightwatch_tests/custom-commands/replicateDatabase.js
@@ -23,7 +23,7 @@ util.inherits(ReplicateDatabase, events.EventEmitter);
 
 ReplicateDatabase.prototype.command = function (source, target, options, callback) {
   var that = this,
-      nano = helpers.getNanoInstance(),
+      nano = helpers.getNanoInstance(this.client.options.db_url),
       opts = options;
 
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adaf1d30/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index b7f94db..8d30c88 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -14,15 +14,16 @@ var nano = require('nano');
 var async = require('async');
 
 module.exports = {
+  asyncHookTimeout: 20000,
   maxWaitTime: 30000,
   testDatabaseName : 'fauxton-selenium-tests',
 
-  getNanoInstance: function () {
-    return nano(this.test_settings.db_url);
+  getNanoInstance: function (dbURL) {
+    return nano(dbURL);
   },
 
   beforeEach: function (browser, done) {
-    var nano = module.exports.getNanoInstance(),
+    var nano = module.exports.getNanoInstance(browser.globals.test_settings.db_url),
         database = module.exports.testDatabaseName;
 
     console.log('nano setting up database');
@@ -44,7 +45,7 @@ module.exports = {
   },
 
   afterEach: function (browser, done) {
-    var nano = module.exports.getNanoInstance(),
+    var nano = module.exports.getNanoInstance(browser.globals.test_settings.db_url),
         database = module.exports.testDatabaseName;
 
     console.log('nano cleaning up');


Mime
View raw message