Commit Graph

300 Commits

Author SHA1 Message Date
Daniel Lockyer
6f4e663d74
Updated @tryghost dependencies (#16005)
- also includes `knex-migrator` with a simple `sqlite3` bump
2022-12-14 11:18:55 +07:00
Daniel Lockyer
0482db4818
Merged v5.25.4 into main 2022-12-14 07:25:47 +07:00
Ghost CI
fa9f6007bf v5.25.4 2022-12-13 15:16:49 +00:00
Simon Backx
b14e234576
🐛 Reverted Sentry to v7.11.1 to fix unhandled promise rejection crashes (#15998)
refs https://github.com/TryGhost/Team/issues/2370

Due to a possible bug in either `@sentry/node` (mainly the Express
middlewares and the usage of deprectated Domain) and Node v16+,
unhandled promise rejections are transformed into uncaught exceptions
and cause Ghost to crash in unexpected situations.

Reverting to `v7.11.1` fixes this (but definitely not ideal at all)
because errors are caught in the Express middleware.

Reproduction repo:
https://github.com/SimonBackx/sentry-node-unhandled-rejection-crash
2022-12-13 15:53:27 +01:00
renovate[bot]
f94d8fdcc2 Update dependency fs-extra to v11 2022-12-13 10:59:55 +07:00
renovate[bot]
102f2f39c7 Update dependency sqlite3 to v5.1.4 2022-12-13 10:59:30 +07:00
renovate[bot]
a8610b524b Update sentry-javascript monorepo to v7.25.0 2022-12-13 10:59:06 +07:00
renovate[bot]
607ca90bca
Update dependency sanitize-html to v2.8.0 2022-12-12 20:20:22 +00:00
renovate[bot]
13abcf6c9d
Update dependency mocha to v10.2.0 2022-12-12 13:20:22 +00:00
renovate[bot]
1fc553e258 Update sentry-javascript monorepo to v7.24.2 2022-12-12 10:42:56 +07:00
renovate[bot]
76c096ae82 Update dependency postcss to v8.4.20 2022-12-12 10:42:35 +07:00
Ghost CI
8d7aa3079f v5.25.3 2022-12-09 16:01:15 +00:00
renovate[bot]
5407902577
Update dependency supertest to v6.3.3 2022-12-08 17:16:37 +00: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
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
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
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
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
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
Ghost CI
d9ed6bcdb8 v5.25.0 2022-12-02 15:00:48 +00: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
renovate[bot]
d6a9b464b3 Update dependency jwks-rsa to v3 2022-11-30 12:24:08 +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
Ghost CI
a176d1d36f v5.24.2 2022-11-28 17:36:34 +00:00
Ghost CI
2a28fa411b v5.24.1 2022-11-28 11:51:02 +00:00
Ghost CI
e1279c74b4 v5.24.0 2022-11-25 15:00:47 +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
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
renovate[bot]
e4e8df44dd Update sentry-javascript monorepo to v7.21.0 2022-11-23 12:29:15 +07:00
Sam Lord
f6870fa846 Added browser-based testing framework
refs: https://github.com/TryGhost/Toolbox/issues/479

Framework includes:
* command to run tests
* command to record tests
* mechanism for starting and stopping Ghost before and after each suite of tests
* mechanism for loading fixtures into Ghost before starting tests
* sample test for controlling Ghost Admin
2022-11-22 14:12:34 +00:00
Simon Backx
44f189b56a
Added email service package (#15849)
fixes https://github.com/TryGhost/Team/issues/2282

Added a new email service package that is used when the email stability
flag is enabled. Currently not yet implemented so will throw an error
for all entry points (if flag enabled).

Removed usage of `labs.isSet.bind` across the code, because that breaks
the stubbing of labs by `mockManager.mockLabsEnabled` and
`mockManager.mockLabsDisabled`. `flag => labs.isSet(flag)` should be
used instead.

All email depending tests now disable the `emailStability` feature flag
to keep the tests passing + make sure we still run all the tests for the
old flow while the email stability package is being built.
2022-11-21 10:29:53 +01:00
renovate[bot]
96aa1c930c Update dependency @playwright/test to v1.28.0 2022-11-21 15:37:46 +07:00
renovate[bot]
c4e41909a6 Update dependency html-validate to v7.10.0 2022-11-21 15:36:36 +07:00
renovate[bot]
0c2a62f47c
Update Test & linting packages 2022-11-18 23:04:37 +00:00
Ghost CI
a3376fe502 v5.23.0 2022-11-18 15:00:50 +00:00
Fabien "egg" O'Carroll
cbe1573fd5 Added email-suppression-list service & mock implementation
refs https://github.com/TryGhost/Team/issues/2267

This will eventually be replaced by a Mailgun specific implementation,
but for now we're using mock one which responds with fake data for
local development.
2022-11-18 14:11:47 +07:00
Sam Lord
49605a9559 Enabled browser-based tests to start Ghost with default test fixtures
refs: https://github.com/TryGhost/Toolbox/issues/479
2022-11-17 17:00:54 +00:00
Naz
3e0ec26408
Introduced separate config for e2e tests
refs https://github.com/TryGhost/Toolbox/issues/475

- Having a single coverage config file for unit and e2e type of tests doesn't play well for tracking coverage progress. The unit test ones are run often when developing, so one can observe the changes in coverage. The e2e tests are ran mostly on CI environment and have different purposes/reach comparing to unit tests.
2022-11-17 09:58:39 +07:00
Naz
b7951b5445
Enabled test coverage report for e2e tests
closes https://github.com/TryGhost/Toolbox/issues/475

- We did not have visibility and history into test coverage statistics in non-unit test suites. This data is useful identifying problematic areas and can be used to keep the code quality under control
- Enabled test coverage for e2e tests, including integration and regression tests
- Decreased the "branches" coverage requirement for the tests to pass (did not want to introduce an additional c8 configuration file just yet)
2022-11-17 09:58:39 +07:00