Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/callback UI tests #1955

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

Task/callback UI tests #1955

wants to merge 36 commits into from

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Sep 23, 2024

Summary | Résumé

This PR adds UI tests for the callbacks page and support for the new cache-clear endpoint in API.
With the cache-clear endpoint we can now manage Redis state during Cypress tests.

These tests experiment with the use of a utility endpoint in API to assist with cleaning up the DB after a test run.

Test instructions | Instructions pour tester la modification

  1. Check out and run this API PR locally
  2. Update your Cypress .env from 1Password to get the JWT configs for the cache-clear endpoint calls.
  3. Run the Cypress tests

whabanks and others added 27 commits May 29, 2024 15:32
- Added the [validators](https://yozachar.github.io/pyvalidators/stable/) lib to the project
- Callback URLs are now checked for validity
- Callback URLs are now tested to determine if they are reachable before saving the callback url
- Validate that callback urls return 200 responses
- Update error messages
- Add logic for catching 5xx and 4xx errors and raise the correct validation error + logging
- Fixed ServiceReceiveCallbackMessagesForm validation
- We only want to verify that there's a service running at the specified callback URL.
- Additionally we are sending a payload the service won't understand how to response to so a 5xx is likely
- There is now a dedicated delete button to remove a callback configuration instead of needing to empty the form and click save to delete a config
- Users will receive a confirmation banner before deletion occurs
- Saving, creating, and deleting a callback url now provide the user with a confirmation message that the operation succeeded
- Added a button to the callback config page so users can see the response times of their callback services
- Added some translation stubs
- The ping to their service takes place as part of the validation
- Added placeholder FR translations
- Removed validation that allowed the form to be submitted while empty, this was how callbacks were deleted previously
- Added additional check to the make format task
- Updated EN translations
- Formatting
- Add new message content
app/main/views/api_keys.py Fixed Show fixed Hide fixed
app/main/views/api_keys.py Fixed Show fixed Hide fixed
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants