Repository: couchdb-fauxton Updated Branches: refs/heads/master a0c0b166d -> ade8977ab
nightwatch: make db configurable PR: #590 PR-URL: https://github.com/apache/couchdb-fauxton/pull/590 Reviewed-By: Benjamin Keen <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/ade8977a Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/ade8977a Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/ade8977a Branch: refs/heads/master Commit: ade8977ab2dfc6d2c3efa0390d9570e913cfadfe Parents: a0c0b16 Author: Robert Kowalski <[email protected]> Authored: Mon Dec 7 18:39:26 2015 +0100 Committer: Robert Kowalski <[email protected]> Committed: Mon Dec 7 19:14:22 2015 +0100 ---------------------------------------------------------------------- .../custom-commands/checkForDocumentCreated.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/ade8977a/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 3d3b16a..d291530 100644 --- a/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js +++ b/test/nightwatch_tests/custom-commands/checkForDocumentCreated.js @@ -22,9 +22,12 @@ function CheckForDocumentCreated () { // inherit from node's event emitter util.inherits(CheckForDocumentCreated, events.EventEmitter); -CheckForDocumentCreated.prototype.command = function (doc, timeout) { - var couchUrl = helpers.test_settings.db_url, - db = helpers.testDatabaseName; +CheckForDocumentCreated.prototype.command = function (doc, timeout, db) { + var couchUrl = helpers.test_settings.db_url; + + if (!db) { + db = helpers.testDatabaseName; + } if (!timeout) { timeout = helpers.maxWaitTime;
