Commit Graph

1015 Commits

Author SHA1 Message Date
Kevin Ansfield
3bd9e2ecfe
Added Playwright "Update published post" test (#15958)
refs https://github.com/TryGhost/Team/issues/2371

- tests modifying the content of a published post
- extracted publish flow into a `publishPost` function that returns a new browser page object with the newly created post loaded
2022-12-07 14:13:23 +00:00
Ronald Langeveld
5bd82bc6d7 Added Playwright test for Member Impersonation
ref https://github.com/TryGhost/Team/issues/2371

- tests whether an impersonation link gets generated as well as whether
  the link authenticates the user on a new page.
2022-12-07 19:26:23 +07:00
Simon Backx
31855ba75a Added Playwright publish only test
refs https://github.com/TryGhost/Team/issues/2371

Test publishing flow for publish only posts.
2022-12-07 12:03:56 +01:00
Sam Lord
d6072ea0e8 Record tests using same setup as the test runner
no issue
2022-12-07 10:59:45 +00:00
Ronald Langeveld
8c41807978 Added Playwright test for deleting members from Admin.
ref https://github.com/TryGhost/Team/issues/2371

- This test will delete the previously added and editor member, returning the initial member state with no members.
2022-12-07 17:00:36 +07:00
Daniel Lockyer
1e27dd638f
Added Playwright check that Offer redemption count was incremented
refs https://github.com/TryGhost/Team/issues/2369

- this checks whether the Offer redemption count is set to 1, which
  would be indicative that the Offer was successfully counted as
  redeemed
2022-12-07 16:52:58 +07:00
Daniel Lockyer
464504a8e1
Avoided config.local.json loading in testing-browser environment
- this should be checking if we're in any of the testing envionments and
  avoid loading the `config.local.json` file if so
2022-12-07 16:25:23 +07:00
Ghost CI
e323d6162c Merged v5.25.2 into main 2022-12-07 09:04:25 +00:00
Ghost CI
a014817aa9 v5.25.2 2022-12-07 09:04:22 +00:00
Ronald Langeveld
1a879f9550 Added label and unsubscribe toggle on members test.
ref https://github.com/TryGhost/Team/issues/2371

- Editing members requires Label prefilled before the test runs so we can test making changes to that data.
2022-12-07 15:45:00 +07:00
Ronald Langeveld
f5bc7353b0 Added Playwright test for editing a member in admin
ref https://github.com/TryGhost/Team/issues/2371

- tests for editing a member inside admin
2022-12-07 13:02:48 +07:00
Ronald Langeveld
d60c50751b Added playwright test for creating a new member in admin
ref https://www.notion.so/ghost/Critical-Paths-980dd089c3e74a6fbc619271f5a9ce42

- this test will add a new member via the admin.
- it also tests to ensure the added member is displayed after heading back to the members list page.
2022-12-07 12:35:16 +07:00
Daniel Lockyer
d64d8c0ddd
Added Playwright test for creating and using a free-trial Offer
refs https://www.notion.so/ghost/Critical-Paths-980dd089c3e74a6fbc619271f5a9ce42

- this test will create a free-trial Offer and go through Stripe
  checkout, ensuring the member is created as paid
- also changes some utils to support creating the free-trial offer vs
  just a discounted Offer
2022-12-07 11:29:05 +07:00
Daniel Lockyer
41e1f0b568
Removed workaround for Members modal bug
refs 3817f583fa

- this should no longer be needed because the underlying bug was fixed
  and the modal should no longer show
2022-12-07 10:51:44 +07:00
Daniel Lockyer
63af7633d8
Added yarn test:browser:single to run single browser tests
- this should enable you to run a single test file without waiting for
  all others
2022-12-07 10:47:01 +07:00
Daniel Lockyer
16f3ba573b
Updated ghost_head snapshots
refs de97d90cf9

- this should have been updated when I deleted some extraneous config
  that was lurking in the testing config files
2022-12-07 10:24:44 +07:00
Daniel Lockyer
570b697b4a
Fixed double slashes in Stripe webhook URL
- `getSiteUrl` already returns a trailing slash so we shouldn't add
  another one in the path
2022-12-07 10:18:21 +07:00
Daniel Lockyer
de97d90cf9
Removed sodoSearch block from testing config
- I'm not even sure what this is doing here but we should be using the
  values from the default config, which are currently different from
  this
2022-12-07 09:46:49 +07:00
Naz
6ef5e6a7e0 Fixed local environment for playwright tests
refs https://github.com/TryGhost/Toolbox/issues/479

- this includes a handful of improvements to get Playwright working on a
  local environment including:
  - adding `testing-browser` environment so we don't nuke `development`
    environments, and makes all the necessary changes to get Ghost to
    behave when this is running
  - stopped running one global instance of Ghost as this doesn't provide
    a clean environment
  - copies a few default fixtures that are needed for the new
    environment
2022-12-07 09:44:05 +07:00
Ronald Langeveld
a302e8289f
Added Unsplash API config to Lexical (#15948)
no issue

- added default headers and app_id for React-Koenig-Lexical to consume.
2022-12-07 09:20:11 +07:00
Daniel Lockyer
d04abc90b4
Added test group names
- this helps differentiate between the different tests we have available
2022-12-06 19:18:16 +07:00
Daniel Lockyer
97e5ca1de6
Extracted Playwright tests into separate files
- we should start to keep tests grouped by their area, so first we split
  by Admin tests and then Portal tests, and within that we split into
  setup/Tiers/Offers etc
2022-12-06 19:08:09 +07:00
Elena Baidakova
62681037f0
Added email_suppression property to response for PUT api/member method (#15946)
closes TryGhost/Team#2359
- Keep the same response structure for `api/member` GET and PUT methods
2022-12-06 13:51:26 +04:00
Naz
0ab652b768
Fixed playwright port
refs https://github.com/TryGhost/Toolbox/issues/479

- e2e and integration test suites are running on port 2369. Playwright was not following this convention, without good reason.
- Port 2368 is the default port for development and production processes, so using it for test environment is not ideal
2022-12-06 16:14:37 +07:00
Ghost CI
54b693a359 Merged v5.25.1 into main 2022-12-06 05:14:41 +00:00
Ghost CI
55b0f564ba v5.25.1 2022-12-06 05:14:37 +00:00
Simon Backx
c47891c3f6
🐛 Fixed setting delivered_at to null after hard bounce (#15942)
refs https://ghost.slack.com/archives/C02G9E68C/p1670075366333929?thread_ts=1669963540.980309&cid=C02G9E68C

When we receive a permanent bounce/failure, we set delivered_at to null.
But we don't want to lose this information.

Instead we should be able to handle recipients that both have failed_at
and delivered_at set.
2022-12-06 10:26:54 +05:30
Sam Lord
d3716007bf
Fixed browser-based tests running in CI
refs: https://github.com/TryGhost/Toolbox/issues/481

* Correctly setup environment variable to run both local & staging browser-based tests
* Use non-production Ghost Admin build, since production builds require HTTPS to use Stripe Connect
2022-12-05 13:39:10 +00:00
Naz
879aad263d
Added email verification trigger test
refs https://github.com/TryGhost/Toolbox/issues/476

- The email verification trigger and host settings related bugs have been a cause of bugs in past releases.  The admin client verification source did not have any test coverage in the past.
- The members test suite size is getting out of hand. This test is quite verbose, because of the state it's trying to check.
- In the future we should consider splitting up Member API (and probably other) test suites into smaller pieces.
2022-12-05 18:24:28 +07:00
Naz
e170f293e3
Extracted sleep method to e2e framework module
no issue

- The sleep method has been used in 8 modules reimplementing the same thing over and over again. It's usually a sign of async event processing outside of the request/response loop. It's good to have a single point of implementation for a "hack" like this, so we could track it easier and address the even processing delay in a more optimal way centrally if it ever becomes a bottleneck
2022-12-05 17:26:29 +07:00
renovate[bot]
b8ab57b692 Update dependency expect to v29 2022-12-05 11:16:46 +07:00
renovate[bot]
7f169cdd96 Update dependency html-validate to v7.10.1 2022-12-05 10:21:00 +07:00
renovate[bot]
cdca9d73b3
Update Test & linting packages 2022-12-02 23:05:46 +00:00
Sam Lord
00d223991d Improved browser test CI integration
refs: https://github.com/TryGhost/Toolbox/issues/481
2022-12-02 17:04:04 +00:00
Sam Lord
7bfe5db716 Ensure tests pass when pointing at a remote server
no issue

This will need some work, since we are introducing a 500ms delay to wait for a network request to return. Ideally the tier expander should eventually populate itself.
2022-12-02 17:04:04 +00:00
Sam Lord
47526bc175 Fixed Portal test in browser suite
no issue
2022-12-02 17:04:04 +00:00
Sam Lord
40903c3136 Fixed browser-based tests in local context
no issue

Local tests can now setup Stripe during the global setup process, and the webhook server is run out-of-process.
Running tests in CI against localhost will use environment variables to setup Stripe.
Providing a test URL will avoid setting up Stripe and will assume that it is already done.
2022-12-02 17:04:04 +00:00
Daniel Lockyer
bc0b1f6adc Added CI for running Playwright tests
🚧
2022-12-02 17:04:04 +00:00
Sam Lord
668e523ab4 Allow playwright tests to run locally and remotely
no issue

This commit allows tests to run remotely by replacing selectors with production-suitable ones (no [data-test...]).

It also allows running locally with Stripe webhooks by adding a new global setup function.
2022-12-02 17:04:04 +00:00
Ghost CI
d9ed6bcdb8 v5.25.0 2022-12-02 15:00:48 +00:00
Simon Backx
ea72934c41
Improved email concurrency sending (#15923)
no issue

Send 10 batches at the same time
2022-12-02 15:30:02 +01:00
renovate[bot]
c7d10c2d49 Update Node.js to v18 2022-12-02 14:07:37 +00:00
Simon Backx
2a3a72e4d5
Added email debug API (#15915)
fixes https://github.com/TryGhost/Team/issues/2346

- Adds email batch browse endpoint
- Adds email recipient failures browse endpoint
- Adds new fixtures and E2E tests for the new API
- Added support for snapshot tests to have 'nullable' types.
2022-12-02 09:44:32 +01:00
renovate[bot]
46bb38b18a Update sentry-javascript monorepo to v7.23.0 2022-12-02 11:59:31 +07:00
Hannah Wolfe
79dbdff054 Fixed error logging in importer
refs: https://github.com/TryGhost/Toolbox/issues/431

- the error logging was only outputting 'Content import was unsuccessful' and not outputting the associated error
2022-12-01 19:14:18 +00:00
Fabien "egg" O'Carroll
c5b233ac65 Moved the filtering of suppressed emails behind a flag check
We want to be able to release this code without restricting the
sending of emails on our end, so this logic needs to be behind a
feature flag
2022-12-01 20:14:30 +07:00
Fabien "egg" O'Carroll
2350cacf3a Wired up MailgunEmailSuppressionList
This switches out the in-memory implementation for the mailgun one and
is the final piece in wirign up everything to real data.
2022-12-01 20:14:30 +07:00
Fabien "egg" O'Carroll
a25fdf4052 Added MailgunEmailSuppressionList
refs https://github.com/TryGhost/Team/issues/2253
refs https://github.com/TryGhost/Team/issues/2254
refs https://github.com/TryGhost/Team/issues/2255

This is the implementation of the EmailSuppressionList specific to
Mailgun, it listens for the new events and stores suppressions based
on those.
2022-12-01 20:14:30 +07:00
Fabien "egg" O'Carroll
5e72e42d32 Moved InMemoryEmailSuppressionList to own file
This cleans up the service file so we can make the switch to a Mailgun specific
implementation later.
2022-12-01 20:14:30 +07:00
Simon Backx
4c166e11df
Added E2E tests for batch sending (#15910)
refs https://github.com/TryGhost/Team/issues/2339

- Includes a new pattern in the job manager that allows us to properly
await jobs.
- Added new convenience mocking methods to stub settings
- Tests the main flows for bulk sending:
    - Sending in multiple batches
    - Sending to multiple segments
    - Handling a failed batch and retrying that batch
- Fixes bug in batch generation (ordering not working)

In a different PR I'll add more detailed tests.
2022-12-01 13:43:49 +01:00
Fabien "egg" O'Carroll
c0e91c73d3 Added unique constraint to email_spam_complaint_events table
We can fetch the same event multiple times from Mailgun so we need to
be able to protect against inserting duplicate events in the
database. This will allow us to catch duplicate errors on insert when
handling complaint events.
2022-12-01 17:27:02 +07:00
Fabien "egg" O'Carroll
f9fdee1b28 Wired up storage of EmailSpamComplaintEvents
refs https://github.com/TryGhost/Team/issues/2337

This also removes the code which unsubscribes members from newsletters because
that is not the spec of the feature.
2022-12-01 17:26:59 +07:00
Fabien "egg" O'Carroll
9c691f3ea9 Added support for EmailSpamComplaintEvent to activity feed
We need to add relations and filterRelations to the model so that we can
correctly filter events by post_id and member_id
2022-12-01 17:26:24 +07:00
Naz
04d9cbb1eb Removed unused members settings module
no issue

- This module is marked for deletion with a todo comment.  It also popped up as least covered place in the codebase, because it was never used.
2022-12-01 16:12:09 +07:00
Simon Backx
d8187123af
Added storage for email failures (#15901)
fixes https://github.com/TryGhost/Team/issues/2332

Saves events in the database and collects error information.

Do note that we can emit the same events multiple times, and as a result
out of order. That means we should correctly handle that a delivered
event might be fired after a permanent failure. So a delivered event is
ignored if the email is already marked as failed. Also delivered_at is
reset to null when we receive a permanent failure.
2022-12-01 10:00:53 +01:00
Simon Backx
26d51687b1
Implemented email previews and tests using new email flow (#15899)
fixes https://github.com/TryGhost/Team/issues/2330

Uses new flow for previewing and testing emails (only if email stability
flag is enabled)
2022-11-30 13:56:28 +01:00
Rishabh Garg
42f9d392a3
Added mailgun provider for sending emails (#15896)
closes https://github.com/TryGhost/Team/issues/2309

- adds new mailgun provider to send out batch emails
- updates sending service to send email id for mailgun provider, allows tagging mail with email id
2022-11-30 16:21:58 +05:30
Naz
0cfef77a01
Removed db schema config from e2e test coverage
refs a2d487e074

- Same reasoning as in referenced commit: "Database schema definition file is a special type of "configuration" file containing mostly static declarations. This sort of code should not be tested by unit tests, rather by e2e tests"
2022-11-30 17:08:47 +07:00
Naz
130f379176
Added "frontend/helpers" to coverage ignore list
refs https://github.com/TryGhost/Toolbox/issues/486

- Frontend helpers are extremely hard to cover fully in e2e tests and are better suited to be covered by unit tests (which they have very hight coverage with)
2022-11-30 17:06:27 +07:00
Naz
aa8fe65665
Added "testmode" app to coverage ignore list
refs https://github.com/TryGhost/Toolbox/issues/486

- Testmode is a special app used for manual testing and has no value in code coverage reports
2022-11-30 16:45:22 +07:00
Naz
80decf8303
Fixed invalid query strings in tests
closes https://github.com/TryGhost/Team/issues/2324

- It seemed like the "limit" query parameter did not work properly returning multiple entries from the endpoint. In reality the whole query string was ignored because of an error in the "filter" part of the query ^_^
2022-11-30 13:31:06 +07:00
Naz
65d910f43b
Increased timeout for the import job test
refs 9fe1274fbe

- Temporary fix to let the CI pass the test. Needs investigation into why MySQL is so much slower comparing to SQLite
2022-11-30 13:25:18 +07:00
Daniel Lockyer
52fc66762a
Updated .npmignore with new files
- these files should not be included in the published package as they're
  for development purposes
2022-11-30 12:40:47 +07:00
renovate[bot]
d6a9b464b3 Update dependency jwks-rsa to v3 2022-11-30 12:24:08 +07:00
Naz
9fe1274fbe
Fixed member import job test
refs https://github.com/TryGhost/Team/issues/2326

-  The job takes considerably longer to run with MySQL, so needed a longer sleep time. It's a temporary fix to unblock a broken build. We should investigate why the job takes so long to run on MySQL
2022-11-30 11:15:12 +07:00
Naz
ff1c17d661
Bumped e2e test coverage thresholds
refs fc9f8aebc1

- With integration & regression test suites included in the e2e coverage reports the coverage has jumped up nicely. We should keep the threshold as hight as possible from accidentally reducing the coverage quality
2022-11-30 10:41:32 +07:00
Naz
fc9f8aebc1
Fixed ci test runs
refs 3e0ec26408

- The refed commit excluded integration/regression test suites from CI test runs by accident
2022-11-30 10:39:32 +07:00
renovate[bot]
fc16bf97da Update dependency postcss-cli to v10.1.0 2022-11-30 10:09:41 +07:00
Kevin Ansfield
457c672c6a
Added URL transform for image cards in Lexical documents (#15890)
refs https://github.com/TryGhost/Team/issues/2225

- updated the `formatOnWrite` transform map for posts to include the new `nodes` and `transformMap` options used by `urlUtils` for transforming node payload data
- added `nodes` to the `lexicalLib` module that pulls in our default nodes to be passed in to the URL transform utilities
- added `urlTransformMap` to the `lexicalLib` module that maps transform type and data type to URL transform utility functions that accept a single URL argument
2022-11-29 16:57:01 +00:00
Fabien "egg" O'Carroll
ba5b8ea33d Added email_spam_complaint_events table and model
refs https://github.com/TryGhost/Team/issues/2318

As with our other events, we've disabled destroy and edit static methods
on the bookshelf model.
2022-11-29 18:13:12 +07:00
Fabien "egg" O'Carroll
83be54af42 Added suppressions table and model
refs https://github.com/TryGhost/Team/issues/2317

This table is used for persisting the email suppression list.
We don't have a member_id column because emails, not members are suppressed.
2022-11-29 18:12:24 +07:00
Simon Backx
f5045b9bf7
Added email renderer implementation draft (#15877)
fixes https://github.com/TryGhost/Team/issues/2308

- Still has some missing pieces, but mostly works.
- Uses new handlebars template for emails
- When sending emails with the new email stability flag enabled, one
test email is now sent via the default smtp ghost mailer.
2022-11-29 11:27:17 +01:00
Simon Backx
f4fdb4fa6c
Added new email event processor (#15879)
fixes https://github.com/TryGhost/Team/issues/2310

This moves the processing of the events from the event-processor to a
new email-event-processor in the email-service package.

- The `EmailEventProcessor` only translates events from
providerId/emailId to their known emailId, memberId and recipientId, and
dispatches the corresponding events.
- Since `EmailEventProcessor` runs in a separate worker thread, we can't
listen for the dispatched events on the main thread. To accomplish this
communication, the events dispatched from the `EmailEventProcessor`
class are 'posted' via the postMessage method and redispatched on the
main thread.
- A new `EmailEventStorage` class reacts to the email events and stores
it in the database. This code mostly corresponds to the (now deleted)
subclass of the old `EmailEventProcessor`
- Updating a members last_seen_at timestamp has moved to the
lastSeenAtUpdater.
- Email events no longer store `ObjectID` because these are not
encodable across threads via postMessage
- Includes new E2E tests that test the storage of all supported Mailgun
events. Note that in these tests we run the processing on the main
thread instead of on a separate thread (couldn't do this because
stubbing is not possible across threads)

There are some missing pieces that will get added in later PRs (this PR
focuses on porting the existing functionality):
- Handling temporary failures/bounces
- Capturing the error messages of bounce events
2022-11-29 11:15:19 +01:00
Fabien 'egg' O'Carroll
a95cc4e7ac
Lowered minimum function coverage tests (#15894)
refs https://github.com/TryGhost/Ghost/pull/15877
refs https://github.com/TryGhost/Ghost/pull/15892

We've been running into issues with unit test coverage in the references
PR's and have tried adding unit tests, but the problem persists. We're
lowering this to unblock development.
2022-11-29 16:55:53 +07:00
Rishabh
64ac47f4ef Added table to store email recipient failures
refs https://github.com/TryGhost/Team/issues/2291

When sending out mails to individual recipients, its possible that recipient gets a temporary or permanent failure for receiving the mail. Temporary failures can generally get resolved after a bit when the recipient’s mail server accepts the email, unlike permanent failures. For both customer visibility and easier debugging on what went wrong while delivering to a particular recipient, we’ll store the permanent/temporary failure for a recipient.

- migration adds a new table that stores the failure information for the recipients
2022-11-29 15:19:36 +05:30
Naz
a2d487e074
Removed db schema config from test coverage
refs https://ghost.slack.com/archives/C02G9E68C/p1669707419081529?thread_ts=1669702577.532999&cid=C02G9E68C
refs https://github.com/TryGhost/Toolbox/issues/117

- Database schema definition file is a special type of "configuration" file containing mostly static declarations. This sort of code should not be tested by unit tests, rather by e2e tests
2022-11-29 14:50:28 +07:00
Naz
5dd6cb909f
Tweaked code coverage config for e2e tests
refs https://github.com/TryGhost/Toolbox/issues/475
refs https://github.com/TryGhost/Toolbox/issues/117

- The frontend/src folded would never get picked up by a code coverage tooling as scripts there are dynamically minimized and served from the server
- There's nothing to cover under frontend/public
- Logic behind these changes is the same as in second referenced issue
2022-11-29 14:22:27 +07:00
Simon Backx
709b40144d Added JSDoc for GhostMailer replyTo message option
no issue
2022-11-28 18:37:51 +01:00
Ghost CI
4a3ac50a82 Merged v5.24.2 into main 2022-11-28 17:36:37 +00:00
Ghost CI
a176d1d36f v5.24.2 2022-11-28 17:36:34 +00:00
Simon Backx
2a832645dd Added getNoReplyAddress settings helper
no issue

New settings method used for https://github.com/TryGhost/Ghost/pull/15877, which shouldn't belong in the member service like it currently is.
2022-11-28 18:28:15 +01:00
Simon Backx
6e72767a50
Fixed verification trigger not working for large imports (#15887)
fixes https://github.com/TryGhost/Team/issues/2326

When importing more than 500 members, we didn't testImportThreshold at
the right time. It was called too early because the importing job was
not awaited. This also adds an E2E test for this case.
2022-11-28 18:22:10 +01:00
Elena Baidakova
1b784b5ec5
Added events to Post Analytics page (#15886)
closes TryGhost/Team#2313
- Added Sent event to Post analytics and Members feed. Now post can be
Sent or Received or Bounced.
- Excluded Delivered event from Sent filter on backend.
2022-11-28 17:43:35 +04:00
Ghost CI
d9b4057fe1 Merged v5.24.1 into main 2022-11-28 11:51:06 +00:00
Ghost CI
2a28fa411b v5.24.1 2022-11-28 11:51:02 +00:00
Naz
60d066b243
🔒 Disabled editable relations by default
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-9gh8-wp53-ccc6
refs https://github.com/TryGhost/Toolbox/issues/465

- Bookshelf relations allows us to edit relational records by default, which was used liberally in the codebase.
- Not having a clear track record of editable relations left the model layer prone to triggering unwanted nested saves and created a vulnerability where members were able to edit newsletter settings.
- With explicit editable relations it's easier to keep track of relations having editable access to related records. Makes the relational data modification pattern safer to use too.
- Anyone running 5.x should update to 5.24.1

Credits: Dave McDaniel and other members of [Cisco Talos](https://talosintelligence.com/vulnerability_reports)
2022-11-28 18:40:26 +07:00
Naz
22738b1b50 🔒 Disabled editable relations by default
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-9gh8-wp53-ccc6
refs https://github.com/TryGhost/Toolbox/issues/465

- Bookshelf relations allows us to edit relational records by default, which was used liberally in the codebase.
- Not having a clear track record of editable relations left the model layer prone to triggering unwanted nested saves and created a vulnerability where members were able to edit newsletter settings.
- With explicit editable relations it's easier to keep track of relations having editable access to related records. Makes the relational data modification pattern safer to use too.
- Anyone running 5.x should update to 5.24.1

Credits: Dave McDaniel and other members of [Cisco Talos](https://talosintelligence.com/vulnerability_reports)
2022-11-28 18:39:39 +07:00
Sam Lord
60b924f173 Use headless mode by default for Playwright tests
no issue

The setting `headless: false` is superceded by using `PWDEBUG=1` as an
environment variable during debug sessions / while working on tests.
2022-11-28 10:52:38 +00:00
Ghost CI
e1279c74b4 v5.24.0 2022-11-25 15:00:47 +00:00
Gabriel Ribeiro
64329d716e
Fixed missing amp-youtube properties (#15880)
fixes: https://github.com/TryGhost/Ghost/issues/15878

- Fix `amp-youtube` component, add mandatory `width` and `height`
properties. Also change the `layout` property to `responsive`, so that
the width adapts to mobile devices.

---

Error log:
`The mandatory attribute 'height' is missing in tag 'amp-youtube'.`

Documentation `amp-youtube`:
https://amp.dev/documentation/components/amp-youtube
2022-11-25 07:26:33 +00:00
Sam Lord
7e02568cec Fixed PlayWright config
no issue

Using multiple workers could cause Stripe to be removed from one test while another test was using it.
2022-11-24 18:16:43 +00:00
Sam Lord
8b80233ae6 Added sample Portal test to PlayWright suite
refs: https://github.com/TryGhost/Toolbox/issues/479
2022-11-24 17:47:04 +00:00
Sam Lord
6fe5023e91 Added working Playwright tests
refs: https://github.com/TryGhost/Toolbox/issues/479
2022-11-24 15:11:40 +00:00
Rishabh
c5abef057c Stored new source data for emails
refs https://github.com/TryGhost/Team/issues/2280
refs 9b0c21e0a2

As part of the email stability work, we added new `source` and `source_type` columns to `email` table, which allows us to store the email source information. The source for all existing emails before the stability work was always `html`, while newer emails will store `mobiledoc` or `lexical` directly.

While the `source` for all existing emails was populated with the `html` as part of above migration, we also need to store the right `source` for all new emails created till the feature is under a flag.

This change updates the current email flow to also store `source` with html data, so it can be used in future with new email service and allows removing old `html` column.
2022-11-24 16:08:02 +05:30
e.baidakova
f5e1e6296c Add suppression modal to Portal
closes TryGhost/Team#2256
- Users can remove themselves from the suppression list from the profile in Portal.
2022-11-24 13:58:27 +04:00
renovate[bot]
e48072e471 Update dependency bson-objectid to v2.0.4 2022-11-24 11:24:07 +07:00
renovate[bot]
a26cbacfd6 Update dependency @playwright/test to v1.28.1 2022-11-24 10:03:08 +07:00
renovate[bot]
0ca3031df1 Update sentry-javascript monorepo to v7.21.1 2022-11-23 15:15:14 +00:00
Hannah Wolfe
62cd52ff98 Improved Sentry server side error reporting
refs: https://github.com/TryGhost/Team/issues/1121
refs: 54574025e0

- The previous change to fall back to a generic error on the server side is resulting in lots of much less useful Sentry reports
- For unexpected errors, change what's sent to Sentry back to context
- This is done by adding a specific code, so we don't have to match on a string that might change
- Also add the error type, id, code & statusCode as tags to the events - these are searchable structured data
- Adding code as a tag also makes it possible to find all errors that showed the generic message
2022-11-23 12:37:24 +00:00
Hannah Wolfe
36b80f2dda Updated sentry to use @tryghost/version
- As demonstrated by my comments in the boot file, I thought sentry was already depending on the version package
- IMO it's undesirable to require package.json directly esp when we have a tool setup and ready for tis
- Added a bunch of tests to show that Sentry does roughly what we think
2022-11-23 12:37:24 +00:00