couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benkeen <>
Subject [GitHub] couchdb-fauxton pull request: Make deleteDatabase test in Nightwat...
Date Fri, 12 Dec 2014 21:57:59 GMT
Github user benkeen commented on a diff in the pull request:
    --- Diff: app/addons/databases/tests/nightwatch/deletesDatabase.js ---
    @@ -30,8 +30,8 @@ module.exports = {
           .waitForElementPresent('pre',waitTime, false)
           .getText('body', function (result) {
    -        var data = result.value, 
    -            createdDatabaseIsNotPresent = data.indexOf(newDatabaseName);
    +        var data = result.value,
    +            createdDatabaseIsNotPresent = data.indexOf('"'+newDatabaseName+'"');
    --- End diff --
    Correct me if I'm wrong, but I'm not sure this makes sense. The database name isn't wrapped
in double quotes in the page - only the URL, correct? So this will never match + thus always
    How about renaming the createdDatabaseIsNotPresent to createdDatabaseIsPresent and test
for its negation:
            var data = result.value, 
                createdDatabaseIsPresent = data.indexOf('"/#/database/' + newDatabaseName
+ '/_all_docs"');
            this.verify.ok(createdDatabaseIsPresent === -1,
              'Checking if new database no longer shows up in _all_dbs.');

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message