diff --git a/app/addons/documents/tests/nightwatch/viewCreateBadView.js b/app/addons/documents/tests/nightwatch/viewCreateBadView.js index 0cc2a6b3b..8f79e4e97 100644 --- a/app/addons/documents/tests/nightwatch/viewCreateBadView.js +++ b/app/addons/documents/tests/nightwatch/viewCreateBadView.js @@ -16,7 +16,7 @@ module.exports = { 'Displays an error if reduce is not possible': function (client) { /*jshint multistr: true */ - var waitTime = client.globals.maxWaitTime, + const waitTime = client.globals.maxWaitTime, newDatabaseName = client.globals.testDatabaseName, baseUrl = client.globals.test_settings.launch_url; @@ -38,21 +38,29 @@ module.exports = { ') .execute('$("#save-view")[0].scrollIntoView();') .clickWhenVisible('#save-view') - .waitForAttribute('#global-notifications', 'textContent', function (docContents) { + .waitForElementNotPresent('.global-notification .fonticon-cancel', waitTime, false) + .clickWhenVisible('.control-toggle-queryoptions', waitTime, false) + .clickWhenVisible('label[for="qoReduce"]', waitTime, false) + .clickWhenVisible('.query-options .btn-secondary', waitTime, false) + .waitForAttribute('.doc-item', 'textContent', function (docContents) { return (/_sum function requires/).test(docContents); }) .end(); }, 'Visit url of broken view displays error': function (client) { - var newDatabaseName = client.globals.testDatabaseName, - baseUrl = client.globals.test_settings.launch_url; + const newDatabaseName = client.globals.testDatabaseName, + baseUrl = client.globals.test_settings.launch_url, + waitTime = client.globals.maxWaitTime; client .loginToGUI() .populateDatabase(newDatabaseName) .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/brokenview/_view/brokenview') - .waitForAttribute('#global-notifications', 'textContent', function (docContents) { + .clickWhenVisible('.control-toggle-queryoptions', waitTime, false) + .clickWhenVisible('label[for="qoReduce"]', waitTime, false) + .clickWhenVisible('.query-options .btn-secondary', waitTime, false) + .waitForAttribute('.doc-item', 'textContent', function (docContents) { return (/_sum function requires/).test(docContents); }) .end(); diff --git a/docker/dc.selenium.yml b/docker/dc.selenium.yml index f65f28409..bcac4a475 100644 --- a/docker/dc.selenium.yml +++ b/docker/dc.selenium.yml @@ -8,7 +8,7 @@ services: couchdb: container_name: couchdb - image: klaemo/couchdb:2.0-dev + image: couchdbdev/debian-8-dev command: '--with-haproxy -a tester:testerpass' ports: - "5984:5984" \ No newline at end of file