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 b5e6343
Date Thu, 09 Apr 2015 22:00:28 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 47d38c549 -> b5e634338


fix for createDatabase Test
add global waitTime to waitForAttribute


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

Branch: refs/heads/master
Commit: b5e634338ddd51103d9a21d9a70421b1727b8fe1
Parents: 47d38c5
Author: michellephung@gmail.com <michellephung@gmail.com>
Authored: Thu Apr 9 14:41:12 2015 -0400
Committer: michellephung@gmail.com <michellephung@gmail.com>
Committed: Thu Apr 9 17:09:46 2015 -0400

----------------------------------------------------------------------
 app/addons/databases/tests/nightwatch/createsDatabase.js  | 7 +++----
 test/nightwatch_tests/custom-commands/waitForAttribute.js | 3 ++-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b5e63433/app/addons/databases/tests/nightwatch/createsDatabase.js
----------------------------------------------------------------------
diff --git a/app/addons/databases/tests/nightwatch/createsDatabase.js b/app/addons/databases/tests/nightwatch/createsDatabase.js
index 09ec328..9233aeb 100644
--- a/app/addons/databases/tests/nightwatch/createsDatabase.js
+++ b/app/addons/databases/tests/nightwatch/createsDatabase.js
@@ -23,15 +23,14 @@ module.exports = {
 
       // ensure the page has fully loaded
       .waitForElementPresent('.databases.table', waitTime, false)
-
       .waitForElementPresent('#add-new-database', waitTime, false)
       .clickWhenVisible('#add-new-database', waitTime, false)
-      .pause(1000)
       .waitForElementVisible('#js-new-database-name', waitTime, false)
       .setValue('#js-new-database-name', [newDatabaseName])
-
       .clickWhenVisible('#js-create-database', waitTime, false)
-      .waitForElementVisible('#global-notifications .alert.alert-success', waitTime, false)
+      .waitForAttribute('#global-notifications', 'textContent', function (successAlertText)
{
+        return (/Database created successfully/).test(successAlertText);
+      })
       .url(baseUrl + '/_all_dbs')
       .waitForElementVisible('html', waitTime, false)
       .getText('html', function (result) {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/b5e63433/test/nightwatch_tests/custom-commands/waitForAttribute.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/waitForAttribute.js b/test/nightwatch_tests/custom-commands/waitForAttribute.js
index beecc61..a6cc7aa 100644
--- a/test/nightwatch_tests/custom-commands/waitForAttribute.js
+++ b/test/nightwatch_tests/custom-commands/waitForAttribute.js
@@ -12,6 +12,7 @@
 
 var util = require('util');
 var events = require('events');
+var helpers = require('../helpers/helpers.js');
 
 /*
  * This custom command allows us to locate an HTML element on the page and then wait until
the value of a specified
@@ -33,7 +34,7 @@ WaitForAttribute.prototype.command = function (element, attribute, checker,
time
   var message;
 
   if (typeof timeoutInMilliseconds !== 'number') {
-    timeoutInMilliseconds = 8000;
+    timeoutInMilliseconds = helpers.maxWaitTime;
   }
 
   this.check(element, attribute, checker, function (result, loadedTimeInMilliseconds) {


Mime
View raw message