0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/test/utils/fixtures
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
..
admin-views Fixed ETag header for admin templates not changing between versions (#13680) 2021-10-22 14:25:58 +01:00
config
csv Added Members bulk actions endpoint 2021-08-23 16:38:21 +02:00
data
export Fixed typo "in" default About page. (#13271) 2021-10-04 12:18:15 +01:00
filter-param
images Added webp image support (#13105) 2021-07-02 09:37:54 +01:00
import 🐛 Fixed uppercase file extensions ignored in content import (#14268) 2022-03-11 09:17:58 +01:00
media Added audio upload support to Media API 2021-11-09 16:39:33 +04:00
settings
themes Updated fixture Casper@v4.7.2 & corrected README 2022-02-15 15:42:14 +00:00
urls Updated urls/resources cache fixtures 2021-11-22 21:56:32 +13:00
cache-rules.js
context.js
data-generator.js 🐛 Fixed welcome pages not working for "subscribe" links (#14176) 2022-02-20 16:02:42 +02:00
default-settings.json Added default values for Stripe config in tests 2022-02-21 20:06:20 +13:00
fixtures.json Updated test fixtures for tiers with new visibility property 2022-03-08 14:49:13 +05:30
test.hbs