more

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

Branch: refs/heads/new-replication
Commit: 9bfc114d6489835654b958e439f1a68663910c3b
Parents: 56fba52
Author: Ben Keen <ben.k...@gmail.com>
Authored: Sun Aug 14 16:36:59 2016 -0700
Committer: Garren Smith <garren.sm...@gmail.com>
Committed: Wed Sep 14 17:22:30 2016 +0200

----------------------------------------------------------------------
 .travis.yml                                            | 2 +-
 app/addons/replication/tests/nightwatch/replication.js | 9 +--------
 test/nightwatch_tests/custom-commands/helper.js        | 4 ++++
 3 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9bfc114d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index e9677d3..3b98a45 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,7 +19,7 @@ before_script:
   - DIST=./dist/debug ./bin/fauxton &
   - sleep 30
 script:
-  - ./node_modules/grunt-cli/bin/grunt nightwatch
+  - ./node_modules/grunt-cli/bin/grunt nightwatch --file=replication
 after_script:
   - npm run docker:down
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9bfc114d/app/addons/replication/tests/nightwatch/replication.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/tests/nightwatch/replication.js 
b/app/addons/replication/tests/nightwatch/replication.js
index a2f1d14..e7ef682 100644
--- a/app/addons/replication/tests/nightwatch/replication.js
+++ b/app/addons/replication/tests/nightwatch/replication.js
@@ -73,14 +73,7 @@ module.exports = {
       .checkForDatabaseCreated(replicatedDBName, longWaitTime)
 
       // lastly, check the doc was replicated as well
-      .url(baseUrl + '/' + newDatabaseName1 + '/' + docName1)
-      .waitForElementVisible('html', waitTime, false)
-      .getText('html', function (result) {
-        const data = result.value,
-              createdDocIsPresent = data.indexOf(docName1);
-
-        this.verify.ok(createdDocIsPresent > 0,  'Checking doc exists.');
-      })
+      .checkForDocumentCreated(docName1, longWaitTime, replicatedDBName)
       .end();
   },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9bfc114d/test/nightwatch_tests/custom-commands/helper.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/helper.js 
b/test/nightwatch_tests/custom-commands/helper.js
index ead5ea0..e9ce835 100644
--- a/test/nightwatch_tests/custom-commands/helper.js
+++ b/test/nightwatch_tests/custom-commands/helper.js
@@ -30,6 +30,10 @@ exports.checkForDatabaseCreated = function 
checkForDatabaseCreated (couchUrl, da
   const intervalId = setInterval(() => {
     request(couchUrl + '/_all_dbs', function (er, res, body) {
       if (body) {
+        console.log('list of databases:');
+        console.log(body);
+        console.log("_______________________");
+
         const reg = new RegExp('"' + databaseName + '"', 'g');
         if (reg.test(body)) {
           clearTimeout(timeOutId);

Reply via email to