couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject fauxton commit: updated refs/heads/master to 7155ede
Date Mon, 30 Mar 2015 22:01:27 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master e9507c91a -> 7155ede61


Fix 2 nightwatch tests : viewEdit, checkDatabaseTooltip
- Change night watch test to wait for banner to appear,
  before waiting for it to disappear

- Fix for checkDatabaseTooltip which was sometimes failing


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

Branch: refs/heads/master
Commit: 7155ede61f744827ee4cc88e502cb8d6ce2ec9f3
Parents: e9507c9
Author: michellephung@gmail.com <michellephung@gmail.com>
Authored: Mon Mar 30 13:34:12 2015 -0400
Committer: michellephung@gmail.com <michellephung@gmail.com>
Committed: Mon Mar 30 16:52:56 2015 -0400

----------------------------------------------------------------------
 .../databases/tests/nightwatch/checkDatabaseTooltip.js      | 9 ++++-----
 app/addons/documents/tests/nightwatch/viewEdit.js           | 5 +++--
 2 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7155ede6/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js b/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js
index dc25f6a..ab2fd17 100644
--- a/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js
+++ b/app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js
@@ -28,11 +28,10 @@ module.exports = {
       // delete the document manually. This'll ensure the database page has at least one
"!" icon
       .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName +
'/_all_docs"]', waitTime, false)
       .click('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]')
-      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
-      .click('label[for="checkbox-' + newDocumentName + '"]')
-      .click('.control-toggle-alternative-header')
-      .waitForElementPresent('.control-select-all', waitTime, false)
-      .click('.control-delete')
+
+      //this opens the alternative header
+      .clickWhenVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
+      .clickWhenVisible('.control-delete', waitTime, false)
       .acceptAlert()
       .waitForElementVisible('.alert.alert-info', waitTime, false)
       .click('#nav-links a[href="#/_all_dbs"]')

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/7155ede6/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 f3ea6da..2a187fc 100644
--- a/app/addons/documents/tests/nightwatch/viewEdit.js
+++ b/app/addons/documents/tests/nightwatch/viewEdit.js
@@ -80,8 +80,9 @@ module.exports = {
         var editor = ace.edit("map-function");\
         editor.getSession().setValue("function (doc) { emit(\'newstub\', 2); }");\
       ')
-      .execute('$(".save")[0].scrollIntoView();')
-      .click('button.btn-success.save')
+      .execute('$("button.save").scrollIntoView();')
+      .clickWhenVisible('button.btn-success.save', waitTime, false)
+      .waitForElementVisible('.global-notification', waitTime, false)
       .waitForElementNotVisible('.global-notification', waitTime, false)
       .assert.containsText('.prettyprint', '40')
     .end();


Mime
View raw message