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 2017/07/24 14:21:49 UTC

[couchdb-fauxton] branch master updated: (#935) toughen createDocuments and jsonView tests

This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git


The following commit(s) were added to refs/heads/master by this push:
     new 69248ed  (#935) toughen createDocuments and jsonView tests
69248ed is described below

commit 69248edc735cc16bd72044063fd4570f4687f04d
Author: garren smith <ga...@gmail.com>
AuthorDate: Mon Jul 24 16:21:47 2017 +0200

    (#935) toughen createDocuments and jsonView tests
---
 app/addons/documents/tests/nightwatch/createsDocument.js | 4 ++--
 app/addons/documents/tests/nightwatch/jsonView.js        | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/addons/documents/tests/nightwatch/createsDocument.js b/app/addons/documents/tests/nightwatch/createsDocument.js
index 7fae788..c985bfd 100644
--- a/app/addons/documents/tests/nightwatch/createsDocument.js
+++ b/app/addons/documents/tests/nightwatch/createsDocument.js
@@ -61,13 +61,14 @@ module.exports = {
   'Creates a Document through Create Document toolbar button': (client) => {
     const waitTime = client.globals.maxWaitTime,
           newDatabaseName = client.globals.testDatabaseName,
-          newDocumentName = 'create_doc_document',
+          newDocumentName = 'a-create_doc_document',
           baseUrl = client.globals.test_settings.launch_url;
 
     client
       .createDatabase(newDatabaseName)
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementPresent('.tableview-checkbox-cell', waitTime, false)
       .clickWhenVisible('.document-result-screen__toolbar-create-btn')
       .waitForElementPresent('#editor-container', waitTime, false)
       .verify.urlEquals(baseUrl + '/#/database/' + newDatabaseName + '/new')
@@ -92,7 +93,6 @@ module.exports = {
       .getText('.prettyprint', function (result) {
         const data = result.value;
         const createdDocIsPresent = data.indexOf(newDocumentName) !== -1;
-
         this.verify.ok(
           createdDocIsPresent,
           'Checking if new document shows up in _all_docs.'
diff --git a/app/addons/documents/tests/nightwatch/jsonView.js b/app/addons/documents/tests/nightwatch/jsonView.js
index 92ca33d..bd72238 100644
--- a/app/addons/documents/tests/nightwatch/jsonView.js
+++ b/app/addons/documents/tests/nightwatch/jsonView.js
@@ -3,6 +3,7 @@ module.exports = {
   'Doc results: check ?include_docs=true returns doc content': function (client) {
     var newDatabaseName = client.globals.testDatabaseName,
         newDocumentName = 'bitterns',
+        waitTime = client.globals.maxWaitTime,
         baseUrl = client.globals.test_settings.launch_url;
 
     var docContent = {
@@ -17,6 +18,7 @@ module.exports = {
       .checkForDocumentCreated(newDocumentName)
 
       .url(baseUrl + '#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementPresent('.tableview-checkbox-cell', waitTime, false)
       .clickWhenVisible('.fonticon-json')
       .waitForElementPresent('.doc-item', client.globals.maxWaitTime, false)
       // by default include_docs is on, so check "American Bittern" does exist in the DOM

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].