Github user benkeen commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/202#discussion_r21776189
  
    --- Diff: app/addons/databases/tests/nightwatch/deletesDatabase.js ---
    @@ -30,8 +30,8 @@ module.exports = {
           .url(baseUrl+'/_all_dbs')
           .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 pass. 
    
    How about renaming the createdDatabaseIsNotPresent to 
createdDatabaseIsPresent and test for its negation:
    
    ```javascript
            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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to