mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 19:48:50 +03:00
459a2c553e
ref https://linear.app/tryghost/issue/ONC-323 When the store gets into a bad state for new posts that causes saves to fail we can detect that by looking at the `model.isNew` property. Currently our best approach to fix this state is to restart the app. - added a `didTransition()` hook to our `lexical-edit.new` route - detects the bad state, logs the error, and triggers a browser refresh - logs with a `recreatedPostIsGood` property that will let us know if we could instead just try recreating the post and avoiding a full refresh (so far we have no reproduction case so we need to learn what we can) - added `sinon-chai` dependency for better assertions on spies/stubs - added `sentry-testkit` dependency so we can test our Sentry integration calls - we can't use sinon for these calls because of the way Sentry's es6 imports work - extracted our full Sentry config object generation to a util function so it can be re-used in unit tests - updated our integrations list to disable the default `dedupe` integration because it can cause very unexpected/difficult to debug test failures when you're asserting using `sentry-testkit` |
||
---|---|---|
.. | ||
acceptance | ||
helpers | ||
integration | ||
unit | ||
index.html | ||
test-helper.js |