0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test/regression
Kevin Ansfield afbe0c27fb
🐛 Fixed __GHOST_URL__ appearing in sitemaps (#12787)
closes https://github.com/TryGhost/Team/issues/552

Refactors URL transforms so they take place at the model layer rather than the API serializer layer. Continuation of the pattern created for the settings model in https://github.com/TryGhost/Ghost/pull/12738

- Added checks to all front-end tests to ensure output does not contain the magic replacement string
  - includes failing acceptance test for `__GHOST_URL__` appearing in sitemaps
- Removed all transform-ready URL transforms from API serializers
  - input serializers transform image urls relative->absolute to keep absolute-urls as the consistent "outside of the database" format
  - output serializers should not need to perform any URL transforms as that will be done at the model layer
- Added url transforms to models layer
  - removes knowledge from the API serializers which shouldn't need to know how data is stored internally in the database
  - makes absolute urls the consistent "outside of the database" URL format
  - adds transform step to the sitemap generator because the data used for that is fetched directly via knex which will not run through the bookshelf `parse()` methods
2021-03-18 17:16:37 +00:00
..
api Fixed broken tests from previous commit 2021-03-17 16:18:48 +01:00
exporter Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
importer Updated mobiledoc tests for lazy loaded images (#12672) 2021-02-18 19:49:40 +00:00
migrations Updated fixtures for Ghost v4.0 2021-03-10 17:37:16 +00:00
models 🐛 Fixed __GHOST_URL__ appearing in sitemaps (#12787) 2021-03-18 17:16:37 +00:00
settings Added routes_hash setting (#12171) 2020-09-07 21:54:55 +12:00
site Hardened frontend tests checking API engine 2021-02-24 18:55:12 +13:00
update-check Fixed linting error 2021-01-14 18:39:27 +13:00
README.md Updated acceptance&regression test suite readmes 2021-01-22 16:42:02 +13:00

Regression Tests

These tests should ensure that we don't break Ghost for all available APIs.

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