Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-668

Webhooks switch doesn't work as expected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2 CR1
    • 2.1 GA, SaaS
    • System

    Description

      The Webhook switch is acting very strangely. Here are some use cases I've tried. Whenever the behavior is not as I expect, I've provided a comment "Expected:"

      The biggest problem is that the switch is not changed from ON to OFF (UC-2)

      UC-1
      0. The switch is OFF
      1. Click on the switch
      2. Switch changes to ON in the UI, but shows an error: "Must be a valid URL such as http://example.com" (Expected: the switch doesn't change in the UI)
      3. URL changes from /p/admin/webhooks/edit to /p/admin/webhooks (Expected: I think the URL shouldn't change, as we are staying on the same page)
      4. Going back to /p/admin/webhooks/edit shows that the switch is still OFF

      UC-2
      0. The switch is OFF
      1. Fill a valid URL and click on the switch
      2. Switch changes to ON
      3. Reloading /p/admin/webhooks/edit shows that the switch is correctly ON
      4. Click on the switch
      5. Flash message "Webhooks settings saved." is shown, but the switch doesn't change to OFF (Expected: the switch changes to OFF)
      6. Reload the page at /p/admin/webhooks/edit
      7. The switch is still ON (Expected: the switch is OFF)

      UC-3
      0. The switch is ON and the URL is filled
      1. Remove the URL and click on the switch
      2. An error "Must be a valid URL such as http://example.com" is shown under the URL field, the switch stays at ON (Expected: we are trying to switch off the switch, so the URL is not needed, it should be just switched to OFF, with no error)
      3. URL changes from /p/admin/webhooks/edit to /p/admin/webhooks (Expected: I think the URL shouldn't change, as we are staying on the same page)
      4. Click on the switch again
      5. Switch changes to OFF and the Flash message "Webhooks settings saved." (Expected: this is the expected behavior, but step 2 shouldn't have happened)
      6. Reload the page at /p/admin/webhooks/edit
      7. The switch is OFF, so everything is correct

      UPDATE:
      UC-4
      0. Webhooks are not configured, the URL is /p/admin/webhooks/new
      1. Only "Save" button is shown
      2. Click "Save" (URL field is empty)
      3. The error under URL will appear, but also "Ping!" button appears next to "Save" (Expected: "Ping!" button shouldn't appear until the correct URL is added)
      4. Clicking on "Ping!" results in "Pinging..." flash message with no outcome (no success or failure)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhn-support-dmayorov Daria Mayorova
              Jakub Smadis Jakub Smadis (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: