You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2015/02/14 00:56:58 UTC

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/271

    Improved tooltip for ! icon on db page

    This adds a jQuery tooltip for the (!) icons on the Databases
    page and includes a nightwatch test to confirm the mouseover
    behaviour.
    
    Closes COUCHDB-2581

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benkeen/couchdb-fauxton 2581-tooltip-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/271.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #271
    
----
commit 02321e9f256959aef4eb6d5dd6296c60d9e9b772
Author: Ben Keen <be...@gmail.com>
Date:   2015-02-13T23:55:38Z

    Improved tooltip for ! icon on db page
    
    This adds a jQuery tooltip for the (!) icons on the Databases
    page and includes a nightwatch test to confirm the mouseover
    behaviour.
    
    Closes COUCHDB-2581

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#discussion_r24743193
  
    --- Diff: app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---
    @@ -0,0 +1,49 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +module.exports = {
    +  'Check the tooltip icon for DB with deleted items appears' : function (client) {
    --- End diff --
    
    no space before the `:`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#issuecomment-74530075
  
    Thanks, @robertkowalski! All fixed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#issuecomment-74572886
  
    +1 nice job @benkeen!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#issuecomment-74581011
  
    Thanks Michelle :) I'll merge once it goes green.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#discussion_r24743263
  
    --- Diff: app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---
    @@ -0,0 +1,49 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +module.exports = {
    +  'Check the tooltip icon for DB with deleted items appears' : function (client) {
    +    var waitTime = 10000,
    +        newDatabaseName = client.globals.testDatabaseName,
    +        newDocumentName = 'TemporaryDoc',
    +        baseUrl = client.globals.test_settings.launch_url;
    +
    +    client
    +      .loginToGUI()
    +
    +      // use nano to quickly set up a DB with a single doc
    +      .deleteDatabase(newDatabaseName)
    +      .createDatabase(newDatabaseName)
    +      .createDocument(newDocumentName, newDatabaseName)
    +
    +      // delete the document manually. This'll ensure the database page has at least one "!" icon
    +      .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]', waitTime, false)
    +      .click('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]')
    +      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
    +      .click('label[for="checkbox-' + newDocumentName + '"]')
    +      .click('.control-toggle-alternative-header')
    +      .waitForElementPresent('.control-select-all', waitTime, false)
    +      .click('.control-delete')
    +      .acceptAlert()
    +      .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
    +      .click('#nav-links a[href="#/_all_dbs"]')
    +
    +      // now let's look at the actual UI to confirm the tooltip appears
    +      .waitForElementPresent('.js-db-graveyard', waitTime, false)
    +      .execute('$(".js-db-graveyard:first").mouseenter()')
    +      .pause(200)
    +
    +      // confirm the tooltip element has been inserted
    +      .waitForElementPresent(".tooltip.fade.top.in2", waitTime, false)
    --- End diff --
    
    i think you mean
    
    ```js
    .waitForElementPresent('.tooltip.fade.top.in', waitTime, false)
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#discussion_r24757978
  
    --- Diff: app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---
    @@ -0,0 +1,49 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +module.exports = {
    +  'Check the tooltip icon for DB with deleted items appears' : function (client) {
    +    var waitTime = 10000,
    +        newDatabaseName = client.globals.testDatabaseName,
    +        newDocumentName = 'TemporaryDoc',
    +        baseUrl = client.globals.test_settings.launch_url;
    +
    +    client
    +      .loginToGUI()
    +
    +      // use nano to quickly set up a DB with a single doc
    +      .deleteDatabase(newDatabaseName)
    +      .createDatabase(newDatabaseName)
    +      .createDocument(newDocumentName, newDatabaseName)
    +
    +      // delete the document manually. This'll ensure the database page has at least one "!" icon
    +      .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]', waitTime, false)
    +      .click('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]')
    +      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
    +      .click('label[for="checkbox-' + newDocumentName + '"]')
    +      .click('.control-toggle-alternative-header')
    +      .waitForElementPresent('.control-select-all', waitTime, false)
    +      .click('.control-delete')
    +      .acceptAlert()
    +      .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
    +      .click('#nav-links a[href="#/_all_dbs"]')
    +
    +      // now let's look at the actual UI to confirm the tooltip appears
    +      .waitForElementPresent('.js-db-graveyard', waitTime, false)
    +      .execute('$(".js-db-graveyard:first").mouseenter()')
    +      .pause(200)
    --- End diff --
    
    Ah, interesting! I experimented with moveToElement but it wouldn't work for me. I'll try this out. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#issuecomment-74489973
  
    Hey @benkeen - great work.
    
    I found a small issue (also partly the reason the test fails)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#discussion_r24743159
  
    --- Diff: app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---
    @@ -0,0 +1,49 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +module.exports = {
    +  'Check the tooltip icon for DB with deleted items appears' : function (client) {
    +    var waitTime = 10000,
    +        newDatabaseName = client.globals.testDatabaseName,
    +        newDocumentName = 'TemporaryDoc',
    +        baseUrl = client.globals.test_settings.launch_url;
    +
    +    client
    +      .loginToGUI()
    +
    +      // use nano to quickly set up a DB with a single doc
    +      .deleteDatabase(newDatabaseName)
    +      .createDatabase(newDatabaseName)
    +      .createDocument(newDocumentName, newDatabaseName)
    +
    +      // delete the document manually. This'll ensure the database page has at least one "!" icon
    +      .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]', waitTime, false)
    +      .click('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]')
    +      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
    +      .click('label[for="checkbox-' + newDocumentName + '"]')
    +      .click('.control-toggle-alternative-header')
    +      .waitForElementPresent('.control-select-all', waitTime, false)
    +      .click('.control-delete')
    +      .acceptAlert()
    +      .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
    +      .click('#nav-links a[href="#/_all_dbs"]')
    +
    +      // now let's look at the actual UI to confirm the tooltip appears
    +      .waitForElementPresent('.js-db-graveyard', waitTime, false)
    +      .execute('$(".js-db-graveyard:first").mouseenter()')
    +      .pause(200)
    --- End diff --
    
    injecting js does not simulate user behaviour. you can use the selenium protocol:
    
    ```
    
          // now let's look at the actual UI to confirm the tooltip appears
          .waitForElementPresent('.js-db-graveyard', waitTime, false)
          .moveToElement('.js-db-graveyard', 1, 1)
    
          // confirm the tooltip element has been inserted
          .waitForElementPresent('.tooltip.fade.top.in', waitTime, false)
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/271


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#discussion_r24743116
  
    --- Diff: app/addons/databases/tests/nightwatch/checkDatabaseTooltip.js ---
    @@ -0,0 +1,49 @@
    +// Licensed under the Apache License, Version 2.0 (the "License"); you may not
    +// use this file except in compliance with the License. You may obtain a copy of
    +// the License at
    +//
    +//   http://www.apache.org/licenses/LICENSE-2.0
    +//
    +// Unless required by applicable law or agreed to in writing, software
    +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +// License for the specific language governing permissions and limitations under
    +// the License.
    +
    +module.exports = {
    +  'Check the tooltip icon for DB with deleted items appears' : function (client) {
    +    var waitTime = 10000,
    +        newDatabaseName = client.globals.testDatabaseName,
    +        newDocumentName = 'TemporaryDoc',
    +        baseUrl = client.globals.test_settings.launch_url;
    +
    +    client
    +      .loginToGUI()
    +
    +      // use nano to quickly set up a DB with a single doc
    +      .deleteDatabase(newDatabaseName)
    +      .createDatabase(newDatabaseName)
    +      .createDocument(newDocumentName, newDatabaseName)
    +
    +      // delete the document manually. This'll ensure the database page has at least one "!" icon
    +      .waitForElementPresent('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]', waitTime, false)
    +      .click('#dashboard-content a[href="#/database/' + newDatabaseName + '/_all_docs"]')
    +      .waitForElementVisible('label[for="checkbox-' + newDocumentName + '"]', waitTime, false)
    +      .click('label[for="checkbox-' + newDocumentName + '"]')
    +      .click('.control-toggle-alternative-header')
    +      .waitForElementPresent('.control-select-all', waitTime, false)
    +      .click('.control-delete')
    +      .acceptAlert()
    +      .waitForElementVisible('#global-notifications .alert.alert-info', waitTime, false)
    +      .click('#nav-links a[href="#/_all_dbs"]')
    +
    +      // now let's look at the actual UI to confirm the tooltip appears
    +      .waitForElementPresent('.js-db-graveyard', waitTime, false)
    +      .execute('$(".js-db-graveyard:first").mouseenter()')
    +      .pause(200)
    --- End diff --
    
    remove the `pause`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Improved tooltip for ! icon on db pa...

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/271#issuecomment-74696471
  
    Merged as 4a9334c76ce8926a3e230c6726f6041d454b79c7


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---