Commit Graph

3567 Commits

Author SHA1 Message Date
Renovate Bot
8e48991e7d Update dependency @playwright/test to v1.19.2 2022-03-01 08:31:33 +01:00
Renovate Bot
b803aa1d8c Update dependency postcss to v8.4.7 2022-03-01 08:31:21 +01:00
Renovate Bot
121e76b0d5
Update dependency @sentry/node to v6.18.1 2022-02-28 17:54:56 +00:00
Renovate Bot
f9fccc43a2 Update dependency eslint to v8.10.0 2022-02-28 12:28:44 +00:00
Daniel Lockyer
6025cb8502 v4.37.0 2022-02-25 16:00:27 +00:00
Renovate Bot
d5400a5538
Update dependency @sentry/node to v6.18.0 2022-02-24 17:35:57 +00:00
Hannah Wolfe
3bd8e01495 Pinned coverage to current levels to prevent drops
- Updating our config to have `--check-coverage` enforces that the coverage meets a certain level.
- The default is 95 I believe, but our coverage is lower.
- I've set the levels to our current levels, so any drop below these numbers will cause the build to fail.
- I've also set the reporters to be text, html and cobertura so we always have a mini report, the full HTML files to navigate and cobertura for CI
- Cleaned up CI so we don't use the cov:unit command as we're now using codecov
- This also means we can remove the cov:unit command which was weird to use because it uses the last test run, which can be confusing
2022-02-24 09:56:06 +00:00
Renovate Bot
6d648487fc
Update dependency luxon to v2.3.1 2022-02-23 20:51:21 +00:00
Fabien 'egg' O'Carroll
694721cbea
Added /tiers API to Admin API (#14200)
refs https://github.com/TryGhost/Team/issues/1313

Rather than removing the /products API we're adding a /tiers API as
a first step towards renaming "products" to "tiers". The initial idea was
to alias the URL's but out API framework doesn't easily allow for this so
we've duplicated it instead.
2022-02-23 17:00:18 +02:00
Renovate Bot
3c3ead8648
Update dependency fs-extra to v10.0.1 2022-02-22 19:57:01 +00:00
Renovate Bot
af1d1abd1d Update dependency @tryghost/logging to v2.0.4 2022-02-22 12:24:23 +01:00
Renovate Bot
688c353030 Update dependency @tryghost/nodemailer to v0.3.13 2022-02-22 12:20:40 +01:00
Renovate Bot
a0d248d18e Update dependency @tryghost/debug to v0.1.13 2022-02-22 12:20:27 +01:00
Renovate Bot
0ca6318f20 Update dependency @tryghost/errors to v1.2.3 2022-02-22 12:20:16 +01:00
Renovate Bot
d88770cc32 Update dependency @tryghost/tpl to v0.1.12 2022-02-22 12:19:20 +01:00
Renovate Bot
0e7eb4acd9 Update dependency @tryghost/version to v0.1.11 2022-02-22 12:17:30 +01:00
Kevin Ansfield
00195b5bc4 Merged v4.36.3 into main 2022-02-22 10:28:55 +00:00
Daniel Lockyer
8b8144a3b8 v4.36.3 2022-02-22 10:25:09 +00:00
Naz
fd0a3e80ae Removed @tryghost/jest-snapshot dependency
refs https://github.com/TryGhost/Toolbox/issues/215

- Ghost tests had difficulty running sometimes when the versions for jest-snapshot package did not match in Ghost and @tryghost/express-test
- This is the error that was showing up: `IncorrectUsageError: Unable to run snapshot tests, current test was not configured`
- The reason why snapshot tests were misconfigured was multiple instances of SnapshotManager, which broke the singleton pattern
- Having jest-snapshot embeded within express-test makes sure the versions stay the same across the clients
- The version bump also introduces passing "queryParams" parameter into the Agent constructor - enables configuring query parameters that would appear in each agent's request. Example usecase - Content API authentication parameter "key" would be nice to "remember" and add to every request URL
2022-02-22 09:41:58 +07:00
Renovate Bot
63762afc49
Update dependency express-jwt to v6.1.1 2022-02-21 17:23:30 +00:00
Renovate Bot
b19bb35aca Update dependency mocha to v9.2.1 2022-02-21 12:53:22 +00:00
Hannah Wolfe
5bf12939e4
Updated eslint-plugin-ghost & fixed resulting failures
- I recently added a bunch of strict rules to our eslint plugin around returns: ca9af37866
- These mostly are issues that occur whilst writing code, that you spot and fix as you're developing, but they're annoying to notice/find and eslint can be used to flag them quickly
- There are of course, edge cases where you don't need to return from array fns, but this rule also suggests better patterns might be available
- For our excert helper and new assertEvent helper, I've updated the code to use simpler patterns that are easier to read, so as to avoid the warnings
- For our old API I've simply disabled the rule as we're about to delete this code
2022-02-21 12:30:12 +00:00
Daniel Lockyer
0ccbfea8fc v4.36.2 2022-02-18 16:00:29 +00:00
Renovate Bot
34fbed10bd Update dependency @tryghost/validator to v0.1.13 2022-02-18 14:33:31 +01:00
Renovate Bot
72fe844396 Update dependency @tryghost/nodemailer to v0.3.12 2022-02-18 14:28:29 +01:00
Renovate Bot
0a84bae1b8 Update dependency @tryghost/errors to v1.2.2 2022-02-18 14:13:57 +01:00
Naz
32884fa412 🐛 Fixed StripeAPI disconnection
refs https://github.com/TryGhost/Toolbox/issues/214

- After calling `DELETE /settings/stripe/connect/` Admin API endpoint, stripe did not fully disconnect causing other Member API endpoints to behave as if Stripe was still configured
2022-02-18 16:30:50 +07:00
Renovate Bot
c8105ea08f Update dependency @tryghost/html-to-mobiledoc to v1.8.5 2022-02-18 09:23:55 +01:00
Renovate Bot
39ab0baa82 Update dependency @tryghost/magic-link to v1.0.19 2022-02-18 09:21:38 +01:00
Renovate Bot
15572127fa Update dependency @tryghost/request to v0.1.15 2022-02-18 09:15:04 +01:00
Renovate Bot
2e7885f3a9 Update dependency @tryghost/bookshelf-plugins to v0.3.9 2022-02-18 09:14:51 +01:00
renovate[bot]
b807f12c44
Update dependency @tryghost/members-importer to v0.5.2 (#14169)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-17 18:18:02 +02:00
renovate[bot]
6a5e7f6ccb
Update dependency @tryghost/members-ssr to v1.0.21 (#14170)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-17 15:38:08 +02:00
renovate[bot]
fc0d679fa2
Update dependency @tryghost/members-api to v5.0.2 (#14168)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-17 15:37:42 +02:00
Fabien 'egg' O'Carroll
daa39bf4fe
🐛 Fixed error handling webhooks for unknown member (#14155)
https://github.com/TryGhost/Team/issues/1374

When we receive a web hook to update payment details for a customer
which is not associated with a Member, instead of proceeding and erroring
we now return early and respond to Stripe with a 200. A test has been 
added to ensure this
2022-02-17 14:51:40 +02:00
Renovate Bot
d2081059de Update dependency @playwright/test to v1.19.1 2022-02-17 12:32:55 +01:00
Daniel Lockyer
1a0362f3db Added demo E2E browser test
refs https://github.com/TryGhost/Toolbox/issues/207

- we want to start writing some E2E tests that involve automated
  pointing and clicking around the frontend of Ghost to test that
  members of Ghost sites can still do what we expect
- we've decided to look in to Playwright for this - it looks __really__
  nice
- this is a VERY basic first test - it'll check for a 200 on the
  homepage of whatever we provide as the TEST_URL env variable, or
  default to a (manually-run) Ghost instance on port 2368
- also adds a `yarn test:browser` command to run the tests using the
  Playwright CLI, and a sample GitHub Action workflow which we can
  manually run with a site URL
- there's a lot more to add here in terms of test framework but this
  gets us started
2022-02-17 12:16:58 +01:00
Renovate Bot
9b4d61ef2e
Update dependency express to v4.17.3 2022-02-17 04:02:30 +00:00
Naz
f0bda014ab Fixed misconfigured SnapshotManager in e2e tests
refs https://github.com/TryGhost/Toolbox/issues/210

- After updating to the newest `@tryghost/express-test`, it's dependency `@tryghost/jest-snapshot` was missmatched with the one used in Ghost itself. This caused multiple instances of SnapshotManager class in the system, which is meant to be a singleton!
- The issue was causing following error to appear: "IncorrectUsageError: Unable to run snapshot tests, current test was not configured"
2022-02-17 11:01:15 +07:00
Naz
d79dab94f5 Changed test-framework assertion execution order
refs https://github.com/TryGhost/Toolbox/issues/210

- Having assertions executed in the declaration order using superagent has lead to many frustrating developer experiences. For example when status code assertion fails there was usually no additional context to investigate the failure further. In this situation having a "response body" assertion executed usually would give many more clues on the actual problem at hand.
- The order of the assertions has been changed from the order in which they were declared to the following one based on assertion type:
1. `exect`
2. `expectHeader`
3. `expectStatus`

- For more on this topic check the documentation: cfd6e88fe2/packages/express-test (assertion-execution-order)
2022-02-17 11:01:15 +07:00
Daniel Lockyer
08eaed152b Added yarn test:ci command
refs https://github.com/TryGhost/Toolbox/issues/208

- we currently run all test commands separately in CI and this can make
  it harder to replicate any issues we see in CI because we have to
  manually go and copy the order of the tests
- it's also nicer if there's just one command that runs so we can make
  changes globally to CI
- this commit adds a test:ci yarn command which will run the tests in
  order of speed/importance, with the -b AKA fail-fast flag so we
  don't have to wait for all tests to run before finding out about
  issues
- this also cleans up running unit tests in the DB matrix
2022-02-16 19:22:20 +01:00
Renovate Bot
6537ed1485
Update dependency @sentry/node to v6.17.9 2022-02-16 15:26:45 +00:00
Matt Hanley
4b47d376ec Merged v4.36.1 into main
v4.36.1
2022-02-16 15:25:03 +00:00
Daniel Lockyer
ffd66d5c57 v4.36.1 2022-02-16 15:23:42 +00:00
Kevin Ansfield
9debf27e62 🐛 Fixed "Invalid mobiledoc structure" errors the could occur when saving posts with header cards
refs https://github.com/TryGhost/Team/issues/1377

- bumped all packages that have a dependency on `@tryghost/kg-utils` to fix a bug in the `slugify()` utility that was throwing errors when the header or subheader was left blank in a header card
2022-02-16 15:16:10 +00:00
Kevin Ansfield
de644a25d4 🐛 Fixed "Invalid mobiledoc structure" errors the could occur when saving posts with header cards
refs https://github.com/TryGhost/Team/issues/1377

- bumped all packages that have a dependency on `@tryghost/kg-utils` to fix a bug in the `slugify()` utility that was throwing errors when the header or subheader was left blank in a header card
2022-02-16 14:44:33 +00:00
Renovate Bot
4ebbe90f17
Update dependency body-parser to v1.19.2 2022-02-16 05:19:22 +00:00
Renovate Bot
2b241b4e6a
Update dependency @sentry/node to v6.17.8 2022-02-15 16:28:10 +00:00
Daniel Lockyer
b2e04cce4b Bumped all Members packages
- we've just fixed up the use of `@tryghost/errors` and bumped some
  dependencies in all of our packages in Members
- this commit bumps all of those packages in Ghost so we can stay
  up-to-date
2022-02-15 13:58:55 +01:00
Naz
09bf5804ad Fixed e2e-framework to correctly compare headers
refs https://github.com/TryGhost/Toolbox/issues/209
refs https://github.com/TryGhost/Toolbox/issues/210

- Fixed request header processing by the e2e-framework where it failed to lowercase incoming header keys. This bug made it harder to test code paths which involve header checking, e.g. following code: `req.headers['stripe-signature']` would not get a correct value if the header was specified as Stripe-Signature
- Additional output to the status code assertions was added - this allows to have more context when an invalid response code comes back in a test.
2022-02-15 18:38:45 +07:00