Commit Graph

15583 Commits

Author SHA1 Message Date
Renovate Bot
83af4795e2 Update actions/checkout action to v3 2022-03-02 08:06:56 +01:00
Renovate Bot
11ce137571 Update dependency cssnano to v5.1.0 2022-03-02 08:06:14 +01:00
Fabien 'egg' O'Carroll
db202fb162
Added visible column to products table (#14221)
refs https://github.com/TryGhost/Team/issues/1387

We are moving away from the portal_products setting to instead store
each tiers visiblity on the tier itself. This column will be used for
that data.

Both of the default Tiers should be visible, but newly created tiers
should not be.
2022-03-01 18:11:59 +02:00
Naz
b3bf19e9e3 Renamed e2e framework date matchers
refs f48892028d
refs 33da584161

- There was another mather added recently: anyDateWithTimezoneOffset. The naming of date-related matchers was getting long and confusing. Renamed existing date matcher to better reflect what they do and they types of matches they are responsible for, following renames have been done:
- anyShortDate  -> anyISODate
- anyDate  -> anyISODateTime
- anyDateWithTimezoneOffset  -> anyISODateTimeWithTZ
2022-03-01 18:17:13 +07:00
Renovate Bot
a17ef130f9 Update dependency @tryghost/validator to v0.1.14 2022-03-01 08:32:27 +01:00
Renovate Bot
54f8f46194 Update dependency @tryghost/root-utils to v0.3.11 2022-03-01 08:32:13 +01:00
Renovate Bot
d87a8f1a6e Update actions/setup-node action to v3 2022-03-01 08:31:42 +01:00
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
Naz
b9e26c836b 🐛 Fixed missing index page from pages sitemaps
closes https://github.com/TryGhost/Ghost/issues/14180
refs 597ec51afb

- The index page `/` was missing from sitemaps.xml. It was a regression instoruced with a referenced commit.
2022-02-28 22:23:11 +07:00
Renovate Bot
f9fccc43a2 Update dependency eslint to v8.10.0 2022-02-28 12:28:44 +00:00
Rishabh
3c0306822f Added include as a valid option for members browse api
refs https://github.com/TryGhost/Team/issues/1029

- members browse endpoint didn't have `include` in its option list, so `?include...` was ignored in the api
- endpoint always reverted to using default relations in output, so `product` was never attached even if added in `include`
2022-02-28 15:30:15 +05:30
Daniel Lockyer
6025cb8502 v4.37.0 2022-02-25 16:00:27 +00:00
Daniel Lockyer
0e447bcdbe Updated Admin to 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
Thibaut Patel
e262b09180 Enabled the last_seen_at flag in the legacy member tests
refs https://github.com/TryGhost/Team/issues/1393

- Added the `last_seen_at` property back in the api answers. The property was removed in ebab652919 without updating the member legacy snapshots
2022-02-24 17:41:38 +01:00
Aileen Nowak
de2e894c53 Don't require description to setup with title
refs https://github.com/TryGhost/Team/issues/1382

- PR feedback
- Self hosters don't have the option to add a site description when setting up
- Update the logic to continue with the settings setup, even when no description is given
2022-02-24 12:36:57 -04:00
Aileen Nowak
92d9029500 Added accentColor and description parameters to /authentication/setup route
refs https://github.com/TryGhost/Team/issues/1382

- Added two possible new setup values: `accentColor` and `description` to define the brand colour and site description on initial setup
- Updated tests to reflect those changes
- Only the params when passed and fall back to default site description
2022-02-24 12:36:57 -04:00
Thibaut Patel
ebab652919 Moved the last_seen_at api property behind a flag
refs https://github.com/TryGhost/Team/issues/1393

- Prevents any issue from reaching all Ghost users
2022-02-24 17:28:07 +01: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
Naz
33da584161 Converted pages e2e test to use test-framework
refs https://github.com/TryGhost/Toolbox/issues/215

- The conversion should serve as a reference test. Eventually the aim is to have all tests converted to use "utils/e2e-framework"  instead of previously used plethora of utils and whatnot
2022-02-24 00:47:09 +13:00
Naz
d6d064be71 Converted posts e2e test to use test-framework
refs https://github.com/TryGhost/Toolbox/issues/215

- The conversion should serve as a reference test. Eventually the aim is to have all tests converted to use "utils/e2e-framework"  instead of previously used plethora of utils and whatnot
2022-02-24 00:47:09 +13:00
Naz
1309a8144f Converted settings e2e test to use test-framework
refs https://github.com/TryGhost/Toolbox/issues/215

- The conversion should serve as a reference test. It was also a massive LoC drop when converting, felt almost criminal not to do it!
2022-02-24 00:47:09 +13:00
Naz
9f0545b133 Added anyDateWithTimezoneOffset matcher to e2e framework
refs https://github.com/TryGhost/Toolbox/issues/215
refs https://github.com/TryGhost/Ghost/issues/10065

- The dates in Content API are returned with UTC offset which does not play ball with existing "anyDate" matcher. Created a new matcher to underline the difference in date formatting between Content and Admin APIs
2022-02-23 17:11:00 +07:00
Naz
fa373e0956 Added ContentAPITestAgent
refs https://github.com/TryGhost/Toolbox/issues/215

- The ContentAPI needs it's own test agent, so we can write e2e tests.
- The main method mostly to be used by the test suites is "authenticate" - it add necessary authentication keys to the request. The agent is not authenticated by default because there are suites that need to test the "non authenticated" requests. Also, there's a need to have the default API key inserted from fixtures level before authenticating (it's not strictly necessary because the key is not dynamic, but I think coupling this point would be a bad move)
2022-02-23 17:08:56 +07:00
Renovate Bot
3c3ead8648
Update dependency fs-extra to v10.0.1 2022-02-22 19:57:01 +00:00
Thibaut Patel
664dfbeae8 Added the last_seen_at field to the member API answers
refs https://github.com/TryGhost/Team/issues/1389
2022-02-22 19:45:55 +01: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
Thibaut Patel
e7751fa279 Backfilled the members last_seen_at column
refs https://github.com/TryGhost/Team/issues/1305

- Skipped sqlite3 compatibility due to the lack of join support in update
- Uses a raw migration to improve performance
2022-02-22 12:16:36 +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
Daniel Lockyer
7a9c80a771 Updated Admin to v4.36.3 2022-02-22 10:25:09 +00:00
Daniel Lockyer
fb7e6e8276
Added note about installing the E2E browsers
refs https://github.com/TryGhost/Toolbox/issues/207

- we need to suggest to install the supported browsers so Playwright can run tests
  against them
2022-02-22 10:20:40 +01:00
Naz
4757158054 Removed leftover @tryghost/jest-snapshot usage
refs fd0a3e80ae
refs https://github.com/TryGhost/Toolbox/issues/215

- This changes got lost and should have landed with referenced commit
2022-02-22 10:33:42 +07: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
Djordje Vlaisavljevic
2c5643623d Added the "selectablePortalLinks" feature flag
refs https://github.com/TryGhost/Team/issues/1096
2022-02-21 16:46:15 +01: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
Kevin Ansfield
2f7456790e Added membersLastSeenFilter labs flag
refs https://github.com/TryGhost/Team/issues/1307

- flag for gating `members.last_seen_at` API property and associated filtering in Admin
2022-02-21 11:48:23 +00:00
Daniel Lockyer
ddaa4ee5e1 Removed unnecessary checks during initial DB init
refs https://github.com/TryGhost/Toolbox/issues/202

- during DB init, we have to create all the tables
- right now we loop over all tables and call the `createTable` command
  - this command checks if the table exists and if not, creates the table
  - this works fine but it means we query the database for every table
  - in MySQL, we query the information_schema table, which we've seen
    issues with before because it doesn't have indexes
- the smarter thing to do here is to get all the tables that already exist,
  remove them from the list, and just straight up create them without
  further checks
- this entire thing should be protected by the migration lock so we
  shouldn't encounter issues from multiple processes initializing the DB
  and tables existing after the initial check
- this commit also removes the check from `createTable` because this isn't
  really needed. We should be using the migration utils, which do
  check for existing tables. I've added a note to the function and
  audited anywhere we still call the function
- this commit removes (- 49 tables + 1 initial check) 48 queries from
  the initial DB init
2022-02-21 08:44:40 +01:00
Naz
8c311419c6 Cleaned up JSDocs referencing TestAgent
refs https://github.com/TryGhost/Toolbox/issues/214

- Previous docs were out of date
2022-02-21 20:06:20 +13:00