Commit Graph

134 Commits

Author SHA1 Message Date
Matej Bačo db406b0a27 Fix tests 2026-04-13 15:08:20 +02:00
Matej Bačo 28d285d5c5 Improved tests for webhook edge cases 2026-04-13 14:53:06 +02:00
Matej Bačo a1267b1bff Backwards compatibiltiy tests 2026-04-11 11:16:43 +02:00
Matej Bačo bf375d1d40 Fix bugs 2026-03-17 13:52:50 +01:00
Matej Bačo fd05827089 Implement tests 2026-03-17 13:27:53 +01:00
Matej Bačo ac2b35004d Add more public webhook endpoints 2026-03-17 13:03:26 +01:00
Matej Bačo 677bb048cc Introduce new webhooks API 2026-03-17 11:03:18 +01:00
Jake Barnby 07dc088e4e fix: improve E2E test probes and enable function webhook events
- Fix testPasswordRecoveryUrlParams: use URL-based probes instead of
  userId-based probes to distinguish between test cases that share the
  same user
- Enable functions.* webhook events in ProjectCustom for function
  webhook tests that were silently passing by matching stale events
- Fix setupTeamMembership: add email address probe to getLastEmail to
  prevent picking up wrong invitation email
- Fix getLastEmail multi-email race: assert count inside assertEventually
  when requesting multiple emails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 15:15:59 +13:00
Jake Barnby 5cb36a0a3a fix: resolve E2E test race conditions in parallel execution
- Add probe callback support to getLastEmail(), getLastEmailByAddress(),
  and getLastRequest() to filter results by content before accepting
- Fix variable name typo in TeamsCustomClientTest ($email vs $lastEmail)
- Add event probes to all 56 webhook test getLastRequest() calls to
  filter by specific event pattern (resource ID + action)
- Add email probes to Account OTP/recovery/magic-url tests to wait for
  the correct email (security phrase, Password Reset subject, etc.)
- Add email probes to Projects tests for recovery email URL matching
- Increase FunctionsSchedule future time from 1min to 2min to avoid
  timing issues when seconds are zeroed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:43:15 +13:00
Jake Barnby acad17f3b8 fix: resolve test failures and reduce excessive timeouts
- DatabasesBase: fix 5 merge corruption issues (missing integers2 attr,
  undefined vars, wrong assertion, wrong setup method)
- WebhooksBase: increase deployment build timeout from 10s to 120s
- RealtimeBase: reduce WebSocket timeout 120s→30s, fix deprecated nullable
- RealtimeConsoleClientTest: reduce assertEventually 120s→30s
- SchemaPolling: reduce all default timeouts 600s→60s
- SitesBase: reduce build timeout 300s→120s, activation 200s→60s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 14:23:42 +13:00
Jake Barnby 6e103393b8 fix: Fix undefined $data variables in Webhooks tests
- testCreateAttributes: Use $actorsId instead of undefined $data['actorsId']
- testCreateColumns: Use $actorsId instead of undefined $data['actorsId']
- testCreateAccountSession: Add assertion for account creation success

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:23:44 +13:00
Jake Barnby 8627251ae4 fix: Make testDeleteStorageBucket self-sufficient
Update bucket name before deleting to ensure webhook data has
expected name, regardless of whether testUpdateStorageBucket ran.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:59:16 +13:00
Jake Barnby b1257cc40a perf: Remove @depends from Webhooks and Teams tests
Enables --functional mode for parallel test execution by:
- Adding helper methods for independent test setup
- Removing all #[Depends] annotations
- Using static caching for shared resources

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 04:47:12 +13:00
Jake Barnby 7498c330eb Add missing PHPUnit #[Depends] to Functions, Messaging, Webhooks tests
Fixed missing #[Depends] attributes:
- FunctionsCustomServerTest: testCancelDeploymentBuild → testCreateDeployment
- MessagingBase: testDeleteMessage → testSendEmail
- WebhooksBase: testDeleteDocument → testUpdateDocument, testDeleteRow → testUpdateRow
- WebhooksCustomClientTest: testUpdateAccountName → testDeleteAccountSessions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 18:18:55 +13:00
Jake Barnby 714b8d7ea6 Migrate to PHPUnit 11 2026-01-15 16:14:53 +13:00
Khushboo Verma be983eb68a Remove race condition 2025-10-16 14:40:47 +05:30
Khushboo Verma f0660f3fda Replace sleep in webhook tests with assertEventually 2025-10-16 14:23:35 +05:30
Jake Barnby ca03be5e41 Test fixes 2025-08-18 21:16:01 +12:00
Darshan 7a5a3706b6 fix: tests. 2025-07-27 18:13:30 +05:30
Jake Barnby b2fa28754d Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
# Conflicts:
#	.github/workflows/benchmark.yml
#	composer.lock
#	src/Appwrite/Event/Database.php
2025-07-04 10:00:45 -04:00
Darshan 45370f91c3 add: table apis to webhook tests. 2025-05-10 10:52:43 +05:30
Darshan d3f1c4f852 revert: tests to collections API. 2025-05-09 15:10:44 +05:30
Darshan 9e1105b61f update: tests. 2025-05-06 11:29:56 +05:30
Darshan f94ecc885a fix: tests as per new events system. 2025-04-27 10:36:21 +05:30
Darshan f56fcc6d90 fix: remaining tests! pheww! 2025-03-29 19:56:13 +05:30
Darshan 736078203a update: change method name. 2025-03-29 18:22:59 +05:30
Darshan b1c67e6f74 fix: other remaining tests. 2025-03-29 18:21:25 +05:30
Chirag Aggarwal fe7aeefabf chore: remove redundant param 2025-03-03 16:20:32 +00:00
Chirag Aggarwal fc05a4f1e3 chore: updated to use assertEventually 2025-03-03 16:07:33 +00:00
Chirag Aggarwal e865ca74d7 chore: added timeout to webhooks base test 2025-03-03 14:41:11 +00:00
loks0n 9d4fd41701 fix: webhook test 2024-10-29 11:56:41 +00:00
Jake Barnby c58fa78962 Remove tenant in filter 2024-09-05 14:25:11 +12:00
Matej Bačo f98184405b Upgrade OPR versions 2024-08-22 12:15:38 +00:00
Torsten Dittmann 0a1d572c72 chore: run formatter 2024-03-06 18:34:21 +01:00
Khushboo Verma 7efdc7556d Fix formatting and remove flaky test 2024-01-18 18:12:58 +05:30
Khushboo Verma e3f83b1335 Assert that webhook is disabled 2024-01-18 17:58:18 +05:30
Khushboo Verma 3a1fe3b2a7 Add webhook tests 2024-01-18 15:19:57 +05:30
Christy Jacob 2e3d17e7b1 fix: webhook tests 2023-10-18 21:06:59 +04:00
Steven Nguyen aa3c2faed9 Merge tag '1.3.8' into cloud-1.3.x-2 2023-08-04 13:55:07 -07:00
Torsten Dittmann 7020c85f78 tests: fix teams tests 2023-03-23 13:06:48 +01:00
Torsten Dittmann 10cd97e978 Merge branch '1.3.x' of https://github.com/appwrite/appwrite into feat-team-prefs 2023-03-23 13:03:50 +01:00
Torsten Dittmann 496da61cd9 feat: team preferences 2023-03-06 19:54:02 +05:30
Torsten Dittmann 6e5b8fab4b fix: implement new framework changes 2023-03-01 17:30:36 +05:30
shimon 8d795ef483 addressing comments 2023-02-05 22:39:41 +02:00
shimon 5850a454e0 addressing comments 2023-02-05 22:07:46 +02:00
fogelito b301a64dc4 clean up some use classes not in use 2022-12-21 10:02:22 +02:00
fogelito 91db596b42 remove static $dateValidator 2022-12-19 13:21:09 +02:00
fogelito bdc3e9f935 $dateValidator 2022-12-15 10:51:27 +02:00
fogelito 8ade726932 Changing Role + Permissions namespace 2022-12-14 18:04:06 +02:00
fogelito f96128e14f Changing Id 2022-12-14 17:42:25 +02:00