Repository: couchdb-fauxton Updated Branches: refs/heads/master 07fe0738a -> bf482729b
Fix lookaheadTray It wasn't showing up on click Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/bf482729 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/bf482729 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/bf482729 Branch: refs/heads/master Commit: bf482729b8322b058246c6b7b9d8df8b7ec51d69 Parents: 07fe073 Author: Robert Kowalski <[email protected]> Authored: Wed Nov 26 17:35:08 2014 +0100 Committer: Robert Kowalski <[email protected]> Committed: Thu Nov 27 13:16:28 2014 +0100 ---------------------------------------------------------------------- .../documents/tests/nightwatch/lookaheadTray.js | 27 ++++++++++++++++++++ app/addons/fauxton/components.js | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/bf482729/app/addons/documents/tests/nightwatch/lookaheadTray.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/lookaheadTray.js b/app/addons/documents/tests/nightwatch/lookaheadTray.js new file mode 100644 index 0000000..85b0703 --- /dev/null +++ b/app/addons/documents/tests/nightwatch/lookaheadTray.js @@ -0,0 +1,27 @@ +// Licensed under the Apache License, Version 2.0 (the "License"); you may not +// use this file except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations under +// the License. + +module.exports = { + 'The tray opens': function (client) { + var waitTime = 10000, + newDatabaseName = client.globals.testDatabaseName, + baseUrl = client.globals.baseUrl; + + client + .loginToGUI() + .url(baseUrl + '/#/database/' + newDatabaseName + '/_all_docs') + .waitForElementVisible('.lookahead-tray-link', waitTime, false) + .click('.lookahead-tray-link') + .waitForElementVisible('.lookahead-tray', waitTime, false) + .end(); + } +}; http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/bf482729/app/addons/fauxton/components.js ---------------------------------------------------------------------- diff --git a/app/addons/fauxton/components.js b/app/addons/fauxton/components.js index 4548495..bb8260c 100644 --- a/app/addons/fauxton/components.js +++ b/app/addons/fauxton/components.js @@ -1028,10 +1028,10 @@ function(app, FauxtonAPI, ace, spin, ZeroClipboard) { }, openTray: function () { - this.$el.velocity("transition.slideDownIn", FauxtonAPI.constants.TRAY_TOGGLE_SPEED, function () { + var speed = FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED; + this.$el.velocity('transition.slideDownIn', speed, function () { this.$el.find('input').focus(); }.bind(this)); - }, closeTray: function () {
