Ghost/test/regression
naz a2bfef53de
🐛 Fixed post resource filtering by posts_meta table fields (#12307)
refs #11572

- Filtering by fields coming from posts_meta table did not work for post resources. This was due to lack of support for these types of operations on NQL layer. The approach taken here is using same way filtering was done for many:many relations and generates a `WHERE IN` filtering clause. In the future we could look into adding preloading of 1:1 relations which should allow getting rid of `WHERE IN` in favor of `JOIN` and filtering directly by field names. 
- Changed structure of `EXPANSIONS` filter configuration. Current approach was based on "bag of all the things". Such structure will become problematic as more fields are added. For example, adding all the fields from 1:1 relation posts:posts_meta might collide with any other relations that would have similar naming like meta_description from tags table (if it were was added).
- Bumped nql version to 0.5.0. This adds filtering support to 1:1 relations
- Added filter expansions which can be unique per model Previous approach with single global expansions lookup wasn't working in case different models would need to declare expansion for same field names. Having a `filterExpansion` method per model works in a similar convention other filter related model methods do (e.g. enforcedFilters, defaultFilters)
2020-11-02 12:53:57 +13:00
..
api 🐛 Fixed post resource filtering by posts_meta table fields (#12307) 2020-11-02 12:53:57 +13:00
exporter Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
importer 🐛 Fixed importing Stripe Plans with amount 0 (#12062) 2020-07-20 14:59:23 +02:00
migrations Added snippets permissions migration and fixtures (#12283) 2020-10-16 12:53:09 +01:00
models Fixed "no-shadow" linting in a test suite 2020-10-20 13:19:33 +13:00
settings Added routes_hash setting (#12171) 2020-09-07 21:54:55 +12:00
site 🐛 Fixed meta attributes calculation on post preview 2020-10-05 17:52:40 +13:00
update-check Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
README.md Move tests from core to root (#11700) 2020-03-30 16:26:47 +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.