From b240497fee2a1623859fca53cc27840cc37fa7f5 Mon Sep 17 00:00:00 2001
From: Steve Larson <9larsons@gmail.com>
Date: Mon, 22 Jun 2026 13:21:19 -0500
Subject: [PATCH 1/3] Fixed and re-enabled the batch-sending integration tests
no ref
The suite was skipped in early 2025 for "intermittent" failures, but had since
rotted into deterministic failure: the email-renderer template was rewritten
(copyright year now 2026) so every snapshot was stale, and two Replacements
tests hardcoded the unsubscribe-link port 2369, which the Mocha to Vitest
migration made per-fork. Regenerated the snapshots and matched the port flexibly
(the snapshots already scrub it); 42/42 pass, stable across repeated runs. A
latent within-file ordering dependency remains (dormant, since CI preserves
declaration order) and is worth hardening separately.
---
.../__snapshots__/batch-sending.test.js.snap | 12570 +++++++++-------
.../email-service/batch-sending.test.js | 13 +-
2 files changed, 7547 insertions(+), 5036 deletions(-)
diff --git a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap
index 6721330dbed..0b9d0fbbe84 100644
--- a/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap
+++ b/ghost/core/test/integration/services/email-service/__snapshots__/batch-sending.test.js.snap
@@ -1,30 +1,128 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`Batch sending tests HTML-content Does not HTML escape feature_image_caption 1 1`] = `
Object {
"html": "
-
+
-
-
-
- | |
-
-
-
-
-
-
+
+
+
+
+
+
+
+ | |
+
+
+
+
+
+
+
+
+
+ | |
+
+
+
+
+
- |
+ |
@@ -585,6 +683,20 @@ table.body h2 span {
+ |
+ |
+
+ |
+
@@ -592,7 +704,7 @@ table.body h2 span {
-
+
@@ -601,8 +713,7 @@ table.body h2 span {
|
-
-
+ |
|
@@ -627,11 +738,13 @@ table.body h2 span {
-
+
+
+
@@ -669,6 +782,9 @@ Daily newsletter [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid]
+
+
+
A random test post [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid]
@@ -679,6 +795,9 @@ A random test post [http://127.0.0.1:2369/r/xxxxxx?m=member-uuid]
+
+
+
By Joe Bloggs • date
@@ -715,6 +834,7 @@ Testing feature image caption
+
@@ -726,15 +846,14 @@ Testing feature image caption
+
-Ghost © 2025 – Unsubscribe [http://127.0.0.1:2369/unsubscribe/?uuid=member-uuid&key=xxxxxx&newsletter=requested-newsletter-uuid]
-https://ghost.org/?via=pbg-newsletter&ref=127.0.0.1
@@ -746,237 +865,483 @@ https://ghost.org/?via=pbg-newsletter&ref=127.0.0.1
-
-",
-}
-`;
-exports[`Batch sending tests Newsletter settings Hides comments button for email only posts 1 1`] = `
-Object {
- "html": "
-
-
-
-
-
- This is a test post title
-
+
+
+
+
+
+
+
+
+ |