Skip to content

Tests: Fix Subscriber Checks - #146

Merged
n7studios merged 1 commit into
mainfrom
tests-fix-subscriber-checks
Sep 15, 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 label Sep 10, 2026
@n7studios
n7studios marked this pull request as ready for review September 11, 2026 03:07
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team September 11, 2026 03:07
@n7studios
n7studios merged commit 1a422c9 into main Sep 15, 2026
60 of 96 checks passed
@n7studios
n7studios deleted the tests-fix-subscriber-checks branch September 15, 2026 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants