Repository: couchdb-fauxton Updated Branches: refs/heads/master ae5070b43 -> 045a08d0a
replication: harden nightwatch test Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/045a08d0 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/045a08d0 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/045a08d0 Branch: refs/heads/master Commit: 045a08d0a7985308e52021fffd0f65d7267f08e6 Parents: ae5070b Author: Garren Smith <garren.sm...@gmail.com> Authored: Wed Nov 30 14:26:58 2016 +0200 Committer: Garren Smith <garren.sm...@gmail.com> Committed: Thu Dec 1 17:31:32 2016 +0200 ---------------------------------------------------------------------- .../replication/tests/nightwatch/replication.js | 58 ++++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/045a08d0/app/addons/replication/tests/nightwatch/replication.js ---------------------------------------------------------------------- diff --git a/app/addons/replication/tests/nightwatch/replication.js b/app/addons/replication/tests/nightwatch/replication.js index 9c21361..33f58e1 100644 --- a/app/addons/replication/tests/nightwatch/replication.js +++ b/app/addons/replication/tests/nightwatch/replication.js @@ -47,27 +47,27 @@ module.exports = { .createDocument(docName1, newDatabaseName1) .loginToGUI() .url(baseUrl + '/#replication/_create') - .waitForElementPresent('button#replicate', waitTime, true) - .waitForElementPresent('#replication-source', waitTime, true) + .waitForElementVisible('button#replicate', waitTime, true) + .waitForElementVisible('#replication-source', waitTime, true) // select LOCAL as the source - .click('#replication-source') + .clickWhenVisible('#replication-source') .keys(['\uE006']) - .waitForElementPresent('.replication__input-react-select', waitTime, true) + .waitForElementVisible('.replication__input-react-select', waitTime, true) // enter our source DB .setValue('.replication__input-react-select .Select-input input', [newDatabaseName1, client.Keys.ENTER]) // enter a new target name - .waitForElementPresent('#replication-target', waitTime, true) - .click('option[value="REPLICATION_TARGET_NEW_LOCAL_DATABASE"]') + .waitForElementVisible('#replication-target', waitTime, true) + .clickWhenVisible('option[value="REPLICATION_TARGET_NEW_LOCAL_DATABASE"]') .setValue('.replication__new-input', replicatedDBName) - .click('#replicate') + .clickWhenVisible('#replicate') - .waitForElementPresent('.enter-password-modal', waitTime, true) + .waitForElementVisible('.enter-password-modal', waitTime, true) .setValue('.enter-password-modal .password-modal-input', password) - .click('.enter-password-modal button.save') + .clickWhenVisible('.enter-password-modal button.save') .waitForElementNotPresent('.enter-password-modal', waitTime, true) .waitForElementNotPresent('.global-notification .fonticon-cancel', waitTime, false) .end(); @@ -92,29 +92,29 @@ module.exports = { // now login and fill in the replication form .loginToGUI() .url(baseUrl + '/#replication/_create') - .waitForElementPresent('button#replicate', waitTime, true) - .waitForElementPresent('#replication-source', waitTime, true) + .waitForElementVisible('button#replicate', waitTime, true) + .waitForElementVisible('#replication-source', waitTime, true) // select the LOCAL db as the source - .click('#replication-source') + .clickWhenVisible('#replication-source') .keys(['\uE006']) - .waitForElementPresent('.replication__input-react-select', waitTime, true) + .waitForElementVisible('.replication__input-react-select', waitTime, true) .setValue('.replication__input-react-select .Select-input input', [newDatabaseName1, client.Keys.ENTER]) // select existing local as the target - .waitForElementPresent('#replication-target', waitTime, true) - .click('#replication-target option[value="REPLICATION_TARGET_EXISTING_LOCAL_DATABASE"]') + .waitForElementVisible('#replication-target', waitTime, true) + .clickWhenVisible('#replication-target option[value="REPLICATION_TARGET_EXISTING_LOCAL_DATABASE"]') .setValue('#replication-target-local .Select-input input', [newDatabaseName2, client.Keys.ENTER]) .getAttribute('#replicate', 'disabled', function (result) { // confirm it's not disabled this.assert.equal(result.value, null); }) - .click('#replicate') + .clickWhenVisible('#replicate') - .waitForElementPresent('.enter-password-modal', waitTime, true) + .waitForElementVisible('.enter-password-modal', waitTime, true) .setValue('.enter-password-modal input[type="password"]', password) - .click('.enter-password-modal button.save') + .clickWhenVisible('.enter-password-modal button.save') .end(); }, @@ -143,18 +143,18 @@ module.exports = { // now login and fill in the replication form .loginToGUI() .url(baseUrl + '/#replication/_create') - .waitForElementPresent('button#replicate', waitTime, true) - .waitForElementPresent('#replication-source', waitTime, true) + .waitForElementVisible('button#replicate', waitTime, true) + .waitForElementVisible('#replication-source', waitTime, true) // select the LOCAL db as the source - .click('#replication-source') + .clickWhenVisible('#replication-source') .keys(['\uE006']) - .waitForElementPresent('.replication__input-react-select', waitTime, true) + .waitForElementVisible('.replication__input-react-select', waitTime, true) .setValue('.replication__input-react-select .Select-input input', [newDatabaseName1, client.Keys.ENTER]) // select existing local as the target - .waitForElementPresent('#replication-target', waitTime, true) - .click('#replication-target option[value="REPLICATION_TARGET_EXISTING_LOCAL_DATABASE"]') + .waitForElementVisible('#replication-target', waitTime, true) + .clickWhenVisible('#replication-target option[value="REPLICATION_TARGET_EXISTING_LOCAL_DATABASE"]') .setValue('#replication-target-local .Select-input input', [newDatabaseName2, client.Keys.ENTER]) .setValue('.replication__doc-name-input', [replicatorDoc._id, client.Keys.ENTER]) @@ -162,13 +162,13 @@ module.exports = { // confirm it's not disabled this.assert.equal(result.value, null); }) - .click('#replicate') + .clickWhenVisible('#replicate') - .waitForElementPresent('.replication__error-doc-modal .replication__error-continue', waitTime, true) - .click('.replication__error-doc-modal .replication__error-continue') - .waitForElementPresent('.enter-password-modal', waitTime, true) + .waitForElementVisible('.replication__error-doc-modal .replication__error-continue', waitTime, true) + .clickWhenVisible('.replication__error-doc-modal .replication__error-continue') + .waitForElementVisible('.enter-password-modal', waitTime, true) .setValue('.enter-password-modal input[type="password"]', password) - .click('.enter-password-modal button.save') + .clickWhenVisible('.enter-password-modal button.save') .end(); } };