iachat/spec/jobs
Sojan Jose ad4ec9e93b
fix: Flaky Instagram webhook specs (#12170)
### Summary

Fixed flaky Instagram webhook specs that failed intermittently in cloud
environments due to shared let blocks creating conflicting inboxes. The
Instagram channel factory already creates an inbox automatically, but
tests were adding extra ones in shared contexts.
Moved channel/inbox creation to isolated test contexts to prevent race
conditions between Facebook Page and Instagram Direct tests.

### Testing

```
for i in {1..30}; do 
  echo "=== Run $i ==="
  RAILS_ENV=test bundle exec rspec spec/jobs/webhooks/instagram_events_job_spec.rb --fail-fast || break
done
```

Previously, intermittent failures could be reproduced locally. With
these changes, tests achieve ~100% pass rate.
2025-08-12 20:12:18 +05:30
..
account feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
agent_bots feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
agents chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
avatar fix: Disable enqueueing Avatar jobs if the URL is invalid (#12035) 2025-07-24 12:56:39 +04:00
campaigns chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
channels/whatsapp fix: Template sync issue for older Whatsapp channels (#8830) 2024-01-31 18:38:01 +04:00
conversations chore: move UpdateMessageStatus to deferred queue (#11943) 2025-07-16 08:19:00 +05:30
crm feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
inboxes fix: Disable IMAP inboxes that requires authorization (#12092) 2025-08-01 16:32:29 -07:00
internal feat: automate account deletion (#11406) 2025-05-23 12:58:13 +05:30
labels chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
migration chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
notification chore: [Snyk] Security upgrade rspec-rails from 6.1.4 to 6.1.5 (#10066) 2024-09-16 09:44:07 +05:30
webhooks fix: Flaky Instagram webhook specs (#12170) 2025-08-12 20:12:18 +05:30
bulk_actions_job_spec.rb feat: Add support for bulk snooze until (#9360) 2024-05-08 08:55:31 +05:30
data_import_job_spec.rb fix: downcase email before finding (#8921) 2024-02-21 18:51:00 +05:30
delete_object_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
event_dispatcher_job_spec.rb chore: Enable the new Rubocop rules (#7122) 2023-05-19 14:37:10 +05:30
hook_job_spec.rb feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
mutex_application_job_spec.rb fix: mutex timeout and error handling (#8770) 2024-01-24 14:18:21 +04:00
send_on_slack_job_spec.rb fix: issue with slack job (#7179) 2023-05-24 20:22:34 +05:30
send_reply_job_spec.rb feat: Instagram Inbox using Instagram Business Login (#11054) 2025-04-08 10:47:41 +05:30
slack_unfurl_job_spec.rb feat: Support link unfurling for all the channels within the same connected channel account. (#8033) 2023-10-08 17:55:03 +05:30
trigger_scheduled_items_job_spec.rb chore: Add validations to campaign model 2025-03-19 17:29:08 -07:00
webhook_job_spec.rb feat: Mark the messages as failed if the API channel webhooks fail for any reason. (#8277) 2023-11-04 12:26:28 +05:30