You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2016/07/12 17:25:16 UTC

[1/7] fauxton commit: updated refs/heads/master to ced196a

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master c5fc7018a -> ced196ab1


make remove-test-dbs async


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

Branch: refs/heads/master
Commit: ced196ab123987e675145e36d021de13b257cdeb
Parents: e1e5947
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 12 16:46:12 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 bin/remove-test-dbs.js                   | 31 +++++++++++++++++----------
 test/nightwatch_tests/helpers/helpers.js |  2 +-
 2 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ced196ab/bin/remove-test-dbs.js
----------------------------------------------------------------------
diff --git a/bin/remove-test-dbs.js b/bin/remove-test-dbs.js
index 3b8fa88..7d85efd 100755
--- a/bin/remove-test-dbs.js
+++ b/bin/remove-test-dbs.js
@@ -1,6 +1,7 @@
 #!/usr/bin/env node
 
 const fs = require('fs');
+const async = require('async');
 
 const settingsFilePath = './settings.json';
 const settingsFile = fs.existsSync(settingsFilePath) ? settingsFilePath : './settings.json.default.json';
@@ -13,18 +14,26 @@ nano.db.list((err, body) => {
     console.log('ERR', err);
     return;
   }
-  const out = body.forEach(db => {
-    if (!/fauxton-selenium-tests/.test(db)) {
-      return;
-    }
+  const list = body.filter(db => {
+    return /fauxton-selenium-tests/.test(db);
+  }).map(db => {
+    return (cb) => {
+      console.log('removing', db);
+      nano.db.destroy(db, (err, resp) => {
+        if (err) {
+          cb(err);
+          return;
+        }
+
+        cb();
+      });
+    };
+  });
 
-    console.log('removing', db);
-    nano.db.destroy(db, (err, resp) => {
-      if (err) {
-        console.log('ERR deleting ', db, err);
-        return;
-      }
-    });
+  async.parallel(list, (err) => {
+    if (err) {
+      console.error(err);
+    }
   });
 
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ced196ab/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 137e19e..f0e4777 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -25,7 +25,7 @@ module.exports = {
   testDatabaseName : dbName,
 
   getNanoInstance: function (dbURL) {
-    console.log('bbb', dbURL);
+    console.log('DBURL:', dbURL);
     return nano(dbURL);
   },
 


[4/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
Move selenium to docker

This runs selenium and CouchDB in a docker instance for the nightwatch
tests. It also includes a selenium debug container that allows you to
view the tests via VNC. This change is to make the running of the
selenium tests more consistent for all developers and the same as on
Travis.


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

Branch: refs/heads/master
Commit: 62c83b5a0f3e56491aba2f25be76b383f1d073a0
Parents: c5fc701
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Jun 30 12:33:55 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 .travis.yml                                     | 55 +++++++++-----------
 Gruntfile.js                                    |  3 +-
 .../tests/nightwatch/deletesDocuments.js        |  4 +-
 .../tests/nightwatch/uploadAttachment.js        |  4 +-
 .../documents/tests/nightwatch/viewCreate.js    |  4 +-
 .../documents/tests/nightwatch/viewEdit.js      |  4 ++
 devserver.js                                    |  2 +-
 docker/dc.selenium-debug.yml                    |  8 +++
 docker/dc.selenium.yml                          | 13 +++++
 index.js                                        |  2 +-
 package.json                                    | 10 +++-
 settings.json.default.json                      | 13 ++++-
 tasks/fauxton.js                                | 16 ++++--
 tasks/helper.js                                 | 12 +++--
 .../nightwatch_tests/nightwatch.json.underscore |  6 +--
 tests.md                                        | 34 ++++++++----
 16 files changed, 127 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 452e55a..d2419a7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,42 +1,39 @@
-language: erlang
-otp_release:
-   - 17.4
+language: node
+node_js:
+   - 6
+sudo: required
+services:
+  - docker
 git:
-  depth: 10
+  depth: 1
 
-addons:
-  firefox: "38.0.1"
-before_install:
-  - sudo apt-get update -qq
-  - sudo apt-get install -qq flashplugin-installer
-  - sudo apt-get -y install libicu-dev libmozjs-dev pkg-config help2man libcurl4-openssl-dev
-  - sudo apt-get -y install libtool automake autoconf autoconf-archive
-  - sudo apt-get -y install haproxy
-  - nvm install 6 && nvm use 6
+env:
+  DOCKER_COMPOSE_VERSION: 1.8.0-rc1
 
-  - cd ..
-  - git clone --depth=1 https://github.com/apache/couchdb
-  - cd couchdb
-  - ./configure --disable-docs
-  - make
-  - ./dev/run --admin=tester:testerpass &
-  - haproxy -f rel/haproxy.cfg &
-  - cd .. && cd couchdb-fauxton
-  - npm install
-
-  - export DISPLAY=:99.0
-  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1400x900x16"
+before_install:
+  - sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'
+  - sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+  - sudo apt-get update
+  - sudo apt-key update
+  - sudo apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine=1.11.1-0~precise
+  - sudo rm /usr/local/bin/docker-compose
+  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
+  - chmod +x docker-compose
+  - sudo mv docker-compose /usr/local/bin
 
 before_script:
-  - npm run stylecheck
+  - npm run docker:up
+  - npm install
+  - docker logs couchdb
+  - docker logs selenium
+  - curl http://127.0.0.1:5984
   - npm test
   - grunt debugDev
   - DIST=./dist/debug ./bin/fauxton &
   - sleep 30
 script:
   - ./node_modules/grunt-cli/bin/grunt nightwatch
+after_script:
+  - npm run docker:down
 
 cache: apt
-
-git:
-  depth: 1

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index f2cc6e1..1675d3d 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -248,6 +248,7 @@ module.exports = function (grunt) {
 
     exec: {
       check_selenium: initHelper.check_selenium,
+      check_chrome: initHelper.check_chrome,
       start_nightWatch: {
         command: __dirname + '/node_modules/nightwatch/bin/nightwatch' +
         ' -c ' + __dirname + '/test/nightwatch_tests/nightwatch.json'
@@ -360,5 +361,5 @@ module.exports = function (grunt) {
    * Nightwatch functional testing
    */
   //Start Nightwatch test from terminal, using: $ grunt nightwatch
-  grunt.registerTask('nightwatch', ['exec:check_selenium', 'initNightwatch', 'exec:start_nightWatch']);
+  grunt.registerTask('nightwatch', ['initNightwatch', 'exec:start_nightWatch']);
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/app/addons/documents/tests/nightwatch/deletesDocuments.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deletesDocuments.js b/app/addons/documents/tests/nightwatch/deletesDocuments.js
index 3a1e9ad..b5e3b7f 100644
--- a/app/addons/documents/tests/nightwatch/deletesDocuments.js
+++ b/app/addons/documents/tests/nightwatch/deletesDocuments.js
@@ -90,11 +90,11 @@ module.exports = {
       // confirm the design doc appears in the sidebar
       .waitForElementPresent('#sidebar-content span[title="_design/sidebar-update"]', waitTime, false)
       .waitForElementPresent('label[for="checkbox-_design/sidebar-update"]', waitTime, false)
-      .execute('$("label[for=\'checkbox-_design/sidebar-update\']")[0].scrollIntoView();')
+      .execute('$("label[for=\'checkbox-_design/sidebar-update\']")[0].scrollIntoView(false);')
       .clickWhenVisible('label[for="checkbox-_design/sidebar-update"]', waitTime, false)
 
       .waitForElementPresent('.bulk-action-component-selector-group .fonticon-trash', waitTime, false)
-      .execute('$(".bulk-action-component-selector-group .fonticon-trash")[0].scrollIntoView();')
+      .execute('$(".bulk-action-component-selector-group .fonticon-trash")[0].scrollIntoView(false);')
       .clickWhenVisible('.bulk-action-component-selector-group .fonticon-trash')
       .acceptAlert()
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/app/addons/documents/tests/nightwatch/uploadAttachment.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/uploadAttachment.js b/app/addons/documents/tests/nightwatch/uploadAttachment.js
index c967abe..3bc3ba4 100644
--- a/app/addons/documents/tests/nightwatch/uploadAttachment.js
+++ b/app/addons/documents/tests/nightwatch/uploadAttachment.js
@@ -10,8 +10,8 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-
-
+// add to ignore list for now since selenium is running in its own container
+// we cannot link to the file
 module.exports = {
   'Uploading an attachment works': function (client) {
     /*jshint multistr: true */

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/app/addons/documents/tests/nightwatch/viewCreate.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/viewCreate.js b/app/addons/documents/tests/nightwatch/viewCreate.js
index aeb7304..3c8e2bf 100644
--- a/app/addons/documents/tests/nightwatch/viewCreate.js
+++ b/app/addons/documents/tests/nightwatch/viewCreate.js
@@ -71,16 +71,15 @@ module.exports = {
     /*jshint multistr: true */
     openDifferentDropdownsAndClick(client, '#header-dropdown-menu')
       .waitForElementPresent('#new-ddoc', waitTime, false)
-      .waitForElementVisible('#new-ddoc', waitTime, false)
       .setValue('#new-ddoc', 'test_design_doc-selenium-2')
       .clearValue('#index-name')
       .setValue('#index-name', 'gaenseindex')
-      .sendKeys("textarea.ace_text-input", client.Keys.Enter)
       .execute('\
         var editor = ace.edit("map-function");\
         editor.getSession().setValue("function (doc) { emit(\'gansgans\'); }");\
       ')
       .execute('$("#save-view")[0].scrollIntoView();')
+      .waitForElementPresent('#save-view', waitTime, false)
       .clickWhenVisible('#save-view')
       .checkForDocumentCreated('_design/test_design_doc-selenium-2')
       .waitForElementPresent('.prettyprint', waitTime, false)
@@ -104,7 +103,6 @@ module.exports = {
       .waitForElementVisible('#index-name', waitTime, false)
       .clearValue('#index-name')
       .setValue('#index-name', 'test-new-view')
-      .sendKeys("textarea.ace_text-input", client.Keys.Enter)
       .execute('\
         var editor = ace.edit("map-function");\
         editor.getSession().setValue("function (doc) { emit(\'enteente\', 1); }");\

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/app/addons/documents/tests/nightwatch/viewEdit.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/viewEdit.js b/app/addons/documents/tests/nightwatch/viewEdit.js
index f755d38..f8d9229 100644
--- a/app/addons/documents/tests/nightwatch/viewEdit.js
+++ b/app/addons/documents/tests/nightwatch/viewEdit.js
@@ -144,9 +144,13 @@ module.exports = {
 
       // create the second view
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementNotPresent('.global-notification .fonticon-cancel', waitTime, false)
       .waitForElementPresent(dropDownElement, waitTime, false)
+      .waitForElementPresent(dropDownElement + ' a', waitTime, false)
       .clickWhenVisible(dropDownElement + ' a')
+      .waitForElementPresent(dropDownElement + ' a[href*="new_view"]', waitTime, false)
       .clickWhenVisible(dropDownElement + ' a[href*="new_view"]')
+      .waitForElementPresent('.index-cancel-link', waitTime, false)
       .waitForElementVisible('#new-ddoc', waitTime, false)
       .waitForElementNotPresent('.spinner', waitTime, true)
       .waitForElementNotPresent('.loading-lines', waitTime, true)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/devserver.js
----------------------------------------------------------------------
diff --git a/devserver.js b/devserver.js
index eac4d5d..3bef0a8 100644
--- a/devserver.js
+++ b/devserver.js
@@ -108,7 +108,7 @@ var runWebpackServer = function () {
     proxy.web(req, res);
   });
 
-  server.listen(options.port, options.host, function (err) {
+  server.listen(options.port, '0.0.0.0', function (err) {
     if (err) {
       console.log(err);
       return;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/docker/dc.selenium-debug.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium-debug.yml b/docker/dc.selenium-debug.yml
new file mode 100644
index 0000000..98dd11b
--- /dev/null
+++ b/docker/dc.selenium-debug.yml
@@ -0,0 +1,8 @@
+version: '2'
+services:
+  selenium:
+    container_name: selenium
+    image: selenium/standalone-firefox-debug:2.48.2
+    ports:
+      - "4444:4444"
+      - "5900:5900"

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/docker/dc.selenium.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium.yml b/docker/dc.selenium.yml
new file mode 100644
index 0000000..f5004df
--- /dev/null
+++ b/docker/dc.selenium.yml
@@ -0,0 +1,13 @@
+version: '2'
+services:
+  selenium:
+    container_name: selenium
+    image: selenium/standalone-firefox:2.48.2
+    ports:
+      - "4444:4444"
+  couchdb:
+    container_name: couchdb
+    image: klaemo/couchdb:2.0-dev
+    command: '--with-haproxy -a tester:testerpass'
+    ports:
+      - "5984:5984"

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/index.js
----------------------------------------------------------------------
diff --git a/index.js b/index.js
index 82b2645..5ad25fe 100644
--- a/index.js
+++ b/index.js
@@ -67,7 +67,7 @@ module.exports = function (options) {
     req.headers.host = urlObj.host;
 
     proxy.web(req, res);
-  }).listen(port);
+  }).listen(port, '0.0.0.0');
 
   proxy.on('error', function (e) {
     // don't explode on cancelled requests

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 58b3b67..db388e4 100644
--- a/package.json
+++ b/package.json
@@ -108,8 +108,14 @@
     "dev": "node ./devserver.js",
     "nightwatch": "grunt nightwatch",
     "start": "node ./bin/fauxton",
-    "prepublish": "node version-check.js && grunt release",
-    "create:animaldb": "./bin/create-animal-db"
+    "preversion": "node version-check.js && grunt release",
+    "create:animaldb": "./bin/create-animal-db",
+    "docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d couchdb",
+    "docker:reset": "npm run docker:down && npm run docker:up",
+    "docker:logs": "docker logs couchdb",
+    "docker:up": "docker-compose -f ./docker/dc.selenium.yml up -d",
+    "docker:debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml up -d",
+    "docker:down": "docker-compose -f ./docker/dc.selenium.yml down"
   },
   "repository": {
     "type": "git",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/settings.json.default.json
----------------------------------------------------------------------
diff --git a/settings.json.default.json b/settings.json.default.json
index a65f6ed..0fbd829 100644
--- a/settings.json.default.json
+++ b/settings.json.default.json
@@ -76,12 +76,21 @@
     "nightwatch": {
       "fauxton_username": "tester",
       "password": "testerpass",
-      "fauxton_host": "localhost",
+      "fauxton_host": "127.0.0.1",
       "fauxton_port": "8000",
       "db_host": "localhost",
       "db_port": "5984",
       "custom_commands_path": ["test/nightwatch_tests/custom-commands", "test/nightwatch_tests/custom-commands/auth"],
       "globals_path": "test/nightwatch_tests/helpers/helpers.js",
-      "selenium_port": "4444"
+      "selenium_port": "4444",
+      "testBlacklist": {
+        "databases": [
+          "zeroclipboard.js"
+        ],
+        "documents": [
+          "uploadAttachment.js",
+          "navigateToNewView.js"
+        ]
+      }
     }
 }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 7a220e4..4b7fa6c 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -12,7 +12,8 @@
 
 module.exports = function (grunt) {
   var _ = grunt.util._,
-      fs = require('fs');
+      fs = require('fs'),
+      os = require('os');
 
   grunt.registerMultiTask('template', 'generates an html file from a specified template', function () {
     var data = this.data,
@@ -131,7 +132,6 @@ module.exports = function (grunt) {
 
   // run every time nightwatch is executed from the command line
   grunt.registerMultiTask('initNightwatch', 'Sets up Nightwatch', function () {
-
     // perform a little validation on the settings
     _validateNightwatchSettings(this.data.settings);
 
@@ -140,6 +140,7 @@ module.exports = function (grunt) {
     var result = _getNightwatchTests(this.data.settings);
     var addonsWithTests = result.addonFolders;
     var excludeTests = result.excludeTests;
+    console.log('addons and excluded', addonsWithTests, excludeTests);
 
     // if the user passed a --file="X" on the command line, filter out
     var singleTestToRun = grunt.option('file');
@@ -157,7 +158,7 @@ module.exports = function (grunt) {
       fauxton_username: this.data.settings.nightwatch.fauxton_username,
       password: this.data.settings.nightwatch.password,
       launch_url: this.data.settings.nightwatch.launch_url,
-      fauxton_host: this.data.settings.nightwatch.fauxton_host,
+      fauxton_host: _getHostIpAddresss(),
       fauxton_port: this.data.settings.nightwatch.fauxton_port,
       db_host: this.data.settings.nightwatch.db_host,
       db_port: this.data.settings.nightwatch.db_port,
@@ -168,6 +169,15 @@ module.exports = function (grunt) {
 
   // HELPERS
 
+  function _getHostIpAddresss () {
+    //making some assumptions here
+    const interfaces = os.networkInterfaces();
+    const eth0 = interfaces[Object.keys(interfaces)[1]];
+    return eth0.find(function (item) {
+      return item.family === 'IPv4';
+    }).address;
+  }
+
   function _validateNightwatchSettings (data) {
     var error = '';
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/tasks/helper.js
----------------------------------------------------------------------
diff --git a/tasks/helper.js b/tasks/helper.js
index 02fd6b4..97d160c 100644
--- a/tasks/helper.js
+++ b/tasks/helper.js
@@ -58,9 +58,15 @@ exports.init = function (grunt) {
     },
 
     check_selenium: {
-      command: 'test -s ./test/nightwatch_tests/selenium/selenium-server-standalone-2.45.0.jar || ' +
-        'curl -o ./test/nightwatch_tests/selenium/selenium-server-standalone-2.45.0.jar ' +
-        'http://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar'
+      command: 'test -s ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar || ' +
+        'curl -o ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar ' +
+        'http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar'
+    },
+    check_chrome: {
+      command: 'test -s ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar || ' +
+        'curl -o ./test/nightwatch_tests/selenium/chromedriver_mac32.zip' +
+        'http://chromedriver.storage.googleapis.com/2.22/chromedriver_mac32.zip' +
+        '&& tar -xvf ./test/nightwatch_tests/selenium/chromedriver_mac32.zip -C ./test/nightwatch_tests/selenium/'
     }
   };
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/test/nightwatch_tests/nightwatch.json.underscore
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/nightwatch.json.underscore b/test/nightwatch_tests/nightwatch.json.underscore
index 9d33770..c0d1580 100644
--- a/test/nightwatch_tests/nightwatch.json.underscore
+++ b/test/nightwatch_tests/nightwatch.json.underscore
@@ -8,8 +8,8 @@
   "live_output" : false,
 
   "selenium" : {
-    "start_process" : true,
-    "server_path" : "test/nightwatch_tests/selenium/selenium-server-standalone-2.45.0.jar",
+    "start_process" : false,
+    "server_path" : "test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar",
     "log_path" : "",
     "host" : "127.0.0.1",
     "port" : "<%- selenium_port %>",
@@ -48,7 +48,7 @@
         "javascriptEnabled" : true,
         "acceptSslCerts" : true,
         "chromeOptions" : {
-          "args" : ["window-size=1400,900"]
+          "args" : ["window-size=1400,900", "--no-sandbox"]
         }
       }
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/62c83b5a/tests.md
----------------------------------------------------------------------
diff --git a/tests.md b/tests.md
index cc0f615..e761881 100644
--- a/tests.md
+++ b/tests.md
@@ -1,6 +1,6 @@
 # Tests
 
-Fauxton has both test coverage through unit and selenium tests, built on 
+Fauxton has both test coverage through unit and selenium tests, built on
 [Mocha](https://mochajs.org/) and [Nightwatch](http://nightwatchjs.org/) respectively.
 
 
@@ -21,24 +21,36 @@ Refreshing the URL will re-run the tests via PhantomJS and in the browser.
 
 ## Selenium tests
 
-There is a bit of setup involved before you are able to run the Nightwatch selenium tests.
+To run selenium locally you need docker installed. Selenium runs in a docker container and connects to a CouchDB instance in another container. To start them run the command:
 
-First, in your CouchDB admin accounts, add a user:
+    npm run docker:up
 
-> user: tester  
-password: testerpass  
+You can run `npm run docker:logs` to see when the CouchDB instance is ready to go. You also need a Fauxton server instance runnning:
 
-Then on the command line:  
+    npm run dev
+    or
+    grunt debugDev && DIST=./dist/debug ./bin/fauxton`
 
-    npm install
+Finally to run the tests:
 
-Start Fauxton with
+    grunt nightwatch
 
-    grunt dev
+Or to run only one file:
 
-And to run the tests (in another terminal tab):
+    grunt nightwatch --file=viewEdit
 
-    grunt nightwatch
+View the package.json `scripts` section for some other useful docker commands.
+
+### Debugging Selenium tests
+
+To debug and view a failing selenium test, you need to run the selenium container with vnc built into it:
+
+    npm run docker:debug-up
+
+Once it is up and running you can connect to it with any VNC client on `127.0.0.1:5900`. On MacOSX open safari
+and type `vnc://127.0.0.1:5900`. That will open screen sharing. It will then prompt for the password which is `secret`.
+
+After that run a Fauxton server instance and the nightwatch tests you want to debug.
 
 
 ### Omitting Nightwatch tests


[7/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
streamline docker selenium


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

Branch: refs/heads/master
Commit: 0c611774f3427b3a75da5022ce7053fb921e37c7
Parents: 22504bd
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Jul 6 09:29:52 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 docker/dc.selenium-debug.yml             | 7 +++++++
 docker/dc.selenium.yml                   | 1 +
 package.json                             | 4 ++--
 settings.json.default.json               | 1 -
 tasks/fauxton.js                         | 8 ++++++--
 test/nightwatch_tests/helpers/helpers.js | 1 +
 6 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/docker/dc.selenium-debug.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium-debug.yml b/docker/dc.selenium-debug.yml
index 98dd11b..3b1a36e 100644
--- a/docker/dc.selenium-debug.yml
+++ b/docker/dc.selenium-debug.yml
@@ -1,8 +1,15 @@
 version: '2'
 services:
   selenium:
+    extends:
+      file: './dc.selenium.yml'
+      service: selenium
     container_name: selenium
     image: selenium/standalone-firefox-debug:2.48.2
     ports:
       - "4444:4444"
       - "5900:5900"
+  couchdb:
+    extends:
+      file: './dc.selenium.yml'
+      service: couchdb

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/docker/dc.selenium.yml
----------------------------------------------------------------------
diff --git a/docker/dc.selenium.yml b/docker/dc.selenium.yml
index f5004df..6fe625c 100644
--- a/docker/dc.selenium.yml
+++ b/docker/dc.selenium.yml
@@ -5,6 +5,7 @@ services:
     image: selenium/standalone-firefox:2.48.2
     ports:
       - "4444:4444"
+
   couchdb:
     container_name: couchdb
     image: klaemo/couchdb:2.0-dev

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index e2ccc52..1cd6ad8 100644
--- a/package.json
+++ b/package.json
@@ -113,11 +113,11 @@
     "create:animaldb": "./bin/create-animal-db",
     "docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d couchdb",
     "docker:selenium-up": "docker-compose -f ./docker/dc.selenium.yml up -d selenium",
-    "docker:selenium-debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml up -d selenium",
+    "docker:selenium-debug-up": "docker-compose -f ./docker/dc.selenium-debug.yml up -d selenium",
     "docker:reset": "npm run docker:down && npm run docker:up",
     "docker:logs": "docker logs couchdb",
     "docker:up": "docker-compose -f ./docker/dc.selenium.yml up -d",
-    "docker:debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml up -d",
+    "docker:debug-up": "docker-compose -f ./docker/dc.selenium-debug.yml up -d",
     "docker:down": "docker-compose -f ./docker/dc.selenium.yml down"
   },
   "repository": {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/settings.json.default.json
----------------------------------------------------------------------
diff --git a/settings.json.default.json b/settings.json.default.json
index 0fbd829..a484d35 100644
--- a/settings.json.default.json
+++ b/settings.json.default.json
@@ -76,7 +76,6 @@
     "nightwatch": {
       "fauxton_username": "tester",
       "password": "testerpass",
-      "fauxton_host": "127.0.0.1",
       "fauxton_port": "8000",
       "db_host": "localhost",
       "db_port": "5984",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 4b7fa6c..779261a 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -158,7 +158,7 @@ module.exports = function (grunt) {
       fauxton_username: this.data.settings.nightwatch.fauxton_username,
       password: this.data.settings.nightwatch.password,
       launch_url: this.data.settings.nightwatch.launch_url,
-      fauxton_host: _getHostIpAddresss(),
+      fauxton_host: _getHost(),
       fauxton_port: this.data.settings.nightwatch.fauxton_port,
       db_host: this.data.settings.nightwatch.db_host,
       db_port: this.data.settings.nightwatch.db_port,
@@ -169,7 +169,11 @@ module.exports = function (grunt) {
 
   // HELPERS
 
-  function _getHostIpAddresss () {
+  //if FAUXTON_HOST not set use ip address
+  function _getHost () {
+    if (process.env.FAUXTON_HOST) {
+      return process.env.FAUXTON_HOST;
+    }
     //making some assumptions here
     const interfaces = os.networkInterfaces();
     const eth0 = interfaces[Object.keys(interfaces)[1]];

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0c611774/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 99af6b5..c087f75 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -18,6 +18,7 @@ function getRandomInt(min, max) {
 }
 
 const dbName = 'fauxton-selenium-tests-' + getRandomInt(1, 20000);
+console.log('ssss', process.env.CLOUDANT_PWD, process.env.CLOUDANT_USER);
 
 module.exports = {
   asyncHookTimeout: 20000,


[5/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
Docker updates
* randomise db names
* simplify deletesDocuments test
* Remove old selenium setup
* Fix failing map test


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

Branch: refs/heads/master
Commit: 22504bd60eb212a8c286aeebce31221e15e3c51e
Parents: 5f98392
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 5 10:59:22 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 Gruntfile.js                                    |  2 --
 .../tests/nightwatch/deletesDocuments.js        | 33 +++++++-------------
 .../tests/nightwatch/editDocumentsFromView.js   |  2 +-
 package.json                                    |  1 +
 tasks/helper.js                                 | 12 -------
 test/nightwatch_tests/helpers/helpers.js        | 12 +++++--
 .../nightwatch_tests/nightwatch.json.underscore |  4 +--
 test/nightwatch_tests/selenium/.gitkeep         |  0
 tests.md                                        |  4 +--
 9 files changed, 26 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/Gruntfile.js
----------------------------------------------------------------------
diff --git a/Gruntfile.js b/Gruntfile.js
index 1675d3d..7e1c7a7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -247,8 +247,6 @@ module.exports = function (grunt) {
     },
 
     exec: {
-      check_selenium: initHelper.check_selenium,
-      check_chrome: initHelper.check_chrome,
       start_nightWatch: {
         command: __dirname + '/node_modules/nightwatch/bin/nightwatch' +
         ' -c ' + __dirname + '/test/nightwatch_tests/nightwatch.json'

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/app/addons/documents/tests/nightwatch/deletesDocuments.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/deletesDocuments.js b/app/addons/documents/tests/nightwatch/deletesDocuments.js
index b5e3b7f..fc81257 100644
--- a/app/addons/documents/tests/nightwatch/deletesDocuments.js
+++ b/app/addons/documents/tests/nightwatch/deletesDocuments.js
@@ -59,30 +59,21 @@ module.exports = {
     var waitTime = client.globals.maxWaitTime;
     var newDatabaseName = client.globals.testDatabaseName;
     var baseUrl = client.globals.test_settings.launch_url;
+    var designDoc = {
+      "_id": "_design/sidebar-update",
+      "views": {
+       "new-index": {
+         "map": "function (doc) {\n  emit(doc._id, 1);\n}"
+       }
+      },
+      "language": "javascript"
+    };
 
     /*jshint multistr: true */
     client
       .loginToGUI()
       .populateDatabase(newDatabaseName)
-      .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
-      .waitForElementPresent('#header-dropdown-menu', waitTime, false)
-      .waitForElementPresent('#header-dropdown-menu a', waitTime, false)
-      .clickWhenVisible('#header-dropdown-menu a', waitTime, false)
-      .waitForElementPresent('#header-dropdown-menu  a[href*="new_view"]', waitTime, false)
-      .clickWhenVisible('#header-dropdown-menu a[href*="new_view"]', waitTime, false)
-      .waitForElementPresent('.index-cancel-link', waitTime, false)
-      .waitForElementPresent('#new-ddoc', waitTime, false)
-      .setValue('#new-ddoc', 'sidebar-update')
-      .clearValue('#index-name')
-      .setValue('#index-name', 'sidebar-update-index')
-      .execute('\
-        var editor = ace.edit("map-function");\
-        editor.getSession().setValue("function (doc) { emit(\'1\'); }");\
-      ')
-      .execute('$("#save-view")[0].scrollIntoView();')
-      .waitForElementPresent('#save-view', waitTime, false)
-      .clickWhenVisible('#save-view', waitTime, false)
-      .waitForElementVisible('#global-notifications .alert.alert-success', waitTime, false)
+      .createDocument(designDoc._id, newDatabaseName, designDoc)
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementNotPresent('.loading-lines', waitTime, false)
@@ -90,11 +81,11 @@ module.exports = {
       // confirm the design doc appears in the sidebar
       .waitForElementPresent('#sidebar-content span[title="_design/sidebar-update"]', waitTime, false)
       .waitForElementPresent('label[for="checkbox-_design/sidebar-update"]', waitTime, false)
-      .execute('$("label[for=\'checkbox-_design/sidebar-update\']")[0].scrollIntoView(false);')
+      .execute('$("label[for=\'checkbox-_design/sidebar-update\']")[0].scrollIntoView();')
       .clickWhenVisible('label[for="checkbox-_design/sidebar-update"]', waitTime, false)
 
       .waitForElementPresent('.bulk-action-component-selector-group .fonticon-trash', waitTime, false)
-      .execute('$(".bulk-action-component-selector-group .fonticon-trash")[0].scrollIntoView(false);')
+      .execute('$(".bulk-action-component-selector-group .fonticon-trash")[0].scrollIntoView();')
       .clickWhenVisible('.bulk-action-component-selector-group .fonticon-trash')
       .acceptAlert()
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
index 25e9210..a57e6e9 100644
--- a/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
+++ b/app/addons/documents/tests/nightwatch/editDocumentsFromView.js
@@ -37,7 +37,7 @@ module.exports = {
       .clickWhenVisible('#nav-header-abc')
       .clickWhenVisible('#nav-design-function-abcviews a')
       .clickWhenVisible('#abc_evens')
-      .clickWhenVisible('a[href="#/database/fauxton-selenium-tests/document_10"]')
+      .clickWhenVisible('a[href="#/database/' + newDatabaseName + '/document_10"]')
       //navigated to editor
       .waitForElementVisible('#editor-container', waitTime, false)
       .verify.urlContains('#/database/' + newDatabaseName + '/document_10');

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 2371498..e2ccc52 100644
--- a/package.json
+++ b/package.json
@@ -108,6 +108,7 @@
     "dev": "node ./devserver.js",
     "nightwatch": "grunt nightwatch",
     "start": "node ./bin/fauxton",
+    "start-debug": "DIST=./dist/debug node ./bin/fauxton",
     "preversion": "node version-check.js && grunt release",
     "create:animaldb": "./bin/create-animal-db",
     "docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d couchdb",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/tasks/helper.js
----------------------------------------------------------------------
diff --git a/tasks/helper.js b/tasks/helper.js
index 97d160c..a995c23 100644
--- a/tasks/helper.js
+++ b/tasks/helper.js
@@ -55,18 +55,6 @@ exports.init = function (grunt) {
         }
         return files;
       }, defaults);
-    },
-
-    check_selenium: {
-      command: 'test -s ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar || ' +
-        'curl -o ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar ' +
-        'http://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.0.jar'
-    },
-    check_chrome: {
-      command: 'test -s ./test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar || ' +
-        'curl -o ./test/nightwatch_tests/selenium/chromedriver_mac32.zip' +
-        'http://chromedriver.storage.googleapis.com/2.22/chromedriver_mac32.zip' +
-        '&& tar -xvf ./test/nightwatch_tests/selenium/chromedriver_mac32.zip -C ./test/nightwatch_tests/selenium/'
     }
   };
 };

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index 8d30c88..99af6b5 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -13,10 +13,16 @@
 var nano = require('nano');
 var async = require('async');
 
+function getRandomInt(min, max) {
+  return Math.floor(Math.random() * (max - min)) + min;
+}
+
+const dbName = 'fauxton-selenium-tests-' + getRandomInt(1, 20000);
+
 module.exports = {
   asyncHookTimeout: 20000,
   maxWaitTime: 30000,
-  testDatabaseName : 'fauxton-selenium-tests',
+  testDatabaseName : dbName,
 
   getNanoInstance: function (dbURL) {
     return nano(dbURL);
@@ -26,7 +32,7 @@ module.exports = {
     var nano = module.exports.getNanoInstance(browser.globals.test_settings.db_url),
         database = module.exports.testDatabaseName;
 
-    console.log('nano setting up database');
+    console.log('nano setting up database', database);
 
     // clean up the database we created previously
     nano.db.destroy(database, function (err, body, header) {
@@ -48,7 +54,7 @@ module.exports = {
     var nano = module.exports.getNanoInstance(browser.globals.test_settings.db_url),
         database = module.exports.testDatabaseName;
 
-    console.log('nano cleaning up');
+    console.log('nano cleaning up', database);
     nano.db.destroy(database, function (err, header, body) {
       if (err) {
         console.log('Error in cleaning up ' + database, err.message);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/test/nightwatch_tests/nightwatch.json.underscore
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/nightwatch.json.underscore b/test/nightwatch_tests/nightwatch.json.underscore
index c0d1580..7ddbd0c 100644
--- a/test/nightwatch_tests/nightwatch.json.underscore
+++ b/test/nightwatch_tests/nightwatch.json.underscore
@@ -9,12 +9,12 @@
 
   "selenium" : {
     "start_process" : false,
-    "server_path" : "test/nightwatch_tests/selenium/selenium-server-standalone-2.53.0.jar",
+    "server_path" : "",
     "log_path" : "",
     "host" : "127.0.0.1",
     "port" : "<%- selenium_port %>",
     "cli_args" : {
-      "webdriver.chrome.driver" : "test/nightwatch_tests/selenium/chromedriver",
+      "webdriver.chrome.driver" : "",
       "webdriver.ie.driver" : "",
       "webdriver.firefox.profile" : ""
     }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/test/nightwatch_tests/selenium/.gitkeep
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/selenium/.gitkeep b/test/nightwatch_tests/selenium/.gitkeep
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/22504bd6/tests.md
----------------------------------------------------------------------
diff --git a/tests.md b/tests.md
index e761881..1b0b81b 100644
--- a/tests.md
+++ b/tests.md
@@ -27,9 +27,7 @@ To run selenium locally you need docker installed. Selenium runs in a docker con
 
 You can run `npm run docker:logs` to see when the CouchDB instance is ready to go. You also need a Fauxton server instance runnning:
 
-    npm run dev
-    or
-    grunt debugDev && DIST=./dist/debug ./bin/fauxton`
+    grunt debugDev && DIST=./dist/debug ./bin/fauxton
 
 Finally to run the tests:
 


[2/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
Simplify selenium testing

Stabilise some of the tests. Add a remove test db command and a script
to install docker on travis.


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

Branch: refs/heads/master
Commit: 99802f328daa62eb3ffc6ca6a8c63391948166a2
Parents: 0c61177
Author: Garren Smith <ga...@gmail.com>
Authored: Wed Jul 6 11:58:13 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 .travis.yml                                     |  3 --
 .../tests/nightwatch/deletesDatabase.js         |  2 ++
 .../documents/tests/nightwatch/cloneDoc.js      |  3 +-
 .../documents/tests/nightwatch/paginateView.js  |  1 +
 .../documents/tests/nightwatch/tableView.js     |  2 ++
 .../tests/nightwatch/tableViewConflicts.js      |  1 +
 bin/install-docker-travis.sh                    |  2 +-
 bin/remove-test-dbs.js                          | 30 ++++++++++++++++++++
 package.json                                    |  3 +-
 tasks/fauxton.js                                |  9 +++---
 test/nightwatch_tests/helpers/helpers.js        |  2 +-
 tests.md                                        |  4 +++
 12 files changed, 50 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 92c19dc..e9677d3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,9 +7,6 @@ services:
 git:
   depth: 1
 
-env:
-  DOCKER_COMPOSE_VERSION: 1.8.0-rc1
-
 before_script:
   - ./bin/install-docker-travis.sh
   - npm run docker:up

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/app/addons/databases/tests/nightwatch/deletesDatabase.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/deletesDatabase.js b/app/addons/databases/tests/nightwatch/deletesDatabase.js
index 0c613cc..f5672b3 100644
--- a/app/addons/databases/tests/nightwatch/deletesDatabase.js
+++ b/app/addons/databases/tests/nightwatch/deletesDatabase.js
@@ -48,6 +48,8 @@ module.exports = {
       .assert.elementPresent('a[href="#/database/' + newDatabaseName + '/_all_docs"]')
       .clickWhenVisible('[title="Delete ' + newDatabaseName + '"]', waitTime, false)
       .setValue('.delete-db-modal input[type="text"]', [newDatabaseName, client.Keys.ENTER])
+      .waitForElementNotPresent('.global-notification .fonticon-cancel', waitTime, false)
+      .waitForElementPresent('.fauxton-table-list', waitTime, false)
       .checkForDatabaseDeleted(newDatabaseName, waitTime)
       .assert.elementNotPresent('a[href="#/database/' + newDatabaseName + '/_all_docs"]')
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/app/addons/documents/tests/nightwatch/cloneDoc.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/cloneDoc.js b/app/addons/documents/tests/nightwatch/cloneDoc.js
index 7932ac4..674ccb6 100644
--- a/app/addons/documents/tests/nightwatch/cloneDoc.js
+++ b/app/addons/documents/tests/nightwatch/cloneDoc.js
@@ -12,7 +12,7 @@
 
 
 module.exports = {
-  'Deletes a document via Editor': function (client) {
+  'Clones a document via Editor': function (client) {
     const waitTime = client.globals.maxWaitTime;
     const newDatabaseName = client.globals.testDatabaseName;
     const newDocumentName = 'clone_doc_doc';
@@ -43,6 +43,7 @@ module.exports = {
 
       .url(`${baseUrl}'/'${newDatabaseName}/${newDocumentName}`)
       .waitForElementPresent('#editor-container', waitTime, false)
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .getText('#editor-container', function (result) {
         const data = result.value;
         const isCreatedDocumentPresent = data.indexOf('ente') !== -1;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/app/addons/documents/tests/nightwatch/paginateView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/paginateView.js b/app/addons/documents/tests/nightwatch/paginateView.js
index f5ccc3a..5cfe02b 100644
--- a/app/addons/documents/tests/nightwatch/paginateView.js
+++ b/app/addons/documents/tests/nightwatch/paginateView.js
@@ -71,6 +71,7 @@ module.exports = {
 
       // http://www.w3.org/TR/2012/WD-webdriver-20120710/
       .keys(['\uE013', '\uE006'])
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementPresent('#next', waitTime, false)
       .clickWhenVisible('#next', waitTime, false)
       .waitForElementNotPresent('div[data-id="document_1"]', waitTime)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/app/addons/documents/tests/nightwatch/tableView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/tableView.js b/app/addons/documents/tests/nightwatch/tableView.js
index 05f3ce4..70e0479 100644
--- a/app/addons/documents/tests/nightwatch/tableView.js
+++ b/app/addons/documents/tests/nightwatch/tableView.js
@@ -28,6 +28,7 @@ module.exports = {
       .checkForDocumentCreated(newDocumentName1)
       .checkForDocumentCreated(newDocumentName2)
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs?include_docs=true')
+      .waitForElementVisible('.prettyprint', waitTime, false)
 
       .clickWhenVisible('.alternative-header .two-sides-toggle-button button:last-child')
       .waitForElementVisible('.tableview-checkbox-cell', client.globals.maxWaitTime, false)
@@ -59,6 +60,7 @@ module.exports = {
       .checkForDocumentCreated(newDocumentName1)
       .checkForDocumentCreated(newDocumentName2)
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementVisible('.prettyprint', waitTime, false)
 
       .clickWhenVisible('.alternative-header .two-sides-toggle-button button:last-child')
       .waitForElementVisible('.tableview-checkbox-cell', client.globals.maxWaitTime, false)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/app/addons/documents/tests/nightwatch/tableViewConflicts.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/tableViewConflicts.js b/app/addons/documents/tests/nightwatch/tableViewConflicts.js
index 5122620..b644f16 100644
--- a/app/addons/documents/tests/nightwatch/tableViewConflicts.js
+++ b/app/addons/documents/tests/nightwatch/tableViewConflicts.js
@@ -24,6 +24,7 @@ module.exports = {
       .checkForDocumentCreated('outfit1')
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementVisible('.prettyprint', waitTime, false)
 
       .clickWhenVisible('.alternative-header .two-sides-toggle-button button:last-child')
       .waitForElementVisible('.table', waitTime, false)

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/bin/install-docker-travis.sh
----------------------------------------------------------------------
diff --git a/bin/install-docker-travis.sh b/bin/install-docker-travis.sh
index 846428f..c8ba2e7 100755
--- a/bin/install-docker-travis.sh
+++ b/bin/install-docker-travis.sh
@@ -5,6 +5,6 @@ sudo apt-get update
 sudo apt-key update
 sudo apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine=1.11.1-0~precise
 sudo rm /usr/local/bin/docker-compose
-curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
+curl -L https://github.com/docker/compose/releases/download/1.8.0-rc1/docker-compose-`uname -s`-`uname -m` > docker-compose
 chmod +x docker-compose
 sudo mv docker-compose /usr/local/bin

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/bin/remove-test-dbs.js
----------------------------------------------------------------------
diff --git a/bin/remove-test-dbs.js b/bin/remove-test-dbs.js
new file mode 100755
index 0000000..3b8fa88
--- /dev/null
+++ b/bin/remove-test-dbs.js
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+
+const fs = require('fs');
+
+const settingsFilePath = './settings.json';
+const settingsFile = fs.existsSync(settingsFilePath) ? settingsFilePath : './settings.json.default.json';
+const settings = JSON.parse(fs.readFileSync(settingsFile)).nightwatch;
+const dbUrl = `http://${settings.fauxton_username}:${settings.password}@${settings.db_host}:${settings.db_port}`;
+const nano = require('nano')(dbUrl);
+
+nano.db.list((err, body) => {
+  if (err) {
+    console.log('ERR', err);
+    return;
+  }
+  const out = body.forEach(db => {
+    if (!/fauxton-selenium-tests/.test(db)) {
+      return;
+    }
+
+    console.log('removing', db);
+    nano.db.destroy(db, (err, resp) => {
+      if (err) {
+        console.log('ERR deleting ', db, err);
+        return;
+      }
+    });
+  });
+
+});

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 1cd6ad8..ea12e0c 100644
--- a/package.json
+++ b/package.json
@@ -118,7 +118,8 @@
     "docker:logs": "docker logs couchdb",
     "docker:up": "docker-compose -f ./docker/dc.selenium.yml up -d",
     "docker:debug-up": "docker-compose -f ./docker/dc.selenium-debug.yml up -d",
-    "docker:down": "docker-compose -f ./docker/dc.selenium.yml down"
+    "docker:down": "docker-compose -f ./docker/dc.selenium.yml down",
+    "remove-test-dbs": "node ./bin/remove-test-dbs.js"
   },
   "repository": {
     "type": "git",

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/tasks/fauxton.js
----------------------------------------------------------------------
diff --git a/tasks/fauxton.js b/tasks/fauxton.js
index 779261a..abfaf9d 100644
--- a/tasks/fauxton.js
+++ b/tasks/fauxton.js
@@ -158,7 +158,7 @@ module.exports = function (grunt) {
       fauxton_username: this.data.settings.nightwatch.fauxton_username,
       password: this.data.settings.nightwatch.password,
       launch_url: this.data.settings.nightwatch.launch_url,
-      fauxton_host: _getHost(),
+      fauxton_host: _getHost(this.data.settings.nightwatch.fauxton_ip),
       fauxton_port: this.data.settings.nightwatch.fauxton_port,
       db_host: this.data.settings.nightwatch.db_host,
       db_port: this.data.settings.nightwatch.db_port,
@@ -166,13 +166,12 @@ module.exports = function (grunt) {
     }));
   });
 
-
   // HELPERS
 
   //if FAUXTON_HOST not set use ip address
-  function _getHost () {
-    if (process.env.FAUXTON_HOST) {
-      return process.env.FAUXTON_HOST;
+  function _getHost (fauxton_ip) {
+    if (fauxton_ip) {
+      return fauxton_ip;
     }
     //making some assumptions here
     const interfaces = os.networkInterfaces();

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/test/nightwatch_tests/helpers/helpers.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/helpers/helpers.js b/test/nightwatch_tests/helpers/helpers.js
index c087f75..137e19e 100644
--- a/test/nightwatch_tests/helpers/helpers.js
+++ b/test/nightwatch_tests/helpers/helpers.js
@@ -18,7 +18,6 @@ function getRandomInt(min, max) {
 }
 
 const dbName = 'fauxton-selenium-tests-' + getRandomInt(1, 20000);
-console.log('ssss', process.env.CLOUDANT_PWD, process.env.CLOUDANT_USER);
 
 module.exports = {
   asyncHookTimeout: 20000,
@@ -26,6 +25,7 @@ module.exports = {
   testDatabaseName : dbName,
 
   getNanoInstance: function (dbURL) {
+    console.log('bbb', dbURL);
     return nano(dbURL);
   },
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/99802f32/tests.md
----------------------------------------------------------------------
diff --git a/tests.md b/tests.md
index 1b0b81b..201d3f2 100644
--- a/tests.md
+++ b/tests.md
@@ -75,3 +75,7 @@ your settings.json file. That defines an object of the following form:
 The properties (`documents`, `databases`) map to a particular addon folder name (see `app/addons`). The values
 should be an array of tests that you don't want to run. `*` will flag all tests from being ran, otherwise you
 just enter the names of the files to omit.
+
+### Cleaning up old tests
+
+Each test run generates a new database. Sometimes these databases will not be removed. You can run `npm run remove-test-dbs` to clean up any left over databases.


[6/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
remove blacklist tests


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

Branch: refs/heads/master
Commit: e1e59475ddb2d3d615aa9869b3aea3203be6a981
Parents: 99802f3
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 12 16:38:19 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 .../databases/tests/nightwatch/zeroclipboard.js | 47 --------------------
 .../tests/nightwatch/navigateToNewView.js       | 36 ---------------
 .../tests/nightwatch/uploadAttachment.js        | 39 ----------------
 settings.json.default.json                      | 11 +----
 4 files changed, 1 insertion(+), 132 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e1e59475/app/addons/databases/tests/nightwatch/zeroclipboard.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/zeroclipboard.js b/app/addons/databases/tests/nightwatch/zeroclipboard.js
deleted file mode 100644
index 7970851..0000000
--- a/app/addons/databases/tests/nightwatch/zeroclipboard.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
-
-var os = require('os');
-
-module.exports = {
-  'ZeroClipboard copies' : function (client) {
-    var waitTime = client.globals.maxWaitTime,
-        newDatabaseName = client.globals.testDatabaseName,
-        baseUrl = client.globals.test_settings.launch_url;
-
-    var controlOrCommandKey = client.Keys.CONTROL;
-    if (os.type() === 'Darwin') {
-      controlOrCommandKey = client.Keys.COMMAND;
-    }
-
-    client
-      .deleteDatabase(newDatabaseName)
-      .loginToGUI()
-      .url(baseUrl)
-      .clickWhenVisible('.control-toggle-api-url')
-      .pause(1000) // needed for reliability. The tray slides in from the top so the pos of the copy button changes
-      .waitForElementVisible('.copy-button', waitTime, false)
-      .moveToElement('.copy-button', 10, 10)
-      .mouseButtonDown('left')
-      .mouseButtonUp('left')
-      .closeNotification()
-      .clickWhenVisible('.search-autocomplete', waitTime, false)
-      .setValue('.search-autocomplete', '')
-      .pause(1)
-      .keys([controlOrCommandKey, 'v'])
-      .assert.value('.search-autocomplete', 'http://localhost:8000/_all_dbs')
-
-    .end();
-  }
-};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e1e59475/app/addons/documents/tests/nightwatch/navigateToNewView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/navigateToNewView.js b/app/addons/documents/tests/nightwatch/navigateToNewView.js
deleted file mode 100644
index 813e4a6..0000000
--- a/app/addons/documents/tests/nightwatch/navigateToNewView.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-
-
-module.exports = {
-
-  // this tests that the user is able to just navigate to and from the New View page without errors [it confirms
-  // a bug fix for where the Ace Editor threw a JS error preventing the subsequent page from loading]
-  'Navigate to and from New View Page' : function (client) {
-    var waitTime = client.globals.maxWaitTime,
-      newDatabaseName = client.globals.testDatabaseName,
-      baseUrl = client.globals.test_settings.launch_url;
-
-    client
-      .loginToGUI()
-      .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
-      .clickWhenVisible('#new-all-docs-button a')
-      .clickWhenVisible('#new-all-docs-button a[href="#/database/' + newDatabaseName + '/new_view"]')
-      .waitForElementPresent('.define-view', waitTime, false)
-      .verify.urlEquals(baseUrl + '/#/database/' + newDatabaseName + '/new_view')
-
-      // now redirect back to the database page and check it's loaded properly
-      .clickWhenVisible('#nav-links a[href="#/_all_dbs"]')
-      .waitForElementPresent('#dashboard-content .databases', waitTime, false);
-  }
-};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e1e59475/app/addons/documents/tests/nightwatch/uploadAttachment.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/uploadAttachment.js b/app/addons/documents/tests/nightwatch/uploadAttachment.js
deleted file mode 100644
index 3bc3ba4..0000000
--- a/app/addons/documents/tests/nightwatch/uploadAttachment.js
+++ /dev/null
@@ -1,39 +0,0 @@
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy of
-// the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-
-// add to ignore list for now since selenium is running in its own container
-// we cannot link to the file
-module.exports = {
-  'Uploading an attachment works': function (client) {
-    /*jshint multistr: true */
-    /*globals __dirname */
-    var waitTime = client.globals.maxWaitTime,
-        newDatabaseName = client.globals.testDatabaseName,
-        baseUrl = client.globals.test_settings.launch_url;
-
-    client
-      .loginToGUI()
-      .createDatabase(newDatabaseName)
-      .createDocument('my_doc', newDatabaseName)
-      .url(baseUrl + '/#/database/' + newDatabaseName + '/my_doc')
-      .clickWhenVisible('.panel-button.upload')
-      .waitForElementVisible('input[name="_attachments"]', waitTime)
-      .setValue('input[name="_attachments"]', require('path').resolve(__dirname + '/uploadAttachment.js'))
-      .clickWhenVisible('#upload-btn')
-      .waitForElementVisible('.global-notification', waitTime, false)
-      .getText('.global-notification', function (result) {
-        var data = result.value;
-        this.verify.ok(data, 'Document saved successfully.');
-      })
-    .end();
-  }
-};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/e1e59475/settings.json.default.json
----------------------------------------------------------------------
diff --git a/settings.json.default.json b/settings.json.default.json
index a484d35..510f7f2 100644
--- a/settings.json.default.json
+++ b/settings.json.default.json
@@ -81,15 +81,6 @@
       "db_port": "5984",
       "custom_commands_path": ["test/nightwatch_tests/custom-commands", "test/nightwatch_tests/custom-commands/auth"],
       "globals_path": "test/nightwatch_tests/helpers/helpers.js",
-      "selenium_port": "4444",
-      "testBlacklist": {
-        "databases": [
-          "zeroclipboard.js"
-        ],
-        "documents": [
-          "uploadAttachment.js",
-          "navigateToNewView.js"
-        ]
-      }
+      "selenium_port": "4444"
     }
 }


[3/7] fauxton commit: updated refs/heads/master to ced196a

Posted by ga...@apache.org.
move docker install into own file


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

Branch: refs/heads/master
Commit: 5f983920603cc6cee4c3cc9ee4c6b677a8395a87
Parents: 62c83b5
Author: Garren Smith <ga...@gmail.com>
Authored: Tue Jul 5 10:16:56 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Tue Jul 12 19:24:44 2016 +0200

----------------------------------------------------------------------
 .travis.yml                  | 12 +-----------
 bin/install-docker-travis.sh | 10 ++++++++++
 package.json                 |  2 ++
 3 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5f983920/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index d2419a7..92c19dc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,18 +10,8 @@ git:
 env:
   DOCKER_COMPOSE_VERSION: 1.8.0-rc1
 
-before_install:
-  - sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'
-  - sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
-  - sudo apt-get update
-  - sudo apt-key update
-  - sudo apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine=1.11.1-0~precise
-  - sudo rm /usr/local/bin/docker-compose
-  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
-  - chmod +x docker-compose
-  - sudo mv docker-compose /usr/local/bin
-
 before_script:
+  - ./bin/install-docker-travis.sh
   - npm run docker:up
   - npm install
   - docker logs couchdb

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5f983920/bin/install-docker-travis.sh
----------------------------------------------------------------------
diff --git a/bin/install-docker-travis.sh b/bin/install-docker-travis.sh
new file mode 100755
index 0000000..846428f
--- /dev/null
+++ b/bin/install-docker-travis.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'
+sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+sudo apt-get update
+sudo apt-key update
+sudo apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine=1.11.1-0~precise
+sudo rm /usr/local/bin/docker-compose
+curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
+chmod +x docker-compose
+sudo mv docker-compose /usr/local/bin

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/5f983920/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index db388e4..2371498 100644
--- a/package.json
+++ b/package.json
@@ -111,6 +111,8 @@
     "preversion": "node version-check.js && grunt release",
     "create:animaldb": "./bin/create-animal-db",
     "docker:couchdb-up": "docker-compose -f ./docker/dc.selenium.yml up -d couchdb",
+    "docker:selenium-up": "docker-compose -f ./docker/dc.selenium.yml up -d selenium",
+    "docker:selenium-debug-up": "docker-compose -f ./docker/dc.selenium.yml -f ./docker/dc.selenium-debug.yml up -d selenium",
     "docker:reset": "npm run docker:down && npm run docker:up",
     "docker:logs": "docker logs couchdb",
     "docker:up": "docker-compose -f ./docker/dc.selenium.yml up -d",