Ghost/test/e2e-api/admin
Kevin Ansfield 27337e5f00
Added newsletter param to email preview endpoint (#14820)
refs https://github.com/TryGhost/Team/issues/1621

We want to allow previewing emails based on the selected newsletter. The post model doesn't get a newsletter attached until a publish occurs so we can't use `post.newsletter` and need to give the option of specifying which newsletter to preview via query params.

- added support for `newsletter` query param on the `GET /email_previews/posts/:id/` endpoint where the value is a newsletter slug
- updated `generateEmailContent()` signature to use an options object because the order of memberSegment/newsletter arguments doesn't matter and is difficult to reason about if not named
- adjusted `generateEmailContent()` to fetch the newsletter matching the provided slug, falling back to the default newsletter if no slug is provided
2022-05-16 12:15:54 +01:00
..
__snapshots__ Removed backwards compatibility for slack setting 2022-05-16 11:38:59 +01:00
actions.test.js Aliased canary endpoints to point to non-versioned URLs 2022-03-14 21:22:54 +13:00
config.test.js 🐛 Fixed config API not returning boolean 2022-01-20 18:25:41 +02:00
custom-theme-settings.test.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
db.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
email-previews.test.js Added newsletter param to email preview endpoint (#14820) 2022-05-16 12:15:54 +01:00
emails.test.js Added missing e2e emails API browse & retry tests 2022-03-28 17:32:58 +01:00
files.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
images.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
integrations.test.js Added serializer for integrations.destroy 2022-03-22 13:52:32 +00:00
invites.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
key-authentication.test.js Fixed filename casing in canary API 2022-03-24 17:25:53 +00:00
labels.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
media.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
members-importer.test.js Fixed mockLabs disabling all other flags (#14621) 2022-04-28 10:55:20 +02:00
members-newsletters.test.js Fixed mockLabs disabling all other flags (#14621) 2022-04-28 10:55:20 +02:00
members-stripe-connect.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
members.test.js Allowed tiers include and data for member endpoints (#14790) 2022-05-11 22:26:03 +05:30
newsletters.test.js Fixed error in newsletter editing limit checks (#14817) 2022-05-13 10:15:35 +02:00
notifications.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
oembed.test.js 🐛 Fixes oembed bookmark with whitespaces 2021-12-01 15:58:09 +01:00
offers.test.js Added e2e tests for offers API (#14335) 2022-03-24 13:41:48 +01:00
pages.test.js Replaced Products with Tiers API endpoints 2022-05-12 19:59:57 +01:00
posts.test.js Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
redirects.test.js Added serializer for redirects.upload 2022-03-22 13:52:32 +00:00
roles.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
session.test.js Swapped etag matcher to always be anyEtag 2022-05-02 11:05:07 +01:00
settings-files.test.js Added serializer for missing settings endpoints 2022-03-22 13:52:32 +00:00
settings.test.js Removed backwards compatibility for slack setting 2022-05-16 11:38:59 +01:00
site.test.js Swapped etag matcher to always be anyEtag 2022-05-02 11:05:07 +01:00
slugs.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
snippets.test.js Added expectEmptyBody assertions to e2e framework 2022-03-31 18:56:05 +01:00
stats.test.js Added /stats/subscriptions API (#14547) 2022-04-27 14:53:32 +01:00
tags.test.js Renamed testUtils.startGhost to localUtils.startGhost 2021-11-22 21:56:32 +13:00
themes.test.js Added serializer for themes.destroy 2022-03-22 13:52:32 +00:00
tiers.test.js Fixed mockLabs disabling all other flags (#14621) 2022-04-28 10:55:20 +02:00
users.test.js Fixed test query using outdated author_id filter 2022-05-09 20:34:06 +08:00
utils.js Renamed newsletter_id and email_recipient_filter options (#14798) 2022-05-16 10:18:04 +02:00
webhooks.test.js Changed webhooks to store safe version 2022-05-06 12:43:14 +01:00