Ghost/core/test/regression
Kevin Ansfield 32f3f9d2c3 🐛 Fixed "unsaved changes" modal displaying when post has been saved
refs https://github.com/TryGhost/Ghost/issues/10477

The unsaved changes modal is displaying even when the post has been saved if images have been uploaded because the server is transforming absolute image urls to relative during input of the `mobiledoc` field but not transforming them back to absolute during output. The editor then thinks it's out of sync and shows the warning when trying to leave.

- `@tryghost/url-utils` has been updated with new methods for transforming URLs in mobiledoc content
- moves absolute->relative transformation from the API input serializers into the Post model
- transforms URLs in more fields for a more comprehensive transformation and fewer issues when re-configuring a site's domain
  - previously there could be problems with internal links between posts not being transformed so you could change the url config to newdomain.com but links in post content would still be pointing to olddomain.com
- updates the API post output serializers to transform all modified fields
- drops the `?absolute_urls=true` param switch from the `canary` API post output serializer so that all URLs are output as absolute
  - we're transforming more urls to relative when saving so this is necessary to ensure the unsaved changes modal is not triggered
  - the query param isn't documented and will disappear in v3
2019-10-07 22:59:19 +01:00
..
api Added members CSV export to Admin API (#11198) 2019-10-03 20:36:22 +02:00
apps/subscribers Separated test env into: acceptance, regression and unit tests (#10411) 2019-01-22 17:54:50 +01:00
exporter Separated test env into: acceptance, regression and unit tests (#10411) 2019-01-22 17:54:50 +01:00
importer Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
migrations Fixed regression tests for v2/admin/db 2019-08-09 10:57:49 +08:00
models 🐛 Fixed "unsaved changes" modal displaying when post has been saved 2019-10-07 22:59:19 +01:00
site Fixed regression tests expecting relative URLs for admin redirects 2019-09-09 15:52:26 +01:00
update-check Fixed regression test 2019-05-02 21:04:16 +02:00
README.md Separated test env into: acceptance, regression and unit tests (#10411) 2019-01-22 17:54:50 +01:00

Regression Tests

This folder should contain packages which we test in a cron job once per day. These tests should ensure that we don't break Ghost.

The goal is that most of these packages use Ghost's API's to test behaviours, otherwise transform the tests into unit tests.