Skip to content

Conversation

@cmuench
Copy link
Contributor

@cmuench cmuench commented Aug 8, 2025

…ou to test your webhook configurations.

Key changes:

  • Added a "Test" button to the webhook form in the options page.
  • The button sends a test payload ({ "url": "https://example.com" }) to the configured webhook URL.
  • Refactored the webhook sending logic into a reusable function sendWebhook in utils/utils.js.
  • Updated the popup to use the new sendWebhook function.
  • Updated the README.md to document the new feature.

The unit tests are currently failing after these changes. I have started fixing them by:

  • Mocking the new sendWebhook function in tests/popup.test.js.
  • Updating the JSDOM environment in tests/options.test.js and tests/exportImport.test.js to include the new HTML elements.

Further work is required to get the tests passing.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR introduces a "Test" button for webhooks, a valuable feature for users. The implementation is well-structured, with the core logic refactored into a reusable sendWebhook function. The changes are clean and the feature is well-integrated.

🔍 General Feedback

  • The refactoring of the webhook sending logic into utils/utils.js is a great improvement for code maintainability and reusability.
  • The addition of status messages for the test button provides good user feedback.
  • The PR includes updates to tests and documentation, which is excellent.

Comment on lines +191 to +192
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 The _url property is a custom property on the fetchOpts object. It's good practice to remove it before calling fetch to avoid passing non-standard properties to the fetch function. You could add if (fetchOpts._url) delete fetchOpts._url; before the fetch call.

google-labs-jules bot and others added 5 commits August 8, 2025 09:40
…ou to test your webhook configurations.

Key changes:
- Added a "Test" button to the webhook form in the options page.
- The button sends a test payload (`{ "url": "https://example.com" }`) to the configured webhook URL.
- Refactored the webhook sending logic into a reusable function `sendWebhook` in `utils/utils.js`.
- Updated the popup to use the new `sendWebhook` function.
- Updated the `README.md` to document the new feature.

The unit tests are currently failing after these changes. I have started fixing them by:
- Mocking the new `sendWebhook` function in `tests/popup.test.js`.
- Updating the JSDOM environment in `tests/options.test.js` and `tests/exportImport.test.js` to include the new HTML elements.

Further work is required to get the tests passing.
…est your webhook configurations.

Here are the key changes I made:
- Added a "Test" button to the webhook form in the options page.
- The button sends a test payload (`{ "url": "https://example.com" }`) to the configured webhook URL.
- Refactored the webhook sending logic into a reusable function `sendWebhook` in `utils/utils.js`.
- Updated the popup to use the new `sendWebhook` function.
- Updated the `README.md` to document the new feature.
- Fixed all unit tests that were failing as a result of these changes.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@cmuench cmuench force-pushed the feature/test-webhook-button branch from 079f42c to 163e720 Compare August 8, 2025 07:45
@cmuench cmuench merged commit 10be2a4 into main Aug 8, 2025
1 check passed
@cmuench cmuench deleted the feature/test-webhook-button branch August 8, 2025 08:36
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