Ghost/ghost/core/test/utils
Naz cd49992cd9
Added generic file import handler
refs https://github.com/TryGhost/Toolbox/issues/523
refs c2534e3c86/packages/mg-assetscraper/lib/AssetScraper.js (L14-L16)
refs https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

- Importer needs to process and recognize document files like pdfs, presentations etc to be able to import them into sites file storage.
- The handler allows a new root directory "files" to place imported documents
- The handler adds validation and processing for following file extensions:
".pdf",
".json",
".jsonld",
".odp",
".ods",
".odt",
".ppt",
".pptx",
".rtf",
".txt",
".xls",
".xlsx",
".xml"
- With following content types:
"application/pdf",
"application/json",
"application/ld+json",
"application/vnd.oasis.opendocument.presentation",
"application/vnd.oasis.opendocument.spreadsheet",
"application/vnd.oasis.opendocument.text",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/rtf",
"text/plain",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/xml",
"application/atom+xml"
2023-03-02 17:54:18 +08:00
..
agents Sped up comments and feedback tests by reusing Ghost app instance 2022-11-18 14:58:35 +01:00
fixtures Added generic file import handler 2023-03-02 17:54:18 +08:00
mocks Fixed Playwright tests for new email flow 2023-01-20 19:00:13 +01: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 Removed direct use of @tryghost/jest-snapshot 2023-01-17 12:50:49 +08:00
configUtils.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
db-utils.js Fixed warning about aborted connection in tests 2022-08-31 12:15:30 +01:00
e2e-framework-mock-manager.js Improved webmention receiving E2E test reliability 2023-02-22 16:19:56 +01:00
e2e-framework.js Webmentions sending tests stability improvements 2023-02-22 18:25:06 +01:00
e2e-utils.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00
fixture-utils.js Moved email event fetching to main thread (#16231) 2023-02-09 09:36:39 +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
sleep.js Extracted sleep method to e2e framework module 2022-12-05 17:26:29 +07:00
url-service-utils.js Converted Ghost repo into a monorepo 2022-07-20 16:41:05 +02:00
urlUtils.js Fixed configUtils and adapter cache issues in E2E tests (#16167) 2023-01-30 14:06:20 +01:00