Ghost/ghost
Chris Raible c90e033fcf
Added an email rendering test for all Koenig cards (#19059)
refs TryGhost/Product#4125

This PR adds two new integration tests to ensure all our Koenig cards
are rendered properly after going through the EmailRenderer. Although we
have thorough tests for the cards themselves in the Koenig repo, the
EmailRenderer does post-processing on the rendered HTML, such as
inlining CSS, which can adversely impact the rendered output of our
cards in email clients (usually Outlook).

Since email newsletters are a core feature of Ghost, these bugs are
typically fairly urgent, and since it is email, they are also quite
difficult to troubleshoot and fix. These two tests are intended to
prevent bugs of this sort, which in the past have been created by
seemingly harmless changes like bumping dependencies that are used in
the EmailRenderer.

The idea is to create a 'Golden Post' which has at least 1 of every card
from Koenig, run that post through the EmailRenderer, and take a
snapshot of the rendered HTML. In the future, if we make any changes to
the EmailRenderer or the Koenig cards themselves, this will trigger us
to carefully consider the changes, and it provides an 'expected' output
to compare our changes against.

Additionally, the second test simply checks that all cards from
`kg-default-nodes` are included in the 'Golden Post'. This protects
against any new cards that we will add in the future — as soon as we add
them to Koenig and bump `kg-default-nodes` in Ghost, this test will
fail, prompting us to add the new card to the Golden Post and update the
snapshots.

We should also run the 'Golden Post' through a test in Litmus, which
allows us to visually inspect the rendered email across many different
email clients. Ideally we would create a process to review the output of
the 'Golden Post' in Litmus whenever we update the snapshot as well.
2023-12-12 16:05:04 -08:00
..
adapter-cache-memory-ttl Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
adapter-cache-redis Added retryStrategy to redis cache adapter with configurable retry delay 2023-11-29 16:06:05 +00:00
adapter-manager Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
admin Update dependency @tryghost/koenig-lexical to v1.0.8 (#19301) 2023-12-12 22:26:12 +00:00
announcement-bar-settings Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
api-framework Update TryGhost packages 2023-10-31 20:54:17 +01:00
api-version-compatibility-service Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
audience-feedback Update TryGhost packages 2023-10-31 20:54:17 +01:00
bookshelf-repository Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
bootstrap-socket Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
collections Removed usage of unquoted ids in filter strings (#19070) 2023-11-21 09:45:36 +01:00
constants Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
core Added an email rendering test for all Koenig cards (#19059) 2023-12-12 16:05:04 -08:00
custom-theme-settings-service 🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015) 2023-11-16 09:35:20 +00:00
data-generator Added quantities and seed option to the data generator (#19330) 2023-12-12 12:50:55 +01:00
domain-events Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
donations Update dependency ts-node to v10.9.2 2023-12-09 10:51:51 +01:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Update dependency ts-node to v10.9.2 2023-12-09 10:51:51 +01:00
email-analytics-provider-mailgun Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-analytics-service Update TryGhost packages 2023-10-31 20:54:17 +01:00
email-content-generator Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
email-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-service Added Sentry logging in BatchSendingService (#19321) 2023-12-12 11:28:43 -08:00
email-suppression-list Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
event-aware-cache-wrapper Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
express-dynamic-redirects Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
html-to-plaintext Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
i18n Added Thai translations (#19305) 2023-12-12 16:39:24 -05:00
importer-handler-content-files Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
importer-revue Added support for TK tracking inside cards (#19247) 2023-12-06 11:32:36 +00:00
in-memory-repository Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
job-manager Update dependency @breejs/later to v4.2.0 2023-11-29 00:05:22 +00:00
link-redirects Update Types packages 2023-11-08 12:13:12 +01:00
link-replacer Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
link-tracking 🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015) 2023-11-16 09:35:20 +00:00
magic-link Update Types packages 2023-11-08 12:29:48 +01:00
mail-events Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
mailgun-client Fixed mailto unsubscribe header to only unsubscribe current tags (#18995) 2023-11-15 12:57:24 +00:00
member-attribution Update TryGhost packages 2023-10-31 20:54:17 +01:00
member-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
members-api 🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015) 2023-11-16 09:35:20 +00:00
members-csv Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
members-events-service Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
members-importer Added metrics for measuring members importer 2023-12-05 17:07:39 +01:00
members-ssr Fixed deleting session when requesting identity for invalid session (#19017) 2023-11-16 11:01:50 +00:00
mentions-email-report Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
milestones Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
minifier Update dependency terser to v5.26.0 2023-12-07 15:59:56 +00:00
model-to-domain-event-interceptor Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-api-version-mismatch Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
mw-cache-control Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-error-handler Improved error handling for SQL errors (#18797) 2023-11-01 13:47:41 -07:00
mw-session-from-token Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-update-user-last-seen Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
mw-version-match Update TryGhost packages 2023-10-31 20:54:17 +01:00
mw-vhost Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
nql-filter-expansions Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
oembed-service Update dependency metascraper to v5.41.0 2023-12-07 12:36:19 +00:00
offers Fixed create offer API not returning created_at (#19143) 2023-11-28 15:11:35 +00:00
package-json Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
payments Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
post-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
post-revisions Added tests to AdminX framework package (#19022) 2023-11-20 11:00:51 +00:00
posts-service 🐛 Fixed contain/starts/endsWith filters with /, _ or % in them (#19015) 2023-11-16 09:35:20 +00:00
recommendations Update dependency ts-node to v10.9.2 2023-12-09 10:51:51 +01:00
referrers Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
security Update TryGhost packages 2023-10-31 20:54:17 +01:00
session-service Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
settings-path-manager Update TryGhost packages 2023-10-31 20:54:17 +01:00
slack-notifications Update TryGhost packages 2023-10-31 20:54:17 +01:00
staff-service Added email address alignment protections (#19094) 2023-11-23 10:25:30 +01:00
stats-service Update Types packages 2023-12-04 22:05:57 +01:00
stripe Update TryGhost packages 2023-10-31 20:54:17 +01:00
tiers Update TryGhost packages 2023-10-31 20:54:17 +01:00
update-check-service Update TryGhost packages 2023-10-31 20:54:17 +01:00
verification-trigger Aligned dependencies with resolution values 2023-10-13 08:37:36 +02:00
version-notifications-data-service Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
webmentions Removed usage of unquoted ids in filter strings (#19070) 2023-11-21 09:45:36 +01:00
tsconfig.json Disabled TypeScript incremental building 2023-08-09 18:27:56 +02:00