Ghost/ghost/core/test/utils
Naz 26b0bbc623 Added a test suite for OPTIONS requests
refs https://github.com/TryGhost/Toolbox/issues/461

- The codebase has ambiguous behavior with OPTIONS request. Adding tests covering edge cases for all possible variations of OPTIONS responses is the first step to solving cahceability of these requests.
- The obvious question if you look into the changeset itself would also be: "WTF did you do with test suite naming? What are these changes in admin and click tracking suites? You having a bad day Naz?". The answer is "yes"  (╯°□°)╯︵ ┻━┻
- On a serious note. I've introduced multiple hacks here that should be fixed:
1. Forced test suite execution order for options request - extreme blasphemy. This was last resort decision. I went deep into trying to fixup the server shutdown in the "admin" test suite, which cascaded into failing "click tracking" suite, which has shortcomings on it's own (see notes left in that suite)
2. Exposed "ghostServer" from the e2e-framework's "getAgentsWithFrontend" method. Exposing ghostServer to be able to shut it down (or do other manipulations) was one of the pitfalls we had in the previous test utils, which ended up plaguing the test codebase. Ideally the framework should only be exposing the agents and the rest would happen behind the scenes.
- To fix the hacks above I've raised a cleanup issue (https://github.com/TryGhost/Toolbox/issues/471). I'm very sorry for this mess. The issue at hand has very little to do with fixing the e2e framework, so leaving things "as is".
2022-11-02 13:43:30 +08:00
..
agents 🔒 Prevented member creation when logging in (#15526) 2022-10-05 12:42:42 +02:00
fixtures Fixed settings test 2022-10-27 21:30:31 +05:30
mocks Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
admin-utils.js 🐛 Fixed missing published Admin assets when running in development 2022-08-04 10:55:35 +02:00
api.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
assertions.js Added snapshot tests to ghost_head helper (#15327) 2022-09-08 13:04:34 +02:00
configUtils.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
db-utils.js Fixed warning about aborted connection in tests 2022-08-31 12:15:30 +01:00
e2e-framework-mock-manager.js 🐛 Fixed sending emails from email domain that includes www subdomain (#15348) 2022-09-02 16:57:59 +02:00
e2e-framework.js Added a test suite for OPTIONS requests 2022-11-02 13:43:30 +08:00
e2e-utils.js Renamed redirects to custom-redirects 2022-09-14 13:24:17 -04:00
fixture-utils.js Removed bluebird from fixture-utils.js (#15626) 2022-10-21 20:56:21 +01:00
index.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
overrides.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
redirects.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
url-service-utils.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
urlUtils.js Removed apiVersions from test urlUtils 2022-09-09 13:32:30 +01:00