Refs https://github.com/TryGhost/Team/issues/2371
- Tests whether the post access selection of public, members, or paid-members matches the expected post visibility on the frontend.
refs https://github.com/TryGhost/Team/issues/2371
- Adds a test that schedules a post 5 seconds in the future and waits
for it to be published
- Reduced the time restrictions for scheduling:
- The minimum time in the frontend is now 5 seconds in the future (came
from 5 minutes in the future)
- The time picker now suggests 10 minutes in the future instead of the
minimum scheduling time (came from 5 minutes)
- In the backend, a post will be allowed to be scheduled if it is at
least 2 minutes in the past (came from 2 minutes in the future)
- The scheduler will publish a post if it is at least 5 minutes in the
past, and maximum 5 minutes in the future (came from 2 minutes)
refs https://github.com/TryGhost/Team/issues/2371
- tests that a free member can upgrade to a paid tier via stripe checkout and the payment details are reflected in portal and member detail page on admin
no issue
- we want to run e2e tests against production Ghost instances and having test selectors available means much less brittle tests
- only real impact from keeping the selectors is extra file size in production builds but that is minimal (~6KB gzipped at time of commit)
sentry ADMIN-C05
- resizing the window (or changing orientation) when viewing a single photo inside the Unsplash image selector was throwing errors because the event handler `setZoomedSize()` call was not passed the same arguments as the typical call made in `modify()`
- moved the `element` and `ratio` properties onto the class so they are preserved and ready to be used without being explicitly passed in when `setZoomedSize()` is called as part of an event
no issue
`<GhBillingIframe>` generates a request to the `/identities/` endpoint every time Admin is accessed for all users, however that endpoint is only accessible to users with the Owner role meaning we have a lot of unnecessary 403 errors in event logs and the developer console.
- added early exit when we know the logged in user doesn't have the Owner role
- removed the subscription fetching code that wasn't reachable (`token` was always `undefined`)
- the BMA sends subscription data as soon as it's available so the extra fetch isn't necessary
closes https://github.com/TryGhost/Team/issues/2242
Contributors don't have permission to fetch `/newsletters/` but the publish flow was sending a request every time a contributor opened a post in the editor creating noise in event logs and in the developer console.
- disabled the newsletters fetch when the logged in user is a contributor
- contributors can't publish so the "missing" data has no effect on the publish flow as it's not used
fixes https://github.com/TryGhost/Team/issues/2302
The analytics page should not be visible for Editors (and doesn't work currently anyway). This commit removes the button that goes to the analytics page for editors and authors.
closes https://github.com/TryGhost/Team/issues/2241
- as part of the authenticated application setup, update the captured Sentry data with the user role
- helps narrow things down when we see permission errors pop up due to requests being made for endpoints that the current user doesn't have permission to access
closes https://github.com/TryGhost/Team/issues/2275
When deleting a member, after confirming deletion another "unsaved changes" modal popped up. From that point, if you clicked to stay you remained on the member screen with stale data (the member was still deleted) resulting in further errors when any attempt to make changes was made.
- prevented the unsaved changes check running for a deleted member because it would always return `true` in that case
- ensured the data setup for the unsaved changes check still occurs when a member is accessed directly via the URL
- previously it was skipped because the data setup only occurred inside `fetchMemberTask` but that isn't called when the route already loaded the model via it's `model()` hook
refs. https://github.com/TryGhost/Team/issues/2327
- on the first two tabs of the email debug screen, the member email wasn't aligned properly when there was no name for a member
refs. https://github.com/TryGhost/Team/issues/2327
- Some minor CSS style changes were needed for errors on the email debug screen. Also we weren't showing any message i - for whatever reason - there was no data for batches.
refs. https://github.com/TryGhost/Team/issues/2327
- The length of the error messages for temporary and permanent failure tabs on the email debug screen can be arbitrary. This degrades scannability and limits the number of displayed rows in the list. Adding an expand button to the error message makes sense since the errors might repeat and the error code + the beginning of the message can be enough to understand them. Also this allows more rows to be displayed per screen.
refs https://github.com/TryGhost/Team/issues/2327
- wires email debug screen with real data from API
- fetches email batch data for showing all batches along with those errored
- fetches all recipient failures - temporary and permanent
- shows email settings that was used for sending out the email
closes https://github.com/TryGhost/Team/issues/2285
- added passthrough of `cursorDidExitAtTop` action so the editor can trigger title input focus on key commands that trigger the cursor to leave the top of document
refs https://github.com/TryGhost/Team/issues/2327
As part of improving visibility for email failures, this change adds a new debug screen that allows visualising the email failures for a post. The screen is hidden on the UI for now and only accessible via URL directly.
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
closes https://github.com/TryGhost/Team/issues/2286
- use the `registerAPI` prop to get access to a basic API for focusing and inserting paragraphs
- replaced commented mobiledoc based title key handling with lexical handling