Commit Graph

1667 Commits

Author SHA1 Message Date
Naz
f77aa03e91
Added missing snapshots for version tests
refs 7552873072

- These snapshot were missing with original refed commit.
2023-04-07 15:31:18 +02:00
Naz
53fd78cc86
Added email snapshot tests to newsletter suites
https://github.com/TryGhost/Team/issues/2691

- This change is meant to serve as an example for testing outbound emails. It uses emailMockReceiver and it's html/test/metadata snapshotting features.
- The wider goal is to move away from using "mockManager.assert.sentEmail" that only tested some of the outgoing email contents to more wide range testing through "emailMockReceiver"
- For more on best practices using emailMockReceiver check out codex section on "email testing" - https://ghost.notion.site/End-to-end-Testing-6a2ef073b1754b18aff42e24a632a007#cf33c7f0-fba6-4951-bf50-09080374719c
2023-04-07 14:34:57 +02:00
Naz
f264c1d1f8
Removed unnecessary mockMail call
no issue

- This test has nothing to do with outgoing emails, so no need to mock mail
2023-04-07 14:34:57 +02:00
renovate[bot]
07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
Simon Backx
f4d75388fd
Added post bulk edit api (#16576)
fixes https://github.com/TryGhost/Team/issues/2919

This pull request implements a new feature that allows bulk editing of
posts by a filter. It adds a new `bulkEdit` endpoint to the posts API
and new `PostsService` methods to handle the bulk actions.

The posts list component is duplicated, so we can keep working in a
copied version without affecting the old version without a flag. It
temporarily adds a star icon to indicate featured posts in the posts
list.
2023-04-07 11:48:14 +02:00
Chris Raible
d49241dd29
Fixing error in browser test (#16583) 2023-04-07 01:11:37 -07:00
Ghost CI
7b6805580c Merged v5.42.1 into main 2023-04-07 08:51:06 +01:00
Ghost CI
89cf224a2a v5.42.1 2023-04-07 08:51:02 +01:00
Daniel Lockyer
378dd913aa
🔒 Fixed path traversal issue in theme files
refs https://github.com/TryGhost/Team/issues/2843

- Using encoded path traversal characters in URL's path allowed to fetch
  any file within active theme's folder, which is disallowed
- credits to: fuomag9 https://kiwi.fuo.fi/@fuomag9
2023-04-07 09:45:59 +02:00
Chris Raible
563793c7ed
Added retries for all known flaky tests (#16582)
refs TryGhost/Team#2833

- for mocha tests, we can add `this.retries(1)` to any flaky tests
- for playwright tests, we can add `test.describe.configure({ retries:
1})` to any `describe` block
- not a long-term solution, but it should help mitigate issues with flaky
tests in short term
2023-04-07 00:37:01 -07:00
naz
7552873072
Added email content snapshots to API versioning tests (#16577)
refs https://github.com/TryGhost/Team/issues/2691
refs
939f25a987

- Resurrected refed commit that was adding tests for versioning API,
this time it's using dynamic replacements to match dynamic content of
the email using matchHTMLSnapshot / matchPlaintextSnapshot with dynamic
content replacements.
2023-04-06 22:42:11 +02:00
Naz
3f78e959b3
Bumped email-mock-receiver
refs https://github.com/TryGhost/Team/issues/2691

- This bump changes the "sentEmailCount" method to a more descriptive "assertSentEmailCount" and adds chaining to this method.
2023-04-06 22:13:17 +02:00
Daniel Lockyer
f61ea1f1a2
Bumped Portal to 2.28
- this bumps the version to 2.28 in Ghost so we can use the latest and
  greatest
2023-04-06 20:20:27 +02:00
naz
70ae3efd5c
Update email mock receive (#16578)
refs TryGhost/Team#2691

- The bump adds possibility to make email's html/text snapshots with dynamic content. The breaking change here is with separate "matchPlaintextSnapshot" method extracted out of "matchMetadataSnapshot" to handle dynamic content in "text" part of the sent email.
2023-04-06 17:24:23 +02:00
Simon Backx
ba8f082d41
Added awaiting jobs and events by default to all tests (#16505)
no issue

This change waits for domain events and jobs before continuing with the
next test. This prevents issues where background tasks in tests are
executed when the next test is running and the configurations have
changed, causing random error logs and test failures.

It also includes a change in Stripe mocking in one E2E test to make use
of the new StripeMocker instead of custom mocking in each test (also to
reduce error logs).
2023-04-06 09:05:16 +02:00
Chris Raible
16c625a630
Added retries to flaky email test (#16556)
refs TryGhost/Team#2891

- test was flaking frequently enough that we had to remove it — not a perfect fix but figure it's better to enable retries than to completely remove the test
- ran CI 5 times (x 4 environments) and it passed 5 times in a row
2023-04-05 22:01:59 -07:00
renovate[bot]
95308573fd Update dependency cssnano to v6 2023-04-05 18:24:03 +02:00
Ghost CI
aa5272ffb9 v5.42.0 2023-04-05 16:49:46 +01:00
Sanne de Vries
92663ea731
Fixed email width and dark mode images in email template (#16566)
Refs https://github.com/TryGhost/Team/issues/2845

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
Co-authored-by: Simon Backx <simon@ghost.org>
2023-04-05 15:53:51 +02:00
renovate[bot]
83373e1751 Update Test & linting packages 2023-04-05 15:16:08 +02:00
Sag
8f6c3c12e2
Upgraded Lexical packages (#16564)
no issue
2023-04-05 15:00:26 +02:00
renovate[bot]
254533ad92 Update dependency @playwright/test to v1.32.2 2023-04-05 14:49:19 +02:00
Daniel Lockyer
b64d32cc26 Removed heavy dependency within @tryghost/errors
- we previously used `@stdlib/utils` instead of the child package
  `@stdlib/copy`, which is a lot smaller and contains our only use of
  the parent
- this saves 140+MB of dependencies
2023-04-05 13:46:15 +02:00
Daniel Lockyer
7ec2656495 Added yarn resolution for @tryghost/errors
- we keep ending up with multiple versions of the depedency in our tree,
  and it's causing problems when comparing instances
- the workaround I'm implementing for now is to bump the package
  everywhere and set a resolution so we only have 1 shared instance
- hopefully we can come up with a better method down the line
2023-04-05 09:34:50 +02:00
Rishabh Garg
bb21dc47f0
Updated member snapshot for comments tests
refs TryGhost/Team#2888
2023-04-05 00:25:31 +05:30
Rishabh
76ed31464b Fixed snapshots for frontend frontend member data APIs
refs https://github.com/TryGhost/Team/issues/2888
2023-04-05 00:01:55 +05:30
Rishabh
d29d541326 Updated firstpromoter integration in portal
refs https://github.com/TryGhost/Team/issues/2888

Bumps portal to include changes for referral tracking in FirstPromoter integration for old members.
2023-04-04 23:58:29 +05:30
Rishabh
ace4d17b3e Updated unit tests for frontend member data 2023-04-04 23:51:45 +05:30
Rishabh
56eb7a822f Fixed FirstPromoter integration to ignore old referrals
closes https://github.com/TryGhost/Team/issues/2888

Due to lack of member's created at date, we previously called the FirstPromoter tracking function for all logged-in members irrespective of when they signed up. This caused issues in few cases where members who were already signed up were getting falsely attributed as referrals if they had clicked on a referral link previously.

This change uses the member's created at date which is now available on frontend for logged-in members, and ignored the FirstPromoter tracking script if member had signed up more than 24 hours ago.
2023-04-04 23:46:12 +05:30
Chris Raible
e95c531e8b
🐛 Fixed member signup emails being sent with escaped subject line (#16544)
closes TryGhost/Team#2895

- this was caused by the subject line being passed through the i18n
translator, which was escaping the content
- passing in `interpolation: {escapeValue: false}` when retrieving the
value prevents the content from being escaped
- modified a test to ensure the subject line is not escaped
2023-04-04 10:12:28 -07:00
Simon Backx
d0042b550a
Fixed redirecting back to account home after sign in in Portal (#16487)
refs https://github.com/TryGhost/Team/issues/2674

When going to /#/portal/account when not signed in, you are redirected
to the login page. But once signed in, you aren't redirected back to the
account page. This fixes this issue by adding an extra and optional
redirect parameter when requesting a magic token via email.

This new parameter allows to override the default behaviour of using the
Referer HTTP header, which doesn't include the hash/fragment part of the
URL.

The referrer is already restricted to only allow redirects to the site,
not external URLs.
2023-04-04 18:07:37 +02:00
Fabien "egg" O'Carroll
41e8c20d88 Deleted flakey test
refs https://github.com/TryGhost/Team/issues/2891

This test is failing more and more frequently and is being removed with the
intention of reinstating it once it has been fixed
2023-04-04 20:16:44 +07:00
Simon Backx
e13f052af8
Added Portal signup terms settings and migration (#16545)
fixes https://github.com/TryGhost/Team/issues/2885 
fixes https://github.com/TryGhost/Team/issues/2896 
fixes https://github.com/TryGhost/Team/issues/2877

This change adds the new portal_signup_terms_html setting and
portal_signup_checkbox_required setting and the corresponding migration.
2023-04-04 10:04:12 +02:00
Sanne de Vries
57fcfe76d8
Updated images in email template to be work with light/dark mode
refs https://github.com/TryGhost/Team/issues/2845

We needed to update the html out of the cards to include images for light
and dark mode, and then we've used CSS to show/hide them 

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2023-04-04 00:32:08 +07:00
Simon Backx
d06e3dca60 Added id column to post analytics export
refs https://github.com/TryGhost/Team/issues/2678

Also fixes snapshots
2023-04-03 14:50:43 +02:00
Simon Backx
136bf80168 Added post analytics export
fixes https://github.com/TryGhost/Team/issues/2678

- Includes a new filename for the export (post-analytics instead of posts)

Co-authored-by: Fabien 'egg' O'Carroll <fabien@allou.is>
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-04-03 14:39:11 +02:00
Simon Backx
bef310cb2a Readded failing test
no issue

Test was failing and removed temporarily.
2023-04-03 11:35:40 +02:00
Sag
3393d3910c
Upgraded Koenig packages
no issue
2023-04-03 11:33:43 +02:00
Simon Backx
33237c4df7 Added newsletter auto border color and dynamic color picker
fixes https://github.com/TryGhost/Team/issues/2879
fixes https://github.com/TryGhost/Team/issues/2880

- Replaced black border color with 'auto' based on background color.
- When a color is 'auto', the color that are visible in the UI (color pciker) will be dynamic based on the background color.
2023-04-03 11:27:57 +02:00
Sagar Gupta
0c8f75686b Fixed Public Preview Card in Lexical 2023-04-03 10:04:37 +02:00
Ghost CI
8140a7b227 v5.41.0 2023-03-31 17:00:56 +01:00
Ghost CI
77347a0adc 🎨 Updated Casper to v5.4.8 2023-03-31 17:00:56 +01:00
Daniel Lockyer
040c015796
Bumped Portal to v2.26.0
- contains i18n translations
2023-03-30 18:34:16 +02:00
Daniel Lockyer
5cd67f83ea Added i18n labs flag
- this adds the labs flag and scaffolding to wire it into Ghost + Portal
2023-03-30 18:15:57 +02:00
Paul Davis
86027fdb6f
Add Migrate app (#16458)
Adds the UI for self-serve migrations
2023-03-30 15:40:06 +01:00
Peter Zimon
79bb55a737
Added Hungarian locale for Portal (#16488)
Hungarian translation for email contents and Portal.
2023-03-30 09:57:09 -04:00
Fabien 'egg' O'Carroll
0f72816951
Newsletter email template customisation (#16523)
Refs https://github.com/TryGhost/Team/issues/2845

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-03-30 15:33:46 +02:00
Rishabh Garg
dc811af070
Merged mentions UI and email lab flags (#16518)
closes https://github.com/TryGhost/Team/issues/2851

We had two separate flags to manage the Mentions beta, one for showing
UI and other for sending emails. This change combines them both under
the single `webmentions` flag that was previously only used to show the
UI.
2023-03-29 01:12:56 +05:30
Rishabh Garg
61afa94a4e
Fixed plaintext for mentions email report (#16517)
closes https://github.com/TryGhost/Team/issues/2754

Updates plaintext version for mentions email report to include all unique mentions in a nice list format.
2023-03-29 00:36:05 +05:30
Ghost CI
4ca61837f4 Merged v5.40.2 into main 2023-03-28 13:20:27 +01:00