[MGNLHOOK-145] End to end tests for webhooks on SaaS Created: 20/Jun/22  Updated: 16/Nov/22  Resolved: 16/Nov/22

Status: Closed
Project: Magnolia Webhooks
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0.1

Type: Story Priority: Neutral
Reporter: Javier Benito Assignee: Chuong Doan Huy
Resolution: Fixed Votes: 0
Labels: TPR-E2E
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 5d 1h Time Spent: 5d 1h
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Cloners
clones MGNLHOOK-46 Integration tests - dx core webapp Closed
Relates
relates to MGNLHOOK-296 Replace webhook.site url in e2e becau... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLHOOK-279 Write feature file Sub-task Completed Chuong Doan Huy  
MGNLHOOK-281 Implement tests Sub-task Completed Chuong Doan Huy  
MGNLHOOK-282 Review code Sub-task Completed Christoph Meier  
MGNLHOOK-289 Review feature file Sub-task Completed Christoph Meier  
Team: DeveloperX
Date of First Response:
Epic Link: Webhooks Maintenance (Phase 1)
Sprint: DevX 23
Story Points: 5

 Description   

These scenarios should be implemented :
+ Simple webhook definition listen on publish/unpublish event ==> expect receive properly requests to defined url once events triggered.
+ Webhook definition with reference to configured rest client ==> expect receive properly requests to defined url once events triggered.
+ Webhook with filter ==> expect only events match with filter receive requests



 Comments   
Comment by Christopher Zimmermann [ 03/Nov/22 ]

To save time, and since JCR will soon be discontinued on SaaS - I think we can skip the JCR tests.

Comment by Christopher Zimmermann [ 03/Nov/22 ]

They look good. I think you can go ahead. Just one question:  I wonder if we need to test these:

+ Multiple environments :

  • switch to env that have webhooks defined and trigger event ==> receive properly requests
  • switch to env that does not have webhooks defined and trigger event ==> should not receive any requests

jbenito are webhook definitions very different to other definitions - do you think its worth testing the above - or would that just be redundant with other tests.of the environment switching we will do?

Comment by Javier Benito [ 04/Nov/22 ]

Sorry I didn't see this yesterday. I've just discussed it with chuong.doan and told him that, if I'm not wrong, environment switch listeners should be configured in any different module (Webhooks, Content Types, etc), so if it works for a given module, it still can fail for a different one.

In the case of Webhooks, this piece of code takes care about that, so if somebody removes it, webhooks won't take care about environment definition changes, and will remain the same for all environments, no matter if they have trigger events configured or not.

Comment by Javier Benito [ 04/Nov/22 ]

Adding more detail / new discoveries about this, currently:

  • Having a single webhook event configured in a light module on main environment, works fine and is triggered.
  • Having a second environment without webhook events configured, when switch to that environment on the UI, previously configured webhook events are still fired, which is a bug.

So I'd say that taking also this into account, I feel that we need a test for environment switching on webhooks, because now on SaaS environment switch is working fine for Content Types for instance, but not for Webhooks.

Generated at Mon Feb 12 10:01:31 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.