You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2016/04/14 15:44:46 UTC

fauxton commit: updated refs/heads/master to f21e761

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 9e6937767 -> f21e7615a


fix failing testsuite

the username field in the login screen was not populated in some
cases.

PR: #702
PR-URL: https://github.com/apache/couchdb-fauxton/pull/702
Reviewed-By: garren smith <ga...@gmail.com>


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

Branch: refs/heads/master
Commit: f21e7615a9c6662e23734897e001ff3a43d90a9c
Parents: 9e69377
Author: Robert Kowalski <ro...@apache.org>
Authored: Thu Apr 14 13:53:32 2016 +0200
Committer: Robert Kowalski <ro...@apache.org>
Committed: Thu Apr 14 15:44:31 2016 +0200

----------------------------------------------------------------------
 app/addons/auth/components.react.jsx            | 30 +++++++++++---------
 .../custom-commands/auth/loginToGUI.js          | 12 ++++++--
 2 files changed, 25 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f21e7615/app/addons/auth/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/auth/components.react.jsx b/app/addons/auth/components.react.jsx
index a90201c..fc9d29a 100644
--- a/app/addons/auth/components.react.jsx
+++ b/app/addons/auth/components.react.jsx
@@ -83,20 +83,22 @@ define([
 
     render: function () {
       return (
-        <div className="row-fluid">
-          <div className="span12">
-            <form id="login" onSubmit={this.submit}>
-              <p className="help-block">
-                Enter your username and password.
-              </p>
-              <input id="username" type="text" name="name" ref="username" placeholder="Username" size="24"
-                onChange={this.onInputChange} value={this.state.username} />
-              <br/>
-              <input id="password" type="password" name="password" ref="password" placeholder="Password" size="24"
-                onChange={this.onInputChange} value={this.state.password} />
-              <br/>
-              <button id="submit" className="btn btn-success" type="submit">Log In</button>
-            </form>
+        <div className="couch-login-wrapper">
+          <div className="row-fluid">
+            <div className="span12">
+              <form id="login" onSubmit={this.submit}>
+                <p className="help-block">
+                  Enter your username and password.
+                </p>
+                <input id="username" type="text" name="name" ref="username" placeholder="Username" size="24"
+                  onChange={this.onInputChange} value={this.state.username} />
+                <br/>
+                <input id="password" type="password" name="password" ref="password" placeholder="Password" size="24"
+                  onChange={this.onInputChange} value={this.state.password} />
+                <br/>
+                <button id="submit" className="btn btn-success" type="submit">Log In</button>
+              </form>
+            </div>
           </div>
         </div>
       );

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/f21e7615/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
----------------------------------------------------------------------
diff --git a/test/nightwatch_tests/custom-commands/auth/loginToGUI.js b/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
index 317a5a4..ef67837 100644
--- a/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
+++ b/test/nightwatch_tests/custom-commands/auth/loginToGUI.js
@@ -22,9 +22,15 @@ exports.command = function () {
     .url(baseUrl + '/#login')
     .waitForElementPresent('a[href="#login"]', waitTime, false)
     .click('a[href="#login"]')
-    .waitForElementPresent('#username', waitTime, false)
-    .setValue('#username', [username])
-    .setValue('#password', [password, client.Keys.ENTER])
+    .waitForElementVisible('.couch-login-wrapper', waitTime, false)
+    .waitForElementVisible('#username', waitTime, false)
+    .setValue('.couch-login-wrapper #username', [username])
+
+    .waitForElementVisible('#password', waitTime, false)
+    .setValue('.couch-login-wrapper #password', [password])
+
+    .clickWhenVisible('#submit')
+
     .closeNotification()
     .waitForElementPresent('#jump-to-db', waitTime, false)