[pull] main from TryGhost:main - #1466
Merged
Merged
Conversation
The test that covers creating a member from a Stripe checkout checked the two emails the checkout produces with an assertion that reads emails in the order they were sent. Neither email is sent by the webhook request: the staff notification comes from a subscriber to a domain event, which Ghost holds back until the transaction that created the member has committed, and the member's own signup email is started by the webhook handler and never awaited, so that failing to send it cannot fail the webhook and make Stripe retry the payment work. Both therefore outlive the response the test waits on, and nothing decides which of the two lands first, so the test could find an email missing or find the two the other way round. It now waits for each email on its own and matches it by content rather than by position, through a new sentEmailEventually assertion that searches every email sent so far and keeps looking until a timeout. Claude-Session: https://claude.ai/code/session_01XFCbqgYHYhd9rZ5WXtqZyT
…or (#30479) no ref Adds some ux features to the React post editor.
no ref Correctness change for the React editor, where any save action would result in 'unsaved changes' being detected.
The tests that check what Ghost records when a Stripe subscription is created read the member and subscription event rows straight after the webhook responds. Those rows are not written by the webhook request. Ghost holds each event back until the transaction that created the member has committed and only then hands it to a subscriber, which writes the row in its own asynchronous step that nothing about the request waits for. The row is therefore still being written while the test is already reading, so a different handful of these tests failed on each run with the row simply missing. Reading the rows now waits for every dispatched event to have been handled first. Claude-Session: https://claude.ai/code/session_01XFCbqgYHYhd9rZ5WXtqZyT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )