tests: fix flaky tests PR: #322 PR-URL: https://github.com/apache/couchdb-fauxton/pull/322 Reviewed-By: garren smith <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/6bf2ebf6 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/6bf2ebf6 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/6bf2ebf6 Branch: refs/heads/master Commit: 6bf2ebf62166485745690a07c2797ece9c25f553 Parents: 38544ab Author: Robert Kowalski <[email protected]> Authored: Fri Mar 27 16:16:14 2015 +0100 Committer: Robert Kowalski <[email protected]> Committed: Mon Mar 30 13:45:48 2015 +0200 ---------------------------------------------------------------------- app/addons/documents/tests/nightwatch/viewCreate.js | 1 + app/addons/documents/tests/nightwatch/viewCreateBadView.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/6bf2ebf6/app/addons/documents/tests/nightwatch/viewCreate.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/viewCreate.js b/app/addons/documents/tests/nightwatch/viewCreate.js index 8857af0..6fde887 100644 --- a/app/addons/documents/tests/nightwatch/viewCreate.js +++ b/app/addons/documents/tests/nightwatch/viewCreate.js @@ -28,6 +28,7 @@ var tests = { var editor = ace.edit("map-function");\ editor.getSession().setValue("function (doc) { emit(\'hasehase\'); }");\ ') + .execute('$(".save")[0].scrollIntoView();') .click('button.btn.btn-success.save') .waitForElementPresent('.prettyprint', waitTime, false) .assert.containsText('.prettyprint', 'hasehase') http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/6bf2ebf6/app/addons/documents/tests/nightwatch/viewCreateBadView.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/tests/nightwatch/viewCreateBadView.js b/app/addons/documents/tests/nightwatch/viewCreateBadView.js index 9fda24d..a4847c8 100644 --- a/app/addons/documents/tests/nightwatch/viewCreateBadView.js +++ b/app/addons/documents/tests/nightwatch/viewCreateBadView.js @@ -12,7 +12,7 @@ module.exports = { - 'Edits a design doc - set new index name': function (client) { + 'Displays an error if reduce is not possible': function (client) { /*jshint multistr: true */ var waitTime = 10000, newDatabaseName = client.globals.testDatabaseName, @@ -36,6 +36,7 @@ module.exports = { ') .click('#reduce-function-selector') .keys(['\uE013', '\uE013', '\uE013', '\uE013', '\uE006']) + .execute('$(".save")[0].scrollIntoView();') .click('button.btn-success.save') .waitForElementVisible('.alert-error', waitTime, false) .assert.containsText('.alert-error', 'builtin _sum function requires map values to be numbers or lists of numbers')
