0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-08 02:52:39 -05:00
ghost/test
Simon Backx 42ac8c41e4
🐛 Fixed uppercase file extensions ignored in content import (#14268)
refs https://github.com/TryGhost/Team/issues/1363

- When uploading a zip of images in Settings > Labs > [Import], it will skip images that have an uppercase extension, citing an 'unsupported file type' error.
- Cause: Glob ignored those files when matching extensions in ImportManager
- Fix: Added nocase option where needed
- Extended tests to also test the processZip method of ImportManager with getFilesFromZip
- Added isValidZip for zip with uppercase image
- Cleaned up JSDoc in ImportManager, and replaced some older JS syntax

Fixed zipContainsMultipleDataFormats error never thrown:

When a zip combines two data formats, no error was thrown.

- The promise error was only returned in an _.each loop, but never thrown
- Previously when combining multiple data types in a zip file, no error got thrown
- Added a test for this error
- Also added a test for noContentToImport error

Other errors and fixes:

- Added missing length in getBaseDirectory check
- getContentTypes fixed (returned duplicate values). Type error came up after adding all JSDocs
- updated tests to match real types from JSDoc and pass type validations
- Rewrote some methods in the async await syntax
- Added tests for ImportManager clean up
2022-03-11 09:17:58 +01:00
..
e2e-api Fixed error when editing user with empty roles data 2022-03-10 17:29:30 +00:00
e2e-browser Added note about installing the E2E browsers 2022-02-22 10:20:40 +01:00
e2e-frontend Added the last_seen_at update on member page view 2022-03-02 13:58:26 +01:00
e2e-server Fixed ETag header for admin templates not changing between versions (#13680) 2021-10-22 14:25:58 +01:00
integration Updated tests to handle visibility tier 2022-02-01 11:13:51 +05:30
regression 🐛 Fixed duplicate tags created when slugs contain spaces (#14277) 2022-03-10 13:07:00 +01:00
unit 🐛 Fixed uppercase file extensions ignored in content import (#14268) 2022-03-11 09:17:58 +01:00
utils 🐛 Fixed uppercase file extensions ignored in content import (#14268) 2022-03-11 09:17:58 +01:00
.eslintignore Updated casper test fixture to latest version 2022-01-25 14:10:53 +00:00
.eslintrc.js Upgraded no-skipped-test rule to error 2021-05-26 14:57:43 +01:00
.jshintrc Move tests from core to root (#11700) 2020-03-30 16:26:47 +01:00