Skip to content

Tests: Fix Subscriber Checks - #170

Merged
n7studios merged 1 commit into
mainfrom
tests-fix-subscriber-checks
Sep 14, 2026
Merged

n7studios merged 1 commit into
mainfrom
tests-fix-subscriber-checks

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Applies the PR from the main Kit Plugin:

Tests failed intermittently on GitHub Actions when checking a subscriber was created. Kit's API is eventually consistent - searching by email after a write can take 30 seconds to 5 minutes to catch up, however tests search immediately, resulting in failures.

Fixes tests that only know the subscriber email by adding a test-only WordPress mu-plugin that:

  • Records the Kit API requests and responses
  • Extracts the ID from the log
  • Fetches the subscriber by ID vs. by email

In the future, these test helper methods ideally will be in the Kit WordPress Libraries, given we use them across all Kit Plugins.

Testing

Existing tests pass.

Checklist

@n7studios n7studios self-assigned this Sep 10, 2026
@n7studios n7studios added the bug Something isn't working label Sep 10, 2026
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team September 10, 2026 05:59
@n7studios
n7studios marked this pull request as ready for review September 10, 2026 05:59
@n7studios
n7studios merged commit 8d6d813 into main Sep 14, 2026
50 of 51 checks passed
@n7studios
n7studios deleted the tests-fix-subscriber-checks branch September 14, 2026 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants