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/25 16:07:37 UTC

[couchdb-fauxton] branch master updated: Improving nightwatch tests (#937)

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 de91f3f  Improving nightwatch tests (#937)
de91f3f is described below

commit de91f3f0c1543a9666568b9fa20d26ab88eba636
Author: garren smith <ga...@gmail.com>
AuthorDate: Tue Jul 25 18:07:35 2017 +0200

    Improving nightwatch tests (#937)
---
 app/addons/documents/tests/nightwatch/paginateAllDocs.js | 9 +++++++++
 app/addons/documents/tests/nightwatch/queryOptions.js    | 3 +++
 app/addons/documents/tests/nightwatch/viewCreate.js      | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/app/addons/documents/tests/nightwatch/paginateAllDocs.js b/app/addons/documents/tests/nightwatch/paginateAllDocs.js
index 38965ac..13ed5ff 100644
--- a/app/addons/documents/tests/nightwatch/paginateAllDocs.js
+++ b/app/addons/documents/tests/nightwatch/paginateAllDocs.js
@@ -56,7 +56,9 @@ module.exports = {
       .populateDatabase(newDatabaseName)
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
 
       // ensures the main body (results list) has been rendered
       .waitForElementPresent('.prettyprint', waitTime, false)
@@ -64,6 +66,7 @@ module.exports = {
       .clickWhenVisible('#select-per-page', waitTime, false)
       // http://www.w3.org/TR/2012/WD-webdriver-20120710/
       .keys(['\uE013', '\uE006'])
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementNotPresent('div[data-id="document_16"]', waitTime)
       .clickWhenVisible('#next', waitTime, false)
       .waitForElementPresent('div[data-id="document_17"]', waitTime)
@@ -82,7 +85,9 @@ module.exports = {
       .populateDatabase(newDatabaseName)
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
 
       // ensures the main body (results list) has been rendered
       .waitForElementPresent('.prettyprint', waitTime, false)
@@ -90,6 +95,7 @@ module.exports = {
       .clickWhenVisible('#select-per-page', waitTime, false)
       // http://www.w3.org/TR/2012/WD-webdriver-20120710/
       .keys(['\uE013', '\uE006'])
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementNotPresent('div[data-id="document_16"]', waitTime)
       .clickWhenVisible('#next', waitTime, false)
       .waitForElementPresent('div[data-id="document_17"]', waitTime)
@@ -110,6 +116,7 @@ module.exports = {
       .populateDatabase(newDatabaseName)
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
 
       // ensures the main body (results list) has been rendered
       .waitForElementPresent('.table-view-docs', waitTime)
@@ -117,11 +124,13 @@ module.exports = {
       .clickWhenVisible('#select-per-page', waitTime, false)
       // http://www.w3.org/TR/2012/WD-webdriver-20120710/
       .keys(['\uE013', '\uE006'])
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementNotPresent('td[title="document_16"]', waitTime)
       .clickWhenVisible('#next', waitTime, false)
       .waitForElementPresent('td[title="document_17"]', waitTime)
 
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementPresent('div[data-id="document_17"]', waitTime)
       .clickWhenVisible('#previous', waitTime, false)
diff --git a/app/addons/documents/tests/nightwatch/queryOptions.js b/app/addons/documents/tests/nightwatch/queryOptions.js
index a934d32..4df2bd3 100644
--- a/app/addons/documents/tests/nightwatch/queryOptions.js
+++ b/app/addons/documents/tests/nightwatch/queryOptions.js
@@ -24,11 +24,14 @@ module.exports = {
       .populateDatabase(newDatabaseName, 3)
       .loginToGUI()
       .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .clickWhenVisible('.control-toggle-queryoptions')
       .clickWhenVisible('#betweenKeys', waitTime, false)
       .setValue('#startkey', '"document_2"')
       .clickWhenVisible('.query-options .btn-secondary')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .waitForElementNotPresent('#doc-list [data-id="document_1"]', waitTime, false)
       .waitForElementPresent('#doc-list [data-id="document_2"]', waitTime, false)
       .assert.elementPresent('#doc-list [data-id="document_2"]')
diff --git a/app/addons/documents/tests/nightwatch/viewCreate.js b/app/addons/documents/tests/nightwatch/viewCreate.js
index 6ce4d0b..64b0972 100644
--- a/app/addons/documents/tests/nightwatch/viewCreate.js
+++ b/app/addons/documents/tests/nightwatch/viewCreate.js
@@ -55,6 +55,7 @@ module.exports = {
       .waitForElementPresent('#save-view', waitTime, false)
       .clickWhenVisible('#save-view', waitTime, false)
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .checkForDocumentCreated('_design/test_design_doc-selenium-1')
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementNotPresent('.loading-lines', waitTime, false)
@@ -79,6 +80,7 @@ module.exports = {
       .waitForElementPresent('#save-view', waitTime, false)
       .clickWhenVisible('#save-view', waitTime, false)
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .checkForDocumentCreated('_design/test_design_doc-selenium-3')
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementNotPresent('.loading-lines', waitTime, false)
@@ -105,6 +107,7 @@ module.exports = {
       .waitForElementPresent('#save-view', waitTime, false)
       .clickWhenVisible('#save-view')
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .checkForDocumentCreated('_design/test_design_doc-selenium-2')
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementNotPresent('.loading-lines', waitTime, false)
@@ -134,6 +137,7 @@ module.exports = {
       .execute('$("#save-view")[0].scrollIntoView();')
       .clickWhenVisible('#save-view')
       .clickWhenVisible('.fonticon-json')
+      .waitForElementNotPresent('.loading-lines', waitTime, false)
       .checkForDocumentCreated('_design/testdesigndoc/_view/test-new-view')
       .waitForElementPresent('.prettyprint', waitTime, false)
       .waitForElementNotPresent('.loading-lines', waitTime, false)

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